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

Loop at screen ?

Former Member
0 Likes
1,528

In which all events can we use.....

Loop at screen.

...

...

...

modify screen.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,296

Hi John,

AT SELECTION-SCREEN Event is used .

for Processing a Particular Input Field

Processing Multiple Selection

Creating a List of Input Values

Creating Help for Input Fields

Processing a Group of Radio Buttons

Processing a Block of Input Fields

8 REPLIES 8
Read only

Former Member
0 Likes
1,296

Hi,

You can use it in At Selection Screen event.

Regards

Azad.

Read only

Former Member
0 Likes
1,297

Hi John,

AT SELECTION-SCREEN Event is used .

for Processing a Particular Input Field

Processing Multiple Selection

Creating a List of Input Values

Creating Help for Input Fields

Processing a Group of Radio Buttons

Processing a Block of Input Fields

Read only

Former Member
0 Likes
1,296

Hi,

In the Reports, we use this statment is AT SELECTION-SCREEN OUTPUT.

if it is a module pool then we need to use this in the PBO section

Regards

Sudheer

Read only

varma_narayana
Active Contributor
0 Likes
1,296

Hi

We can use this in PBO of any Screen.

In case of Selection Screen.

TABLES EKKO.

SELECT-OPTIONS : S_BEDAT FOR EKKO-BEDAT.

AT SELECTION-SCREEN OUTPUT.

Loop at Screen.

IF Screen-name = 'S_BEDAT-HIGH'.

SCREEN-REQUIRED = 1.

modify Screen.

endif.

endloop.

<b>Reward if Helpful.</b>

Read only

Former Member
0 Likes
1,296

i mean to ask in what all events of AT SELECTION-SCREEN......... can we use. LOOP AT SCREEN?

Read only

Former Member
0 Likes
1,296

Can we use it in any event other than AT SELECTION-SCREEN OUTPUT

Read only

Former Member
0 Likes
1,296

Hi,

Check the program DEMO_DYNPRO_MODIFY_SIMPLE for some inputs

The statement LOOP AT SCREEEN. is used for modifying the screeen elements.

The statement should be called in the PBO event to perform the required functionality.

eg: suppose that you want to make a field invisible when a button is clicked, then in the PBO of the screen, write this code.

LOOP AT SCREEN.

if screen-name = 'INP1'.

screen-invisible = '1'.

modify screen.

endif.

In this example , the processing is like this.

The statement LOOP AT SCREEN. causes each screen element to be processed. Each time the loop statement is executed, screen-name will be filled with the name of the screen element . Depending on the name of the screen element , you can process using the above mentioned statements.

SCREEN is a structure which has components like NAME,GROUP1,GROUP2,GROUP3 , GROUP4,INPUT,OUTPUT, INVISIBLE,ACTIVE etc.

For more details , just check this link in SAP Library.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm

check this code..

REPORT ZTEST_CHECK .

parameters: p_sale radiobutton group g1 user-command ABC default 'X',

p_mate radiobutton group g1 .

parameters: p_vbeln like vbak-vbeln,

p_matnr like mara-matnr.

at selection-screen output.

if p_sale = 'X'.

loop at screen.

if screen-name = 'P_MATNR'.

screen-input = 0.

endif.

modify screen.

endloop.

endif.

if p_mate = 'X'.

loop at screen.

if screen-name = 'P_VBELN'.

screen-input = 0.

endif.

modify screen.

endloop.

endif.

Regards

Read only

Former Member
0 Likes
1,296

hi,

we can use LOOP AT SCREEN statement only in PBO event of screen flow logic in module pool program and AT SELECTION-SCREEN OUTPUT event of selection screen.

follow these links for sample code...

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/34a234d9b511d1950e0000e8353423/content.htm

regards,

Ashok reddy