‎2010 Jan 16 6:53 AM
Dear All,
I have write following code for AT selection screen output to enable or disable the field of date and year. e.g; when user select radio button1 (r_da) then radion button2 (r_fy) becomes disable and vice versa of that. now the problem is that I have to press enter after selecting corresponding radio button in order to enable or disable the selection screen parameter. I want that user don't have to press the ENTER Key, and fields immediately becomes enable or disable as user select radio button. How I can do that?
SELECTION-SCREEN BEGIN OF BLOCK abc WITH FRAME TITLE text-001.
PARAMETERS: r_da RADIOBUTTON GROUP RAD2 DEFAULT 'X' ,
r_fy RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF BLOCK abc.
AT SELECTION-SCREEN OUTPUT.
IF r_da = 'X'.
LOOP AT SCREEN.
IF Screen-name = 'P_GJAHR'.
Screen-input = 0.
screen-group1 = 'BL1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF r_fy = 'X'.
LOOP AT SCREEN.
IF Screen-name = 'S_BUDAT-LOW' OR Screen-name = 'S_BUDAT-HIGH'.
Screen-input = 0.
screen-group1 = 'BL1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Thanks and Regards,
Sohail
‎2010 Jan 16 6:59 AM
PARAMETERS: r_da RADIOBUTTON GROUP RAD2 DEFAULT 'X' USER-COMMAND ABC. " add user command
‎2010 Jan 16 6:59 AM
PARAMETERS: r_da RADIOBUTTON GROUP RAD2 DEFAULT 'X' USER-COMMAND ABC. " add user command
‎2010 Jan 16 7:05 AM
Hi
PARAMETERS: r_da RADIOBUTTON GROUP rad2 default 'X' USER-COMMAND f1 ,
r_fy RADIOBUTTON GROUP rad2 .
" Once you assign a User Command either in selection or in Module pool programs
" it will trigger automaitic PAI/PBO. This is applicable only to Check Boxes, List Boxes and Radio Buttons
AT SELECTION-SCREEN OUTPUT.
IF r_da = 'X'.
LOOP AT SCREEN.
IF Screen-name = 'P_GJAHR'.
Screen-input = 0.
screen-group1 = 'BL1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP. " Instead of closing this continue with ELSEIF
ELSEIF r_fy = 'X'.
LOOP AT SCREEN.
IF Screen-name = 'S_BUDAT-LOW' OR Screen-name = 'S_BUDAT-HIGH'.
Screen-input = 0.
screen-group1 = 'BL1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Cheerz
Ram
‎2010 Jan 16 7:17 AM
Hi Muhammad Sohail,
Execute below code..
REPORT ZTEST_ILESH.
PARAMETERS : RB_1 RADIOBUTTON GROUP G1 USER-COMMAND A1,
RB_2 RADIOBUTTON GROUP G1 ,
RB_3 RADIOBUTTON GROUP G1 .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF RB_1 = 'X'.
IF SCREEN-NAME = 'RB_2' OR
SCREEN-NAME = 'RB_3'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF RB_2 = 'X'.
IF SCREEN-NAME = 'RB_1' OR
SCREEN-NAME = 'RB_3'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ELSEIF RB_3 = 'X'.
IF SCREEN-NAME = 'RB_1' OR
SCREEN-NAME = 'RB_2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya