Following statement activates the pushbutton of the function code "FC0n", where a value between 1 and 5 must be entered for n.
SELECTION-SCREEN FUNCTION KEY n.
Demo: Say, for instance, we need to add pushbutton in application toolbar which navigates to SE16
Here's how we can achieve this:
TABLES: smp_dyntxt ,sscrfields.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETERS: p_test TYPE char20.
SELECTION-SCREEN FUNCTION KEY 1. "Function code 'FC01'
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
smp_dyntxt-icon_id = '@3W@'. "Icon
smp_dyntxt-icon_text = 'Setup Table'. "Icon Text
smp_dyntxt-quickinfo = 'Display Setup Table'. "Quick Info
MOVE smp_dyntxt TO sscrfields-functxt_01.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'FC01'.
SET PARAMETER ID 'DTB' FIELD 'MARA'.
CALL TRANSACTION 'SE16' AND SKIP FIRST SCREEN.
ENDIF.
No comments:
Post a Comment