Get Example source ABAP code based on a different SAP table
ABAP_SELSCR - Value Properties of Selection Parameters The example shows how to use the value_options> additions of the statement PARAMETERS>.
ABAP_SOURCE_CODE ABAP_EXEC >
ABAP_DESCRIPTION This example program consists of five parts, each illustrating one of value_options>> additions of the statement PARAMETERS>. Each example corresponds to a block on selection screen 100.
Part 1: The input fields of the selection parameters on the selection screen are prefilled with default values. The user can accept or change this value. The default value of the field name> is the user name. The default value for date> appears in the format defined in the user master record.
Part 2: Once input has been entered in the fields field1> and field2>, it is displayed in uppercase ( field1>) and without any changes (field2>) on a list.
Part 3: The search help DEMO_F4_DE> is defined in the dictionary. The search help reads the columns CARRID> and CARRNAME> of the database table SCARR>. Only CARRNAME> is listed but CARRID> is marked as an export parameter. Selecting a line places the ID of the airline CARRID> in the input field.
Part 4: The selection parameter p_prog> is linked with the SPA/GPA parameter rid>, which is used in the current AS ABAP version to store the name of the program processed last. The SPA/GPA parameter rid>, for example, is also linked with the input fields for the program name on the dynpros of the transactions SE38> and SA38 >. For demonstration purposes, this selection parameter is explicitly set to the value TEST_PROGRAM> in this example.
Part 5: The selection parameter p_carr> is declared with reference to the field CARRID> of the database table SPFLI>. For this field, the check table SCARR> is specified in the ABAP Dictionary. The user can only enter those values for the ID of the airline which are also contained in SCARR>. The possible entries help of the input field for p_carr> displays the allowed values.