R3_IMPORT_JOBS

Use the R3_IMPORT_JOBS script element to import jobs from SAP into an AE system as Job objects. The SAP system and client used are those to which the relevant SAP Agent has logged on and on which this script element runs.

Important!

  • Before using R3_IMPORT_JOBS, you must select the jobs to import using RE_GET_JOBS, see R3_GET_JOBS. All selected SAP jobs are then loaded into the AE system as Job objects. The import fails if no jobs are selected beforehand.

  • You can create Workflow objects and Login objects for the imported jobs using the LOGIN* and WORKFLOW parameters. The jobs are inserted into the created workflows and dependencies are set in the workflow properties (DEPENDENCY*=). Workflows can be created for all jobs or only for jobs with multiple steps.

Within parameter values, you can use placeholders that start and end with a % character. The following placeholders are available:

  • %SID% — The ID of the SAP system to which the agent is connected

  • %CLIENT% — The number of the SAP client to which the CPIC user has logged on

  • %JOBNAME% — The name of the job in the SAP system

  • %USER% — The name of the SAP user

  • %STEP% — The name of the job step

Note: Parameter names are not case sensitive.

Interface: AE and Standard

Syntax

R3_IMPORT_JOBS [SINGLE_JOBS=...][,WORKFLOWS=...][,JOB_NAME=...][,LOGIN_NAME=...][,WORKFLOW_NAME=...][,EXTENSION=...][,LOGINS=...][,HOST=...][,QUEUE=...][,DEPENDENCY_STATE=...][,DEPENDENCY_ELSE_ACTION=...][,DEPENDENCY_ELSE_ALARM=...][,EXT_COMMAND=...][,EXT_PROGRAM=...][,LOGIN_FOLDER=...][,JOB_FOLDER=...][,WORKFLOW_FOLDER=...][,OVERRIDE=...][,JOB_TEMPLATE=...][,WORKFLOW_TEMPLATE=...]

Parameters

Parameter Description Format Allowed Values Default Value
SINGLE_JOBS=
(Optional)
Controls whether a separate Job object is created for each job step Script literal or AE name
  • YES — A separate Job object is created for each R3_* function
  • NO — The created Job objects can include multiple R3_* functions
YES
WORKFLOWS=
(Optional)
Controls whether Workflow objects are created for the imported jobs Script literal or AE name
  • "" — No Workflow objects are created
  • 1 — Workflows are created for all imported jobs
  • 2 — Workflows are created only for jobs with multiple steps
""
JOB_NAME=
(Optional)
Naming convention for the created Job objects. Supports placeholders such as %SID%, %CLIENT%, and %JOBNAME%. Script literal or AE name n.a. JOBS.%SID%.%CLIENT%@%JOBNAME%
LOGINS=
(Optional)
Controls whether Login objects are created Script literal or AE name
  • "" — No Login objects are created
  • 1 — Login objects are created using the agent name
  • 2 — Login objects are created using the wildcard character * instead of the agent name
""
LOGIN_NAME=
(Optional)
Naming convention for the imported Login objects. Supports placeholders such as %SID%, %CLIENT%, and %USER%. Script literal or AE name n.a. LOGIN.%SID%.%CLIENT%@%USER%
WORKFLOW_NAME=
(Optional)
Naming convention for the created Workflow objects. Supports placeholders such as %SID%, %CLIENT%, and %JOBNAME%. Script literal or AE name n.a. JOBP.%SID%.%CLIENT%@%JOBNAME%
EXTENSION=
(Optional)
Extension for the object name of jobs created per step.
Note: Only relevant when SINGLE_JOBS= is set to YES.
Script literal or AE name n.a. %STEP%
HOST=
(Optional)
Host attribute of the created jobs. Supports placeholders. Script literal or AE name n.a. %SID%
QUEUE=
(Optional)
Queue attribute of the created jobs Script literal or AE name n.a. CLIENT_QUEUE
DEPENDENCY_STATE=
(Optional)
Expected status defined in the workflow job properties (dependencies).
Note: Only relevant when workflows are being created.
Script literal or AE name n.a. ANY_OK
DEPENDENCY_ELSE_ACTION=
(Optional)
Else action for the job dependencies within the workflow (task properties).
Note: Only relevant when workflows are being created.
Script literal or AE name
  • "" — Uses the value from the workflow template
  • ABORT — Cancels the task and the workflow
  • BLOCK — The workflow blocks at the relevant task
  • BLOCK_ABORT — The workflow blocks at the task and signals an abort to any superordinate workflow
  • SKIP — The task is skipped
""
DEPENDENCY_ELSE_ALARM=
(Optional)
Name of an object to run if the job dependencies in the workflow are not fulfilled (task properties).
Note: Only relevant when workflows are being created.
Script literal or AE name n.a. n.a.
EXT_COMMAND=
(Optional)
Controls whether external command steps are included in the import Script literal or AE name
  • NO — External command steps are not included
  • YES — External command steps are included
NO
EXT_PROGRAM=
(Optional)
Controls whether external program steps are included in the import Script literal or AE name
  • NO — External program steps are not included
  • YES — External program steps are included
NO
LOGIN_FOLDER=
(Optional)
Path of the folder in the AE client where the created Login objects are stored Script literal or AE name n.a. <No Folder>
JOB_FOLDER=
(Optional)
Path of the folder in the AE client where the created Job objects are stored Script literal or AE name n.a. <No Folder>
WORKFLOW_FOLDER=
(Optional)
Path of the folder in the AE client where the created Workflow objects are stored Script literal or AE name n.a. <No Folder>
OVERRIDE=
(Optional)
Controls whether existing objects are overwritten Script literal or AE name
  • YES — Existing objects are overwritten
  • NO — Objects with the same name are not replaced
YES
JOB_TEMPLATE=
(Optional)
Name of an SAP Job object to use as the basis for job creation Script literal or AE name n.a. JOBS.SAP
WORKFLOW_TEMPLATE=
(Optional)
Name of a Workflow object to use as the basis for workflow creation Script literal or AE name n.a. JOBP

Examples

The following example selects all SAP jobs whose names start with TEST and imports them into the AE system.

R3_GET_JOBS NAME="TEST*",USER="MEIER"

R3_IMPORT_JOBS JOB_NAME='JOBS.UC4.%JOBNAME%.%STEP%'

See also: