Selection Screen All you need to Know

Selection Screen

For defining selection screen, there are three ABAP statements:

SINGLE FIELD PARAMETERS

SELECT-OPTIONS for complex choices

SELECTION-SCREEN is used to format the selection screen and to define user-specific selection screens.

These ABAP statements are found in an ABAP program’s declaration section. You must distinguish between standard selection screens for executable programs and user-defined selection screens for all types of programs when defining selection screens.

Standard Selection Screens

Selection Screen

The standard executable program selection screen is predefined and has the screen number 1000. All PARAMETERS, SELECT-OPTIONS, and SELECT-SCREEN statements in executable programs that do not appear in the definition of a user-defined selection screen -that is, that are not included between the statements define the standard selection screen’s input fields and formatting Before defining additional selection screens, group together all statements that make up the standard selection screen for clarity.

Only executable programs allow you to define input fields for a standard selection screen. The PARAMETERS, SELECT-OPTIONS, and SELECT-SCREEN statements must be included in the above statements in all other programs.

Screens for Independent Selection

The following are two statements:

define a user-defined selection screen with screen number numb . All PARAMETERS , SELECT-OPTIONS , and SELECTION-SCREEN statements that occur between these two statements define the input fields and the formatting of this selection screen. Screen number numb can be any four-digit number apart from 1000, which is the number of the standard selection screen. You must also ensure that you do not accidentally assign a number to a selection screen which is already in use for another screen of the program.

The TITLE tit addition allows you to define a title for a user-defined selection screen. The title tit can either be a static text symbol or a dynamic character field. If you use a character field, you must not define it using the DATA statement – the system generates it automatically. The character field can be filled during the INITIALIZATION event. The title of standard selection screens is always the name of the executable program.

You can use the AS WINDOW addition to call a user-defined selection screen as a modal dialog box. You enter the definition of the window only when you perform the call itself. The AS WINDOW addition ensures that warnings and error messages associated with the selection screen are also displayed as modal dialog boxes, and not in the status bar of the selection screen.

If you define more than one selection screen in a program, you can re-use elements of one selection screen in another using the following statement: For this purpose, yse the statement:

You can specify any of the following elements that have already been declared in another selection screen:

  • Blocks with the name block

  • Parameters with the name p

  • Selection criteria with the name selcrit

  • Comments with the name comm

  • Pushbuttons with the name push

Three selection screen – the standard selection screen and two user-defined selection screens – are defined. The program must be executable so that a standard selection screen can be defined. Selection screen 500 is defined to be called as a modal dialog box. Selection screen 600 contains text symbol 100 as its title, and uses elements par1 and sel1 from the standard selection screen.