PARAMETERS
* PARAMETERS
* Element, dass ein-/bzw. ausgeblendet werden soll
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl1 FOR FIELD p_test.
PARAMETERS: p_test TYPE matnr.
SELECTION-SCREEN END OF LINE.
* Radiobutton 1, sendet USER_COMMAND, damit beim Umschalten AT SELECTION-SCREEN OUTPUT ausgelöst wird
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl2 FOR FIELD p_rb1.
PARAMETERS: p_rb1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND rb.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl3 FOR FIELD p_rb2.
PARAMETERS: p_rb2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
lbl1 = 'Material:'.
lbl2 = ' An:'.
lbl3 = ' Aus:'.
AT SELECTION-SCREEN OUTPUT.
* Elemente des Selektionsbiles durchgehen
LOOP AT SCREEN INTO DATA(wa).
* Wenn Element 'P_TEST'
IF wa-name = 'P_TEST'.
* Aktvsetzung in Abhängigkeit von RB2
wa-active = COND #( WHEN p_rb2 = abap_true THEN 0 ELSE 1 ).
MODIFY SCREEN FROM wa.
ENDIF.
ENDLOOP.
SELECT-OPTIONS
* Element, dass ein-/bzw. ausgeblendet werden soll
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl1 FOR FIELD so_test.
SELECT-OPTIONS: so_test FOR sy-uname MODIF ID 100.
SELECTION-SCREEN END OF LINE.
* Radiobutton 1, sendet USER_COMMAND, damit beim Umschalten AT SELECTION-SCREEN OUTPUT ausgelöst wird
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl2 FOR FIELD p_rb1.
PARAMETERS: p_rb1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND rb.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (9) lbl3 FOR FIELD p_rb2.
PARAMETERS: p_rb2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
lbl1 = 'Name:'.
lbl2 = ' An:'.
lbl3 = ' Aus:'.
AT SELECTION-SCREEN OUTPUT.
* Elemente des Selektionsbiles durchgehen
LOOP AT SCREEN INTO DATA(wa).
* Wenn Element 'SO_TEST'
IF wa-group1 = '100'.
* Aktvsetzung in Abhängigkeit von RB2
wa-active = COND #( WHEN p_rb2 = abap_true THEN 0 ELSE 1 ).
MODIFY SCREEN FROM wa.
ENDIF.
ENDLOOP.