SAP Function Modules

RS_COMPLEX_SELECTION SAP Function module







RS_COMPLEX_SELECTION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RS_COMPLEX_SELECTION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ALDB
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RS_COMPLEX_SELECTION - RS COMPLEX SELECTION





CALL FUNCTION 'RS_COMPLEX_SELECTION' "
  EXPORTING
    p_sscr =                    " rsscr         SSCR line of select-option
    p_report =                  " trdir-name    Report name
    p_screen_low =              "               Screen of LOW field
    p_screen_high =             "               Screen of HIGH field
*   p_sscr_index = 0            " sy-tabix      Index of SSCR line
*   p_just_display = SPACE      "               Display only ?
*   p_no_int_chk = SPACE        "
*   p_free_selections = SPACE   "               Called from dynamic selections selection screen ?
    p_convert =                 " rsconvert
*   options =                   " sydb0_xoptions
*   signs_restriction =         "
*   title = SPACE               " sy-title
  EXCEPTIONS
    CANCELLED = 1               "               Entry canceled
    .  "  RS_COMPLEX_SELECTION

ABAP code example for Function Module RS_COMPLEX_SELECTION





The ABAP code below is a full code listing to execute function module RS_COMPLEX_SELECTION including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).


DATA(ld_p_sscr) = 'Check type of data required'.

SELECT single NAME
FROM TRDIR
INTO @DATA(ld_p_report).

DATA(ld_p_screen_low) = 'some text here'.
DATA(ld_p_screen_high) = 'some text here'.
DATA(ld_p_sscr_index) = '123 '.
DATA(ld_p_just_display) = 'some text here'.
DATA(ld_p_no_int_chk) = 'some text here'.
DATA(ld_p_free_selections) = 'some text here'.
DATA(ld_p_convert) = '123 '.
DATA(ld_options) = '123 '.
DATA(ld_signs_restriction) = 'some text here'.
DATA(ld_title) = 'some text here'. . CALL FUNCTION 'RS_COMPLEX_SELECTION' EXPORTING p_sscr = ld_p_sscr p_report = ld_p_report p_screen_low = ld_p_screen_low p_screen_high = ld_p_screen_high * p_sscr_index = ld_p_sscr_index * p_just_display = ld_p_just_display * p_no_int_chk = ld_p_no_int_chk * p_free_selections = ld_p_free_selections p_convert = ld_p_convert * options = ld_options * signs_restriction = ld_signs_restriction * title = ld_title EXCEPTIONS CANCELLED = 1 . " RS_COMPLEX_SELECTION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_p_sscr  TYPE RSSCR ,
ld_p_report  TYPE TRDIR-NAME ,
ld_p_screen_low  TYPE STRING ,
ld_p_screen_high  TYPE STRING ,
ld_p_sscr_index  TYPE SY-TABIX ,
ld_p_just_display  TYPE STRING ,
ld_p_no_int_chk  TYPE STRING ,
ld_p_free_selections  TYPE STRING ,
ld_p_convert  TYPE RSCONVERT ,
ld_options  TYPE SYDB0_XOPTIONS ,
ld_signs_restriction  TYPE STRING ,
ld_title  TYPE SY-TITLE .

ld_p_sscr = 'some text here'.

SELECT single NAME
FROM TRDIR
INTO ld_p_report.

ld_p_screen_low = 'some text here'.
ld_p_screen_high = 'some text here'.
ld_p_sscr_index = '123 '.
ld_p_just_display = 'some text here'.
ld_p_no_int_chk = 'some text here'.
ld_p_free_selections = 'some text here'.
ld_p_convert = '123 '.
ld_options = '123 '.
ld_signs_restriction = 'some text here'.
ld_title = 'some text here'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RS_COMPLEX_SELECTION or its description.