Creates a new variant.
Transaction: SA38
Interface: Standard
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. 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. |
Comments
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 R3_MODIFY_VARIANT or R3_SET_SELECT_OPTION to add entries to these variants. Keep the following order when you call functions if a report should be processed with a new variant:
If you want to recreate a variant that already exists, you can delete it by using the function R3_DELETE_VARIANT and then recreate it.
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 LoginAnmeldedaten für Zielsysteme. Auch ein eigener Objekttyp in der Automation Engine. object. SAP system variants (CUS& and SAP&) can also be created. In this case, the variant's client is automatically set to 0000.
XBP 2.0 or above (SAP Release 4.6+) is required for using R3_CREATE_VARIANT.
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: