Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic selection

Former Member
0 Likes
844

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
813

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

7 REPLIES 7
Read only

Former Member
0 Likes
814

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

Read only

Former Member
0 Likes
813

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

Read only

0 Likes
813

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.

Read only

0 Likes
813

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

Read only

Former Member
0 Likes
813

Hi,

Please check the link below.

Hope this helps you,

Murthy.

Read only

Former Member
0 Likes
813

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

Read only

Former Member
0 Likes
813

This message was moderated.