Ansicht
Dokumentation

ABENFREE_SELECTIONS - FREE SELECTIONS

ABENFREE_SELECTIONS - FREE SELECTIONS

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- Free Selections

A dynamic selection is a ranges condition that can be entered on a dynamically created selection screen. The associated selection screens are created, displayed, and processed by the system function modules FREE_SELECTIONS_... of the function pool SSEL. The selection screens can be displayed as standalone selection screens, or integrated into the screen layouts of other dynpros or selection screens as a subscreen. Dynamic selections can be included in a logical database or used in any programs. See Security Risks Caused by Input from Outside.

Dynamic Selections in Logical Databases

Logical databases can provide dynamic selections on their selection screen to specify further dynamic ranges conditions for individual nodes of the logical database, in addition to the parameters and selection criteria already defined statically in the database. These dynamic 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 framework 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.

Note

The special addition WITH FREE SELECTIONS of the statement SUBMIT is used to pass parameters to selection screens of logical databases that provide dynamic selections. If this addition is used, the function modules mentioned above are generally also implemented.

Dynamic Selections in All Programs

In ABAP programs that work with classic dynpros, dynamic selections can be provided by using the following two function modules directly:

The function module FREE_SELECTIONS_INIT is used to determine the entities for which dynamic selections are to be made. This could be, for example, database tables from the ABAP Dictionary or any fields specified freely. The result of the function module is a selection ID, which must be passed to the function module FREE_SELECTIONS_DIALOG.

The function module FREE_SELECTIONS_DIALOG can display differently configured selection screens in different formats. Users can enter dynamic selections on these selection screens for the fields provided there and, if required, can also select fields for which they want to perform dynamic selections. If Save is chosen, the function module returns the specified selections to the caller in three different formats, which the caller can take from the following EXPORTING parameters:

  • WHERE_CLAUSES
This parameter passes an internal table with the relative expressions rel_exp generated according to the dynamic selections for dynamic specification in the WHERE clause of SELECT statements.
  • FIELD_RANGES
This parameter passes an internal table with the ranges tables generated according to the dynamic selections and that can be evaluated using the predicate comparison operator IN in corresponding WHERE conditions or comparison expressions.
  • EXPRESSIONS
This parameter passes an internal table with conditions generated according to the dynamic selections in an internal format (Reverse Polish Notation). This format can then be passed to the function module FREE_SELECTIONS_INIT to prepare a selection screen that is predefined with these selections. This format is also required for passes made to called programs using the addition WITH FREE SELECTIONS of the statement SUBMIT.

For more information, see the documentation about function modules and their parameter interface.

Dynamic selections






TXBHW - Original Tax Base Amount in Local Currency   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 6064 Date: 20240426 Time: 065236     sap01-206 ( 136 ms )