Get Example source ABAP code based on a different SAP table
ABAP_DYNPRO - Fields with Dictionary Reference The example shows how dynpro fields can be associated with ABAP Dictionary.
ABAP_SOURCE_CODE ABAP_EXEC >
ABAP_DESCRIPTION The static next dynpro number of dynpro 100 is 100. The statement TABLES> passes the components of the structure DEMO_CONN>> from ABAP Dictionary. The structure DEMO_CONN> was especially created in ABAP Dictionary for dynpros of the flight data model. In addition to the components of the database table SPFLI>>, there is also a component MARK> whose domain S_FLAG> only defines the fixed values blank and X>. On the dynpro, the ABAP Dictionary text for MARK> is overwritten with Cancel>. For all other fields the ABAP Dictionary fields are used. Some fields are no longer ready for input in the Screen Painter. Users can enter values for the airline and flight number. In this process, the user is automatically assisted by the field and the input help and the valid value check against check tables of the ABAP Dictionary. These checks are performed automatically before any dialog module is called in the ABAP program. It is not possible for the user to enter an airline not defined in the check table SCARR> or to enter any flight numbers not matching the airlines defined in SPFLI>, or to enter any values for MARK> except blank and X>. These checks do not have to be programmed in the ABAP program. The module user_command_0100> of the ABAP program reads additional values for the checked key from the database table SPFLI > and sends them to the dynpro in the init_screen_100> event. The work area demo_conn>, declared using the statement TABLES > is used as an interface, while the actual data from the database is processed in the work area wa_spfli >. If the user fills the Cancel> field with X>, the program exits.