Entering content frameINITIALIZATION Locate the document in its SAP Library structure

SUBMIT

AT SELECTION-SCREEN OUTPUT

AT SELECTION-SCREEN OUTPUT

This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN,
<seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.

If you want to initialize input fields of the logical database, you need to find out the names of the fields. To do this for the logical database SAPDB<ldb>, use Transaction SLDB or choose Tools ®
ABAP Workbench, followed by Development ® Programming environ. ® Logical databases. You can also display the technical information for the required field on the selection screen. To do this, call the F1 help for the required field and then choose Technical info. In the field Scrn Field of the following dialog box, you then see the name of the field used in the program.

Example

The following program is connected to the logical database F1S.

REPORT EVENT_DEMO.

PARAMETERS DATUM TYPE SY-DATUM DEFAULT SY-DATUM.

NODES SPFLI.

When you start the program, the selection screen appears:

This graphic is explained in the accompanying text

Only the parameter DATUM is defined in the program itself. All of the other input fields are defined in the logical database F1S.

When you call the F1 help for the first input field for Airline and then choose Technical info. the field name CARRID-LOW appears in the Scrn field field. This is the component of the selection table that corresponds to the input field. From this, you see that the name of the selection criterion is CARRID. In the same procedure as described above, you find that the parameters of the input fields From and To are named CITY_FR and CITY_TO.

Suppose we now change the program as follows:

REPORT EVENT_DEMO.

PARAMETERS DATUM TYPE SY-DATUM DEFAULT SY-DATUM.

NODES SPFLI.

INITIALIZATION.
  CITY_FR = 'NEW YORK'.
  CITY_TO = 'FRANKFURT'.
  CARRID-SIGN   = 'I'.
  CARRID-OPTION = 'EQ'.
  CARRID-LOW    = 'AA'.
  APPEND CARRID.
  DATUM+6(2) = '01'.

The selection screen is now filled with default values as follows:

This graphic is explained in the accompanying text

 

 

Leaving content frame