R3_MODIFY_VARIANT
Use the R3_MODIFY_VARIANT script element to modifys variant entries. You can define the type of the variant either as a parameter or as a selection option. Parameter values and selection options in SAP Basis versions below 7.10 and / or XBP versions below 3.0 are limited to a maximum length of 45 characters. SAP Basis version 7.10 / XBP versions 3.0 and above allow up to 132 characters which complies with the limit of the SAP GUI. Non-specified parameters remain unchanged.
Important!
- You cannot use R3_MODIFY_VARIANT to change dynamic variant selections in logical databases.
- If the ABAP program to which the variant belongs uses a logical database such as PSJ, modifying the variant may cause errors in the SAP system. The reason behind this is that the selection screen of the logical database in the SAP system is dynamically modified. Copy an original variant and modify the copy in such a case.
Transaction: SA38
Interface: AE and Standard
This page includes the following:
Syntax with Parameters (KIND=P)
R3_MODIFY_VARIANT
REPORT=...
,VARIANT=...
,SELNAME=...
,KIND=P
,LOW=...
[,VERIFY=...]
[,DELAY=...]
[,MERGE=...]
Parameters
-
R3_MODIFY_VARIANT
Modifies variant entries - REP[ORT]=
Name of the report
Format: name or script literal - VAR[IANT]=
Name of the variant
Format: name or script literal - SELN[AME]=
Name of the parameter
Format: name or script literal - KIND=P
Parameter type = parameter
Format: name or script literal
Note: In the report, it is queried with PARAMETERS - LOW=
Parameter value
Format: name or script literal - VERIFY=
(Optional) Defines whether modifications that were made in the variant are verified
Format: name or script literal
Allowed values:- NO (default)
The modified variant is not verified. - YES
The modified variant is verified
- NO (default)
- DELAY=
(Optional) The time span in seconds that the agent waits after the variant has been modified. After this time span, the buffer synchronization between application servers should be complete if the SAP system runs with multiple application servers.
Format: number
Default: 0 - MERGE=
Merges parameters
Allowed values:- YES (default)
Variant parameters are merged - NO
The initial values of the variant parameters are used.
- YES (default)
Examples
R3_MODIFY_VARIANT REPORT=RSUSR002,VAR=SAP_STANDARD,SELN=TCODE,KIND=P,LOW='SE01'
Syntax with Selection Options (KIND=S)
R3_MODIFY_VARIANT
REPORT=...
,VARIANT=...
,SELNAME=...
,KIND=S
,LOW=...
[,HIGH=...]
[,SIGN=...]
[,OPTION=...]
[,MODE=...]
[,VERIFY=...]
[,DELAY=...]
[,MERGE=...]
Parameters
-
R3_MODIFY_VARIANT
Modifies variant entries - REP[ORT]=
Name of the report
Format: name or script literal - VAR[IANT]=
Name of the variant
Format: name or script literal - SELN[AME]=
Name of the parameter
Format: name or script literal - KIND=S
Parameter type = selection option
Format: name or script literal
Note: In the report, it is queried with SELECT-OPTIONS
- LOW=
Parameter value
Format: name or script literal - HIGH=
(Optional) Value of the parameter. Only use this parameter together with OPTION=BT or NB (Interval)
Format: name or script literal - SIGN=
(Optional) Identifier
Format: name or script literal
Allowed values:- I (default)
Include - E
Exclude
- I (default)
- OPTION=
(Optional) Option that is used for the selection. You can define several individual values for a selection option. The order that is kept within the variant does not necessarily reflect the order of your definitions.
Format: name or script literal
Allowed values:- EQ (default)
Equal - NE
Not equal - GT
Greater than - GE
Equal or greater than - LT
Less than - LE
Equal or less than - CP
Pattern comparison, wild card characters are allowed - NP
Exclude patterns - BT
Within interval. You must also define the HIGH parameter - NB
Outside interval. You must also define the HIGH parameter
Note: If a selection option has been modified, its value range can only be changed with a new modification. You cannot reset it to its initial value.
- EQ (default)
- MODE=
Adds or modifies a selection term. You can create multiple selections with it.
Format: name or script literal
Allowed values:- REPLACE (default)
- APPEND
When you use MODE=APPEND, the parameter MERGE= is automatically set to YES.
- VERIFY=
(Optional) Defines whether modifications that were made in the variant are verified
Format: name or script literal
Allowed values:- NO (default)
The modified variant is not verified. - YES
The modified variant is verified
- NO (default)
- DELAY=
(Optional) The time span in seconds that the agent waits after the variant has been modified. After this time span, the buffer synchronization between application servers should be complete if the SAP system runs with multiple application servers.
Format: number
Default: 0 - MERGE=
(Optional) Merges parameters
Allowed values:- YES (default)
Variant parameters are merged - NO
The initial values of the variant parameters are used.
- YES (default)
Examples
Select all users whose names start with "B".
R3_MODIFY_VARIANT REP=RSUSR002,VAR=SAP_STANDARD,SELN=USER,KIND=S,LOW='B*',SIGN=I,OPTION=CP
Select all users except for those whose names are between "USER100" and "USER199".
R3_MODIFY_VARIANT ...,SELN=USER,KIND=S,LOW='USER100',HIGH='USER199',SIGN=I,OPTION=NB
Select company code 10 and 71-77 - multiple selection.
R3_MODIFY_VARIANT REP=RF...,VAR=v1,SELN=BUKRS,KIND=S,LOW='10',SIGN=I,OPTION=EQ,MODE=R
R3_MODIFY_VARIANT REP=RF...,VAR=v1,SELN=BUKRS,KIND=S,LOW='71',HIGH='77',SIGN=I,OPTION=BT,MODE=A
See also: