‎2008 Jul 01 2:23 PM
Can some one take up an example and explain the concepts of "Loop At Screen" and "Modify Screen"? Your replies are highly appreciated and suitable points will be awarded.
‎2008 Jul 01 2:26 PM
‎2008 Jul 01 2:26 PM
‎2008 Jul 01 2:27 PM
Check the link from help.sap.com
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm
‎2008 Jul 01 2:27 PM
Novice,
have a look:
PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'
USER-COMMAND uc01,
p_date TYPE c RADIOBUTTON GROUP a.
PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,
p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ '001'.
IF p_file1 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Amit.
‎2008 Jul 01 3:07 PM
Thanks for the reply. Example looks quite good. Please pardon my ignorance, could you clarify my doubts inline.
PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X' USER-COMMAND uc01,
p_date TYPE c RADIOBUTTON GROUP a.
* Why is that when we remove the User-command, the screen isn't changing, where is uc01 being called or checked?
PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,
p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ '001'.
*Does declaring two blocks of parameters create two screen objects? What will be the value of screen-group if it has not been defined, as in the case of first paramter block
IF p_file1 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Edited by: SAP Novice on Jul 1, 2008 7:38 PM
‎2008 Jul 01 3:15 PM
Novice,
now i would suggest you please take SAP help by pressing F1 on User-command.
am sure you will have more elaboratly.
Amit.
‎2008 Jul 01 3:40 PM
Thanks Amit.
Is there any one else here who could possibly answer my questions below?
PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X' USER-COMMAND uc01,
p_date TYPE c RADIOBUTTON GROUP a.
** Why is that when we remove the User-command, the screen isn't changing, where is uc01 being called or checked?*
PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,
p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ '001'.
*Does declaring two blocks of parameters create two screen objects? What will be the value of screen-group if it has not been defined, as in the case of first paramter block?
IF p_file1 EQ 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2008 Jul 01 3:49 PM
Event will be triggered on selection of the radio button only if you attach "user - command" to the Parameter.
So unless you assign some command like "uc01" event will not be triggered and the code written in "at selection screen output" will not be executed.
You can check the triggered command from the field SY-UCOMM. (Click the radio button and check the value of sy-ucomm during debugging. the value wil be "UC01")
Screen Group '001' in the above example is used to group the fields together so as to change properties in a group or handle the fields in some manner together..
‎2020 May 12 10:19 AM
Hope this will work . try declaring selection screen and at selection screen.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
PARAMETERS: pr_all AS CHECKBOX DEFAULT 'X' USER-COMMAND uc01,
pr_pen AS CHECKBOX USER-COMMAND uc02,
pr_appr AS CHECKBOX USER-COMMAND uc02,
pr_rej AS CHECKBOX USER-COMMAND uc02.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN.
lv_sy-ucomm = sy-ucomm.
AT SELECTION-SCREEN OUTPUT.
CASE lv_sy-ucomm.
WHEN 'UC01'.
CLEAR: pr_pen,pr_appr,pr_rej.
WHEN 'UC02'.
CLEAR : pr_all.
WHEN OTHERS.
ENDCASE.
‎2020 May 12 12:13 PM