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]

Syntax

Description/Format

REP[ORT]=

Name of the report.
Format: script literal

VAR[IANT]=

Name of the variant.
Format: script literal

TEXT=

Variant short text.
Format: script literal

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.
Format: script literal

Allowed values: "YES" and "NO" (default value)

"YES" - Only the CPIC user can modify the variant.
"NO" - There are no limitations to variant modifications.

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:

  • R3_SET_SELECT_OPTION - Defines the selection criteria.
  • R3_CREATE_VARIANT - Creates a variant.
  • R3_ACTIVATE_REPORT - Executes the report with the above 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

    About SAP JCL