Automation Engine Script Guide > AE JCL for Applications > SAP > R3_IMPORT_JOBS

R3_IMPORT_JOBS

Imports jobs from SAP to an AE system.

Interface:AE and Standard

Syntax

R3_IMPORT_JOBS

Within the values of certain parameters, you can enter specific placeholders that start and end with a % character (such as %SID%). The default value of the parameter indicates whether you can use placeholders and which ones. You will find a list of placeholder explanations below the syntax table.

Syntax

Description/Format

SINGLE_JOBS= 

The behavior that decides whether a Job object should be created for each job step.
Format: script literal or AE name

Allowed values: "YES" (default value) or "NO"
"YES" - A separate Job object will be created for each R3_* function.
"NO" - The created Job objects can include several R3_* functions.

WORKFLOWS= 

This creates workflows for the imported jobs.
Format: script literal or AE name

Allowed values: "" (default value), "1" or "2"
"" - No Workflow objects will be created.
"1" - Workflows will be created for all imported jobs.
"2" - Workflows will only be created for jobs that include several steps.

JOB_NAME= 

The naming convention for the created Job objects.
Format: script literal or AE name

Default value: JOBS.%SID%.%CLIENT%@%JOBNAME%

LOGINS=

This creates Login objects.

Allowed values: "" (default value), "1" or "2"
"" - No Login objects will be generated.
"1" - Login objects will be created. The name of the agent is used in the object.
"2" - Creating Login objects. "*" is used in the object instead of the agent name.

LOGIN_NAME= 

The naming convention for the imported Login objects.
Format: script literal or AE name

Default value:
LOGIN.%SID%.%CLIENT%@%USER% 

WORKFLOW_NAME=

The naming convention for the created Workflow objects
Format: script literal or AE name

Default value: JOBP.%SID%.%CLIENT%@%JOBNAME%

EXTENSION=

An extension for the object name of jobs that are created per step.
Format: script literal or AE name

This parameter is only relevant when the parameter SINGLE_JOBS is set to YES.

Default value: %STEP%

HOST=

The host attribute of the created jobs.
Format: script literal or AE name

Default value:
%SID%

QUEUE=

Queue attribute of the created jobs
Format: script literal or AE name

Default value: CLIENT_QUEUE

DEPENDENCY_STATE=

The expected status that should be entered within the workflow in the job properties (dependencies).
Format: script literal or AE name

This is only relevant for the creation of workflows.

Default value: ANY_OK

DEPENDENCY_ELSE_ACTION=

An else action for the dependencies of the job within the workflow (task properties).
Format: script literal or AE name

This is only relevant for the creation of workflows.

Allowed values: "" (default value), "ABORT", "BLOCK", "BLOCK_ABORT" or "SKIP"
"" - The value of the workflow template.
"ABORT" - Cancels the task and the workflow.
"BLOCK" - The workflow will block at the relevant task.
"BLOCK_ABORT" - The workflow will block at the task and sends a signal that it will abort to a superordinate workflow (if available)
"SKIP" - The task will be skipped.

DEPENDENCY_ELSE_ALARM=

The name of a object that should run when the dependencies of the job in the workflow are not fulfilled (task properties).
Format: script literal or AE name

This is only relevant for the creation of workflows.

EXT_COMMAND=

This includes external command steps.
Format: script literal or AE name

Allowed values: "YES" (include) or "NO" (do not include, default value)

EXT_PROGRAM=

This includes external program steps.
Format: script literal or AE name

Allowed values: "YES" (include) or "NO" (do not include, default value)

LOGIN_FOLDER=

The path of the folder in the AE client in which you want to store the created Login objects
Format: script literal or AE name

Default value:
<No Folder>

JOB_FOLDER=

The path of the folder in the AE client in which you want to store the created Job objects.
Format: script literal or AE name

Default value: <No Folder>

WORKFLOW_FOLDER=

The path of the folder in the AE client in which you want to store the created Workflow objects.
Format: script literal or AE name

Default value: <No Folder>

OVERRIDE=

This overwrites existing objects.
Format: script literal or AE name

Allowed values:"YES" (default value) or "NO"
"YES" - Objects will be overwritten.
"NO" - Objects of the same name will not be replaced.

JOB_TEMPLATE=

The name of a SAP Job object that should be used as a basis for the job creation.
Format: script literal or AE name

Default value: "JOBS.SAP"

WORKFLOW_TEMPLATE=

The name of a Workflow object (standard workflow) that should be used as a basis for the workflow creation.
Format: script literal or AE name

Default value: "JOBP"

Placeholders for parameter values:

You can use uppercase and/or lowercase letters, the parameters are not case sensitive.

Comments

You can use this script element to take over jobs from SAP to the AE system in the form of Job objects. The SAP system and the SAP client are used to which the relevant SAP agent has logged on and on which the script element R3_IMPORT_JOBS runs.

Before you use the function R3_IMPORT_JOBS, you must select the jobs that should be imported using the script element R3_GET_JOBS . All SAP jobs that have been selected with R3_GET_JOBS will be loaded to the AE system in the form of Job objects. The loading process will fail when you do not select jobs before you use R3_IMPORT_JOBS.

You can also create Workflow objects and Login objects for the jobs. You can manipulate this behavior by using the parameters LOGIN* and WORKFLOW (see above).

The jobs are inserted in the created workflows and afterwards, the dependencies are set in the workflow properties (parameter DEPENDENCY*=). You can either create workflows for all jobs or for jobs that include several steps.

Examples

The following example selects all jobs in SAP whose names start with "TEST" and it loads them to the AE system.

R3_GET_JOBS NAME="TEST*",USER="MEIER"
R3_IMPORT_JOBS JOB_NAME='JOBS.UC4.%JOBNAME%.%STEP%'

 

See also: