Application Development 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: 

how we can loop the screen table.

Former Member
0 Kudos

Hi All,

We are used loop the screen table but it is a structure how we are able to do this what sap doing behind this can any body please tell me.

Thanks,

Saleem.

3 REPLIES 3

Former Member
0 Kudos

Hi

SCREEN is a structure only.

But when you create a screen or selection-screen; the program which controls your screen or selection-screen creates an internal table with header line of type SCREEN.

So in your program SCREEN is an internal table, you can always loop it.

To understand it better, write some parameters and select-options in a report program; in debugging mode see the details of SCREEN table.

Regards

Surya.

0 Kudos

Hi

k Surya is right .. SCREEN is a stucture that has some predefined fields .

FYI :

Plz create some fields , textelements , select-options on the screen used in ur program.

In the PBO event ( for module pool programs ) or at INITIALIZATION ( for normal report programs ) event,

LOOP at screen.

"this would enable u to see all the elements u've created on the screen.

ENDLOOP.

Regards

Pankaj

Former Member
0 Kudos

SCREEN is an SAP system 'table' that we manipulate within ABAP's to control the fields on the screen, whether they are active, input allowed etc.

The processing done as part of PBO.

The coding usually goes inside an OUTPUT Module, you can debug through processing.

LOOP AT SCREEN.

*

Coding here e.g. Hide a group of fields for a country code.

IF SCREEN-GROUP1 = gv-country.

SCREEN-ACTIVE = 0.

ENDIF.

*

MODIFY SCREEN. "We often forget this!

ENDLOOP.