Get Example source ABAP code based on a different SAP table
ARTICLE
Dynamic Selections A dynamic selection is a selection condition that can be entered on a dynamically created selection screen. The associated selection screens are generated, displayed, and processed by the system function modules FREE_SELECTIONS_.... of the function group SSEL. The selection screens can be displayed separately, or integrated into the screens of other dynpros or selection screens as a subscreen. Dynamic selections can be incorporated into logical database or used in any programs. ABAP Code Snippet
Security Note
ABAP Code Snippet If used wrongly, dynamic programming techniques can present a serious security risk. Any dynamic content that is passed to a program from the outside must be checked thoroughly or escaped before being used in dynamic statements. This can be done using the system class CL_ABAP_DYN_PRG or the predefined function escape. ABAP Code Snippet ABAP Code Snippet See Security Risks of Dynamic Programming.
Dynamic Selections in Logical Databases Logical databases can provide dynamic selections on their selections screens to specify further dynamic selection conditions for individual nodes of the logical database, in addition to the parameters and selection criteria already defined statically in the database. These dynamica conditions can then be evaluated in the database program of the logical database. Dynamic selections of a logical database can be declared simply using the addition DYNAMIC SELECTIONS of the statement SELECTION-SCREEN in the database. The ABAP runtime environment is responsible for calling function modules to create, display, and handle dynamic selections. The selections entered by the user are passed directly to data objects of the database program and can be evaluated there. For more information, see Logical Databases - Dynamic Selections.