R3_CREATE_VARIANT
Creates a new variant.
Transaction:
SA38
Interface: Standard
Note: XBP 2.0 or above (SAP Release 4.6+) is required for using R3_CREATE_VARIANT.
Syntax
R3_CREATE_VAR[IANT]
REP[ORT]=...
,VAR[IANT]=...
[,TEXT=...]
[,PROTECTED=...]
Syntax |
Description/Format |
---|---|
REP[ORT]= |
Name of the report. |
VAR[IANT]= |
Name of the variant. |
TEXT= |
Variant short text. The text is written in the language that the administrator has defined in the agent's INI file. The language can also be defined in the job settings. In this case, they override the INI file specifications. Note: The variant's name is used as short text if you do not specify this parameter. |
PROTECTED= |
Protection against modifications. Allowed values: "YES" and "NO" (default value) "YES" - Only the CPIC user can modify the variant. |
AE automatically sets the attribute "Variant for background processing" when a variant is created. All other variant properties are set in the same way that properties are created in the SAP GUI.
The function R3_CREATE_VARIANT always creates variants without contents. Use one of the following script elements to add entries to the variants:
Keep the following order when you call functions if a report should be processed with a new variant:
Tip: To recreate a variant that already exists, use a script to delete the variant and then recreate. For more information, see R3_DELETE_VARIANT.
Important! The job aborts if an error occurs while the variant is being created.
The variant's client is automatically the one to which the SAP Agent has logged on because of its Login object. SAP system variants (CUS& and SAP&) can also be created. In this case, the variant's client is automatically set to 0000.
Example
The following example defines the value "17" for the parameter "MIN_AGE". This selection criterion is then used to create a variant.
R3_SET_SELECT_OPTION SELNAME='MIN_AGE',KIND='P',LOW='17',SIGN='I'
R3_CREATE_VARIANT REP=REPORT01,VAR=NEW,TEXT='New variant'
See also:
seealso