There are 2 radio buttons on a selection screen. Then select the option that appears, I will enter the information and show it on ALV. I want different select options to be opened for the two buttons.
Definitions :
PARAMETERS : p_rad1 RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND seher, p_rad2 RADIOBUTTON GROUP rad1. SELECT-OPTIONS: so_lifnr FOR lfa1-lifnr NO INTERVALS NO-EXTENSION, so_kunnr FOR kna1-kunnr NO INTERVALS NO-EXTENSION, so_bkr_l FOR lfb1-bukrs NO INTERVALS NO-EXTENSION, so_bkr_k FOR knb1-bukrs NO INTERVALS NO-EXTENSION.
I want SO_LIFNR
and SO_BKR_L
for p_rad1
, SO_KUNNR
and SO_KUNNR
for p_rad2
. I wrote this way:
LOOP AT SCREEN. IF screen-name CS 'SO_LIFNR'. IF NOT p_rad1 IS INITIAL. screen-active = 1. ELSE. screen-active = 0. ENDIF. MODIFY SCREEN. ELSEIF screen-name CS 'SO_BKR_L'. IF NOT p_rad1 IS INITIAL. screen-active = 1. ELSE. screen-active = 0. ENDIF. MODIFY SCREEN. ELSEIF screen-name CS 'SO_KUNNR'. IF NOT p_rad2 IS INITIAL. screen-active = 1. ELSE. screen-active = 0. ENDIF. MODIFY SCREEN. ELSEIF screen-name CS 'SO_BKR_K'. IF NOT p_rad2 IS INITIAL. screen-active = 1. ELSE. screen-active = 0. ENDIF. MODIFY SCREEN. ENDIF. ENDLOOP.
But it gives me such an output. It works correctly but this screen is wrong :
I want it to look separate like this example. Separate images for two radio buttons.
For p_rad1 :
For p_rad2:
How can I do that?