BASIS Function module Used the same way in S/4HANA

RS_VARIANT_CONTENTS Read Variant Contents

Returns the parameter and select-option values stored in a report's selection screen variant in RSPARAMS format. Tools that list or compare variant contents or pass them to another program with SUBMIT ... WITH SELECTION-TABLE use it. For variants with dynamic date calculation, values are calculated at call time; if the variant does not exist, VARIANT_NON_EXISTENT is raised.

Function group
SVAR
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
REPORTRSVAR-REPORTProgram nameYes
VARIANTRSVAR-VARIANTVariant nameYes
MOVE_OR_WRITE—Return values in internal or external format—
NO_IMPORT—Do not import variant—
EXECUTE_DIRECT—Execute directly—

Exporting parameters

ParameterTypeDescription
SPSYLDB_SPLogical database selection screen

Tables parameters

ParameterTypeDescriptionRequired
VALUTABRSPARAMSVariant valuesYes
VALUTABLRSPARAMSLVariant values (long)—
OBJECTSVANZSelection screen objects—
FREE_SELECTIONS_VALUERSSELDYNFree selection values—

Exceptions

  • VARIANT_NON_EXISTENT — Variant does not exist
  • VARIANT_OBSOLETE — Variant obsolete

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'RS_VARIANT_CONTENTS'
  EXPORTING
    report = lv_report
    variant = lv_variant
  IMPORTING
    sp = lv_sp
  TABLES
    valutab = lt_valutab
    valutabl = lt_valutabl
    objects = lt_objects
    free_selections_value = lt_free_selections_value
  EXCEPTIONS
    variant_non_existent = 1
    variant_obsolete = 2
    OTHERS = 3.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report