2006 Aug 07 11:04 PM
Hi,
How do I click on radiobutton p_app and cause the p_lfile open field grey out? and click p_pre radiobutton and cuase the p_afile open grey out?
My current code does not work.
Thanks,
Helen
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_app RADIOBUTTON GROUP g1 DEFAULT 'X'
USER-COMMAND run,
p_pre RADIOBUTTON GROUP g1.
SELECTION-SCREEN : END OF BLOCK b1.
Block for Application / Presentation server File input Parameter
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_afile TYPE rlgrap-filename,
p_lfile LIKE rlgrap-filename.
SELECTION-SCREEN : END OF BLOCK b2.
2006 Aug 07 11:20 PM
Here is the current codes. How come the PERFORM 1100_modify_sel_screen
does not work? both fields are open.
So the 'USER-COMMAND' associates with AT SELECTION-SCREEN OUTPUT. How about the 'run'? why need a name 'run' without any association?
Thanks,
Helen
PARAMETERS : p_report RADIOBUTTON GROUP g2 USER-COMMAND cc,
p_down RADIOBUTTON GROUP g2,
p_dwn_pr RADIOBUTTON GROUP g2.
PARAMETERS : p_file TYPE filename-fileintern MODIF ID sc1
DEFAULT '/apps/opt/taxware/audit' LOWER CASE,
p_f_pre TYPE localfile MODIF ID sc2 DEFAULT 'C:\A\tax'.
SELECTION-SCREEN END OF BLOCK download.
----
Event: AT SELECTION-SCREEN OUTPUT *
----
To Modify the Selection screen as per user selection
AT SELECTION-SCREEN OUTPUT.
PERFORM 1100_modify_sel_screen.
FORM 1100_modify_sel_screen .
LOOP AT SCREEN.
IF screen-name = 'p_afile'.
IF p_pre = 'X'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
IF screen-name = 'p_lfile'.
IF p_app = 'X'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " 1100_MODIFY_SEL_SCREEN
2006 Aug 07 11:05 PM
2006 Aug 07 11:08 PM
AT SELECTION-SCREEN OUTPUT.
IF p_app = 'X'.
LOOP AT SCREEN.
CHECK SCREEN-NAME = 'P_LFILE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDLOOP.
ELSEIF p_pre = 'X'.
LOOP AT SCREEN.
CHECK SCREEN-NAME = 'P_AFILE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
2006 Aug 07 11:09 PM
When you add the option USER-COMMAND to the first radiobutton in a group, it will trigger the AT SELECTION-SCREEN OUTPUT everytime you click a radiobutton in that group.
2006 Aug 07 11:20 PM
Here is the current codes. How come the PERFORM 1100_modify_sel_screen
does not work? both fields are open.
So the 'USER-COMMAND' associates with AT SELECTION-SCREEN OUTPUT. How about the 'run'? why need a name 'run' without any association?
Thanks,
Helen
PARAMETERS : p_report RADIOBUTTON GROUP g2 USER-COMMAND cc,
p_down RADIOBUTTON GROUP g2,
p_dwn_pr RADIOBUTTON GROUP g2.
PARAMETERS : p_file TYPE filename-fileintern MODIF ID sc1
DEFAULT '/apps/opt/taxware/audit' LOWER CASE,
p_f_pre TYPE localfile MODIF ID sc2 DEFAULT 'C:\A\tax'.
SELECTION-SCREEN END OF BLOCK download.
----
Event: AT SELECTION-SCREEN OUTPUT *
----
To Modify the Selection screen as per user selection
AT SELECTION-SCREEN OUTPUT.
PERFORM 1100_modify_sel_screen.
FORM 1100_modify_sel_screen .
LOOP AT SCREEN.
IF screen-name = 'p_afile'.
IF p_pre = 'X'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
IF screen-name = 'p_lfile'.
IF p_app = 'X'.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " 1100_MODIFY_SEL_SCREEN
2006 Aug 07 11:21 PM
2006 Aug 07 11:31 PM
Thank you. I got the good result. Would you please explain why need the 'run' after the 'USER-COMMAND'?
Thanks,
Helen
2006 Aug 07 11:35 PM
'RUN' is the user-command that you assigned to your radiobutton group activity. It can be any name XYZ. When you click on any radiobutton in that group, the field sy-ucomm will be filled with the value 'RUN'. Knowing this value will be helpful if you are dealing with many dynamic changes on the screen depending on the user actions. But if you are using it the way you are currently using, then the only help it is doing is triggering the AT SELECTION-SCREEN OUTPUT everytime you move from one radiobutton to another in that group.