Step 1: set command for radio button
SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE TEXT–001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: rb_ven RADIOBUTTON GROUP rbg DEFAULT ‘X’ USER-COMMAND uc_rb.
SELECTION-SCREEN COMMENT 20(30) TEXT–002.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: rb_cus RADIOBUTTON GROUP rbg.
SELECTION-SCREEN COMMENT 20(30) TEXT–003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK frame1.
Step 2: set modif id for elements which we want to show/hide
SELECT-OPTIONS: s_lifnr FOR lfa1–lifnr MODIF ID ven.
SELECT-OPTIONS: s_kunnr FOR kna1–kunnr MODIF ID cus.
Step 3: code for show/hide
AT SELECTION-SCREEN OUTPUT.
IF rb_ven = ‘X’.
LOOP AT SCREEN.
IF screen–group1 = ‘VEN’.
screen–input = 1.
screen–invisible = 0.
MODIFY SCREEN .
ENDIF.
IF screen–group1 = ‘CUS’.
screen–input = 0.
screen–invisible = 1.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen–group1 = ‘CUS’.
screen–input = 1.
screen–invisible = 0.
MODIFY SCREEN .
ENDIF.
IF screen–group1 = ‘VEN’.
screen–input = 0.
screen–invisible = 1.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.