2008 Oct 30 6:04 AM
Hi Experts,
I was going through dynamic selection screen and have come across following code.
Please explain the role the following coding will do.
IF r_local = 'X'.
LOOP AT SCREEN.
IF "screen-name = 'P_LOCAL'. "OR
screen-name = '%_P_LOCAL_%_APP_%-TEXT'.
screen-invisible = '0'.
screen-input = '1'.
MODIFY SCREEN.
ELSEIF screen-name = 'P_SERVER'. " OR
screen-name = '%_P_SERVER_%_APP_%-TEXT'.
screen-invisible = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Server
ELSE.
LOOP AT SCREEN.
IF screen-name = 'P_SERVER' OR
screen-name = '%_P_SERVER_%_APP_%-TEXT'.
screen-invisible = '0'.
screen-input = '0'.
MODIFY SCREEN.
ELSEIF screen-name = 'P_LOCAL' OR
screen-name = '%_P_LOCAL_%_APP_%-TEXT' OR
screen-name = '%_S_KUNNR_%_APP_%-TEXT' OR
screen-name = '%_S_KUNNR_%_APP_%-OPTI_PUSH' OR
screen-name = 'S_KUNNR-LOW' OR
screen-name = '%_S_KUNNR_%_APP_%-TO_TEXT' OR
screen-name = 'S_KUNNR-HIGH' OR
screen-name = '%_S_KUNNR_%_APP_%-VALU_PUSH'. .
screen-invisible = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Nani
2008 Oct 30 6:08 AM
Hi,
This code is used to modify the screen fields ie make it invisible or visible during run time as it is a dynamic selection screen.
if r_local = 'X'.
then the parameter 'P_LOCAL' will be displayed.
else.
'P_SERVER' will be displayed.
'P_LOCAL' will be invisible
endif.
hope it helps.
regards,
Ramya
Hi,
This code is used to modify the screen fields ie make it invisible or visible during run time as it is a dynamic selection screen.
if r_local = 'X'.
then the parameter 'P_LOCAL' will be displayed.
else.
'P_SERVER' will be displayed.
'P_LOCAL' will be invisible
endif.
hope it helps.
regards,
Ramya
2008 Oct 30 6:08 AM
Hi,
This code is used to modify the screen fields ie make it invisible or visible during run time as it is a dynamic selection screen.
if r_local = 'X'.
then the parameter 'P_LOCAL' will be displayed.
else.
'P_SERVER' will be displayed.
'P_LOCAL' will be invisible
endif.
hope it helps.
regards,
Ramya
2008 Oct 30 6:22 AM
Hi Ramya,
I need the information, what role this statements play in coding.
"screen-name = 'P_LOCAL'. "OR
screen-name = '%_P_LOCAL_%_APP_%-TEXT'.
screen-name = 'P_SERVER'. " OR
screen-name = '%_P_SERVER_%_APP_%-TEXT'.
Regards
Nani
2008 Oct 30 6:32 AM
screen-name = 'P_LOCAL'. "OR
screen-name = '%_P_LOCAL_%_APP_%-TEXT'.
in module pool when creating i/o field ..u will be giving name to the i/o field..
that name and above mentioned are same ..
goto se51 put ur program name and put screen no 1000..
there u goto layout and click the i/o fiald and see the attributes ur screen name will be like this screen-name = '%_P_LOCAL_%_APP_%-TEXT' it is generated by system.
2008 Oct 30 6:33 AM
Hi,
.
screen-name = 'P_LOCAL'. "-------------------------> name of the label in selection screen
OR screen-name = '%_P_LOCAL_%_APP_%-TEXT'.---------------------> name of the text field next to the label.....
just put a break-point under LOOP AT SCREEN..it will be clear
2008 Oct 30 6:29 AM
2008 Oct 30 6:51 AM
Hi Nani,
Loop at Screen Statement is basically used to putting aloop on the screen fields whichare present on the screen ( It can be a selection screen for your case).
While using the Loop at screen you are assigning the value to the screen fields to execute further.
Thanks,
Chidanand
2011 Apr 26 10:57 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |