SAP Function Modules

RS_VARIANT_VALUES_TECH_DATA SAP Function module







RS_VARIANT_VALUES_TECH_DATA 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_VARIANT_VALUES_TECH_DATA into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RS_VARIANT_VALUES_TECH_DATA - RS VARIANT VALUES TECH DATA





CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA' "
  EXPORTING
    report =                    " rsvar-report  Report Name
    variant =                   " rsvar-variant  Variant Name
*   sel_text = SPACE            "
*   move_or_write = 'W'         "
*   sorted = SPACE              "               Order as on selection screen
*   execute_direct =            "
  IMPORTING
    techn_data =                " varid
  TABLES
    variant_values =            " rsparams
*   variant_text =              " rsvseltext    Selection Texts
  EXCEPTIONS
    VARIANT_NON_EXISTENT = 1    "               Layout Does not Exist
    VARIANT_OBSOLETE = 2        "
    .  "  RS_VARIANT_VALUES_TECH_DATA

ABAP code example for Function Module RS_VARIANT_VALUES_TECH_DATA





The ABAP code below is a full code listing to execute function module RS_VARIANT_VALUES_TECH_DATA 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_techn_data  TYPE VARID ,
it_variant_values  TYPE STANDARD TABLE OF RSPARAMS,"TABLES PARAM
wa_variant_values  LIKE LINE OF it_variant_values ,
it_variant_text  TYPE STANDARD TABLE OF RSVSELTEXT,"TABLES PARAM
wa_variant_text  LIKE LINE OF it_variant_text .


DATA(ld_report) = some text here

DATA(ld_variant) = some text here
DATA(ld_sel_text) = 'some text here'.
DATA(ld_move_or_write) = 'some text here'.
DATA(ld_sorted) = 'some text here'.
DATA(ld_execute_direct) = 'some text here'.

"populate fields of struture and append to itab
append wa_variant_values to it_variant_values.

"populate fields of struture and append to itab
append wa_variant_text to it_variant_text. . CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA' EXPORTING report = ld_report variant = ld_variant * sel_text = ld_sel_text * move_or_write = ld_move_or_write * sorted = ld_sorted * execute_direct = ld_execute_direct IMPORTING techn_data = ld_techn_data TABLES variant_values = it_variant_values * variant_text = it_variant_text EXCEPTIONS VARIANT_NON_EXISTENT = 1 VARIANT_OBSOLETE = 2 . " RS_VARIANT_VALUES_TECH_DATA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "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_techn_data  TYPE VARID ,
ld_report  TYPE RSVAR-REPORT ,
it_variant_values  TYPE STANDARD TABLE OF RSPARAMS ,
wa_variant_values  LIKE LINE OF it_variant_values,
ld_variant  TYPE RSVAR-VARIANT ,
it_variant_text  TYPE STANDARD TABLE OF RSVSELTEXT ,
wa_variant_text  LIKE LINE OF it_variant_text,
ld_sel_text  TYPE STRING ,
ld_move_or_write  TYPE STRING ,
ld_sorted  TYPE STRING ,
ld_execute_direct  TYPE STRING .


ld_report = some text here

"populate fields of struture and append to itab
append wa_variant_values to it_variant_values.

ld_variant = some text here

"populate fields of struture and append to itab
append wa_variant_text to it_variant_text.
ld_sel_text = 'some text here'.
ld_move_or_write = 'some text here'.
ld_sorted = 'some text here'.
ld_execute_direct = '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_VARIANT_VALUES_TECH_DATA or its description.