Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPSUBMIT_SELSCREEN_PARAMETERS - SUBMIT SELSCREEN PARAMETERS

ABAPSUBMIT_SELSCREEN_PARAMETERS - SUBMIT SELSCREEN PARAMETERS

General Material Data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

SUBMIT, selscreen_parameters

Short Reference



... $[USING SELECTION-SET variant$]
    $[USING SELECTION-SETS OF PROGRAM prog$]
    $[WITH SELECTION-TABLE rspar$]
    $[WITH expr_syntax1 WITH expr_syntax2 ...$]
    $[WITH FREE SELECTIONS texpr$] ...


Additions

1. ... USING SELECTION-SET variant

2. ... USING SELECTION-SETS OF PROGRAM prog

3. ... WITH SELECTION-TABLE rspar

4. ... WITH expr_syntax1 WITH expr_syntax2 ...

5. ... WITH FREE SELECTIONS texpr

Effect

USING SELECTION-SET supplies all selection screen components using a selection screen variant variant. The specification USING SELECTION-SETS OF PROGRAM enables the use of a variant of a different program. WITH SELECTION-TABLE can be used to pass values for multiple selection screen components as the content of an internal table rspar. WITH expr_syntax supplies individual selection screen components with values. The addition WITH FREE SELECTIONS enables the passing of dynamic selections to the selection screen of a logical database.

Addition 1

... USING SELECTION-SET variant

Effect

If this addition is specified, the parameters and selection criteria of the selection screen are supplied with the values of a selection screen variant. For variant, a character-like data object must be specified that contains the name of a selection screen variant of the program called when the statement is executed. If the variant does not exist, an error message is sent. If the variant belongs to a different selection screen, it is ignored.

Note

Selection screen variants can be created and managed for every program in which selection screens are defined, either in the ABAP Workbench or during program execution by choosing Goto - Variants on a selection screen.

Addition 2

... USING SELECTION-SETS OF PROGRAM prog

Effect

If this addition is specified, the selection screen variants of the program prog are used in the called program. prog expects a character-like data object that contains the name of a program when the statement is executed. The addition has the following effects:

  • If a variant variant is specified with USING SELECTION-SET, this variant is searched for in the program prog.
  • If the selection screen is displayed using VIA SELECTION-SCREEN, all functions accessible via the menu path Goto - Variants affect the selection screen variants of the program prog. These functions are only active, however, if prog is an executable program.

Note

The program prog should contain a selection screen with the same parameters and selection criteria as the selection screen used in the called program.

Addition 3

... WITH SELECTION-TABLE rspar

Effect

If this addition is specified, parameters and selection criteria on the selection screen are supplied by an internal table rspar. rspar expects a standard table with the line type RSPARAMS or RSPARAMSL_255 and without secondary table keys. The structured data types RSPARAMS and RSPARAMSL_255 are defined in the ABAP Dictionary and have the following components, all of which have the data type CHAR:

  • SELNAME (length 8)
  • KIND (length 1)
  • SIGN (length 1)
  • OPTION (length 2)
  • LOW (length 45 for RSPARAMS and 255 for RSPARAMSL_255)
  • HIGH (length 45 for RSPARAMS and 255 for RSPARAMSL_255)

In order to supply parameters and selection criteria of the selection screen with specific values, the lines in the internal table rspar must contain the following values:

  • selname must contain the name of a parameter or a selection criterion for the selection screen in uppercase letters.
  • kind must contain the type of the selection screen component ("P" for parameters or "S" for selection criteria).
  • In sign, option, low, and high, the values specified for the identically named columns of the ranges table must be passed for the selection criteria. For parameters, the value must be passed in low and all other components are ignored.

If the name of a selection criterion occurs more than once in rspar, a ranges table containing multiple lines is defined and passed to the selection criterion. If parameter names occur multiple times, the last value is passed to the parameter.
The content of the parameters or ranges tables for the current program can be supplied in the table using the function module RS_REFRESH_FROM_SELECTOPTIONS.

Notes

  • Unlike in ranges tables, the data types of the components low andhigh in table rspar are always of type c and, if necessary, are converted to the type of the parameter or selection criterion when passed.
  • When values are specified, these must have the internal format of the ABAP values, and not the output format of the screen display.
  • The data type RSPARAMSL_255 can be used instead of RSPARAMS from Release 7.2, if the length of 45 characters for components low and high is no longer sufficient.

Addition 4

... WITH expr_syntax1 WITH expr_syntax2 ...

Effect

This addition supplies individual parameters or selection criteria of the selection screen with values. Parameters are supplied with single values and selection criteria are filled with ranges tables that overwrite values already set in the called program. The ranges table that is to be passed is compiled from all additions expr_syntax that address the same selection criterion sel. The following statements can be specified for expr_syntax, where the name of a parameter or a selection criterion must be specified directly for sel:

  • sel ${EQ$|NE$|CP$|NP$|GT$|GE$|LT$|LE$} dobj $[SIGN sign$]
Passing of a single value.
The operators in front of dobj match the values specified for the column option in ranges tables. dobj expects a data object whose data type can be converted to the data type of the selection screen component sel. No enumerated object can be specified. A character-like field containing 'I' or 'E' can be specified for sign. The default value is 'I'.
If sel is a selection criterion, a line is appended to the ranges table to be passed, whereby the specified operator is placed in the column option, the content of dobj is placed in the column low, and the content of sign is placed in the column sign.
If sel is a parameter, it is set to the value of dobj in the called program. The operator and the value of sign are ignored.
  • sel $[NOT$] BETWEEN dobj1 AND dobj2 $[SIGN sign$]
Passing of an interval.
In this case, sel must be a selection criterion. dobj expects data objects whose data type can be converted to that of the columns low and high of the selection criterion sel. No enumerated object can be specified. A character-like field containing 'I' or 'E' can be specified for sign. The default value is 'I'.
A line is appended to the ranges table to be passed. If NOT is specified, the value 'NB' is placed in the column option, otherwise 'BT' is placed in the column. The content of the data objects dobj and sign is placed in the columns low, high, and sign.
  • sel IN range_tab
Passing of a ranges table.
In this case, sel must be a selection criterion. range_tab expects a standard table without secondary table keys that has the structure of the selection table of the selection criterion sel. A table of this type can be created using the addition RANGE OF of the statements TYPES and DATA.
The lines of the table range_tab are appended to the ranges table that is to be passed.

The addition expr_syntax can be specified more than once, and the same selection screen component can also be specified more than once.

If a data object is passed that cannot be converted to the data type of the selection screen component, the runtime error SUBMIT_PARAM_NOT_CONVERTIBLE occurs instead of a syntax error.

Notes

  • = or INCL can also be used instead of the operator EQ.
  • When specifying values, they must be specified in the internal format for ABAP values rather than the output format of the screen display.
  • When passed to selection screens, enumerated objects cannot be converted implicitly to the types c or string.

Example

The program report1 has a standalone selection screen with the dynpro number 1100. In the program report2, an internal table with line type RSPARAMS and a ranges table are filled for this selection screen. In the case of SUBMIT, these are passed together with a single condition.

Called Program

REPORT report1.

DATA text TYPE c LENGTH 10.

SELECTION-SCREEN BEGIN OF SCREEN 1100.
  SELECT-OPTIONS: selcrit1 FOR text,
                  selcrit2 FOR text.
SELECTION-SCREEN END OF SCREEN 1100.

...


Calling Program

REPORT report2.

DATA: text       TYPE c LENGTH 10,
      rspar_tab  TYPE TABLE OF rsparams,
      rspar_line LIKE LINE OF rspar_tab,
      range_tab  LIKE RANGE OF text,
      range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.
rspar_line-kind    = 'S'.
rspar_line-sign    = 'I'.
rspar_line-option  = 'EQ'.
rspar_line-low     = 'ABAP'.
APPEND rspar_line TO rspar_tab.

range_line-sign   = 'E'.
range_line-option = 'EQ'.
range_line-low    = 'H'.
APPEND range_line TO range_tab.

range_line-sign   = 'E'.
range_line-option = 'EQ'.
range_line-low    = 'K'.
APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'
               WITH SELECTION-TABLE rspar_tab
               WITH selcrit2 BETWEEN 'H' AND 'K'
               WITH selcrit2 IN range_tab
               AND RETURN.


Result
After report1 is called by report2, the selection tables of the selection criteria selcrit1 and selcrit2 of the called program are filled as follows:

  sign option low high
selcrit1 I EQ ABAP
selcrit2 I BT H K
selcrit2 E EQ H
selcrit2 E EQ K

Addition 5

... WITH FREE SELECTIONS texpr

Effect

This addition supplies the dynamic selections of the selection screen of a logical database with values. The called program must be linked to a logical database that supports dynamic selections. texpr must be an internal table of type rsds_texpr from type pool RSDS.

In texpr, the selections for the dynamic selections are specified in an internal format (Reverse Polish Notation). The function modules FREE_SELECTIONS_INIT, FREE_SELECTIONS_DIALOG, and FREE_SELECTIONS_RANGE_2_EX from the function pool SSEL can be used to fill texpr in the calling program. Whereas the first two function modules run a user dialog (see Dynamic Selections), ranges tables can be passed to FREE_SELECTIONS_RANGE_2_EX in an internal table of the type rsds_trange for each node of the dynamic selection and are then converted into a table of the line type rsds_texpr. If the calling program contains a selection screen with the same dynamic selections, its content can be passed beforehand to a table of the type rsds_trange using the function module RS_REFRESH_FROM_DYNAMICAL_SEL.
The lines of the internal table type rsds_trange contain a flat component tablename for each node and a table-like component frange_t of the type rsds_frange_t for the fields of the node. The lines in rsds_frange_r contain a flat component fieldname for each field and a table-like component selopt_t of the line type RSDSSELOPT from the ABAP Dictionary. RSDSSELOPT contains the four components sign, option, low, and high and can include the ranges table.

Example

The program report1 is linked to the logical database F1S, which supports dynamic selections for the node SPFLI. The program report2 enters conditions in a nested internal table of the type rsds_trange with ranges conditions for field CONNID of the node SPFLI. This table is then converted into a table of the type rsds_texpr, which is passed at SUBMIT.

Called Program

REPORT report1.

NODES: spfli, sflight, sbook.

...


Calling Program

REPORT report2.

DATA: trange TYPE rsds_trange,
      trange_line
        LIKE LINE OF trange,
      trange_frange_t_line
        LIKE LINE OF trange_line-frange_t,
      trange_frange_t_selopt_t_line
        LIKE LINE OF trange_frange_t_line-selopt_t,
      texpr TYPE rsds_texpr.

trange_line-tablename = 'SPFLI'.
trange_frange_t_line-fieldname = 'CONNID'.
trange_frange_t_selopt_t_line-sign   = 'I'.
trange_frange_t_selopt_t_line-option = 'BT'.
trange_frange_t_selopt_t_line-low    = '0200'.
trange_frange_t_selopt_t_line-high   = '0800'.
APPEND trange_frange_t_selopt_t_line
  TO trange_frange_t_line-selopt_t.
trange_frange_t_selopt_t_line-sign   = 'I'.
trange_frange_t_selopt_t_line-option = 'NE'.
trange_frange_t_selopt_t_line-low    = '0400'.
APPEND trange_frange_t_selopt_t_line
  TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.

CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
  EXPORTING
    field_ranges = trange
  IMPORTING
    expressions  = texpr.

SUBMIT report1 VIA SELECTION-SCREEN
               WITH FREE SELECTIONS texpr.







SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 23513 Date: 20230206 Time: 110053     sap01-206 ( 296 ms )