SAP RS_CHANGE_CREATED_VARIANT Function Module for









RS_CHANGE_CREATED_VARIANT is a standard rs change created variant SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rs change created variant FM, simply by entering the name RS_CHANGE_CREATED_VARIANT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SVAR
Program Name: SAPLSVAR
Main Program: SAPLSVAR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RS_CHANGE_CREATED_VARIANT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'"
EXPORTING
CURR_REPORT = "Report name
CURR_VARIANT = "Variant name
VARI_DESC = "Structure for variant description
* ONLY_CONTENTS = "

TABLES
VARI_CONTENTS = "Table with names and contents of selection options/parameters
* VARI_CONTENTS_L = "
* VARI_TEXT = "Text table of variant
* VARI_SEL_DESC = "Attributes of individual select options in variants
* OBJECTS = "Transfer structure for variant display

EXCEPTIONS
ILLEGAL_REPORT_OR_VARIANT = 1 ILLEGAL_VARIANTNAME = 2 NOT_AUTHORIZED = 3 NOT_EXECUTED = 4 REPORT_NOT_EXISTENT = 5 REPORT_NOT_SUPPLIED = 6 VARIANT_DOESNT_EXIST = 7 VARIANT_LOCKED = 8 SELECTIONS_NO_MATCH = 9
.



IMPORTING Parameters details for RS_CHANGE_CREATED_VARIANT

CURR_REPORT - Report name

Data type: RSVAR-REPORT
Optional: No
Call by Reference: No ( called with pass by value option)

CURR_VARIANT - Variant name

Data type: RSVAR-VARIANT
Optional: No
Call by Reference: No ( called with pass by value option)

VARI_DESC - Structure for variant description

Data type: VARID
Optional: No
Call by Reference: No ( called with pass by value option)

ONLY_CONTENTS -

Data type:
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RS_CHANGE_CREATED_VARIANT

VARI_CONTENTS - Table with names and contents of selection options/parameters

Data type: RSPARAMS
Optional: No
Call by Reference: No ( called with pass by value option)

VARI_CONTENTS_L -

Data type: RSPARAMSL
Optional: Yes
Call by Reference: Yes

VARI_TEXT - Text table of variant

Data type: VARIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

VARI_SEL_DESC - Attributes of individual select options in variants

Data type: RSVDESC
Optional: Yes
Call by Reference: Yes

OBJECTS - Transfer structure for variant display

Data type: VANZ
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ILLEGAL_REPORT_OR_VARIANT - Incorrect report or variant name

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ILLEGAL_VARIANTNAME - Invalid variant name

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_AUTHORIZED - No authorization

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_EXECUTED - Not executed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

REPORT_NOT_EXISTENT - Report does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

REPORT_NOT_SUPPLIED - Report is not type '1'

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VARIANT_DOESNT_EXIST - Variant does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VARIANT_LOCKED - Variant locked

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SELECTIONS_NO_MATCH - Type of length of selection does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RS_CHANGE_CREATED_VARIANT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_curr_report  TYPE RSVAR-REPORT, "   
lt_vari_contents  TYPE STANDARD TABLE OF RSPARAMS, "   
lv_illegal_report_or_variant  TYPE RSPARAMS, "   
lv_curr_variant  TYPE RSVAR-VARIANT, "   
lt_vari_contents_l  TYPE STANDARD TABLE OF RSPARAMSL, "   
lv_illegal_variantname  TYPE RSPARAMSL, "   
lv_vari_desc  TYPE VARID, "   
lt_vari_text  TYPE STANDARD TABLE OF VARIT, "   
lv_not_authorized  TYPE VARIT, "   
lv_not_executed  TYPE VARIT, "   
lv_only_contents  TYPE VARIT, "   
lt_vari_sel_desc  TYPE STANDARD TABLE OF RSVDESC, "   
lt_objects  TYPE STANDARD TABLE OF VANZ, "   
lv_report_not_existent  TYPE VANZ, "   
lv_report_not_supplied  TYPE VANZ, "   
lv_variant_doesnt_exist  TYPE VANZ, "   
lv_variant_locked  TYPE VANZ, "   
lv_selections_no_match  TYPE VANZ. "   

  CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'  "
    EXPORTING
         CURR_REPORT = lv_curr_report
         CURR_VARIANT = lv_curr_variant
         VARI_DESC = lv_vari_desc
         ONLY_CONTENTS = lv_only_contents
    TABLES
         VARI_CONTENTS = lt_vari_contents
         VARI_CONTENTS_L = lt_vari_contents_l
         VARI_TEXT = lt_vari_text
         VARI_SEL_DESC = lt_vari_sel_desc
         OBJECTS = lt_objects
    EXCEPTIONS
        ILLEGAL_REPORT_OR_VARIANT = 1
        ILLEGAL_VARIANTNAME = 2
        NOT_AUTHORIZED = 3
        NOT_EXECUTED = 4
        REPORT_NOT_EXISTENT = 5
        REPORT_NOT_SUPPLIED = 6
        VARIANT_DOESNT_EXIST = 7
        VARIANT_LOCKED = 8
        SELECTIONS_NO_MATCH = 9
. " RS_CHANGE_CREATED_VARIANT




ABAP code using 7.40 inline data declarations to call FM RS_CHANGE_CREATED_VARIANT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single REPORT FROM RSVAR INTO @DATA(ld_curr_report).
 
 
 
"SELECT single VARIANT FROM RSVAR INTO @DATA(ld_curr_variant).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!