R3_IMPORT_JOBS

Use the R3_IMPORT_JOBS script function to import jobs from SAP to an 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.

Important!

  • Before using the R3_IMPORT_JOBS script function, you must select the jobs to be imported with the R3_GET_JOBS script element. All selected SAP jobs are then loaded into the AE system in the form of Job objects. The loading process fails if you do not select jobs before you use R3_IMPORT_JOBS. For more information, see R3_GET_JOBS.

  • You can create Workflow objects and Login objects for the jobs. You can manipulate this behavior with he LOGIN* and WORKFLOW parameters. The jobs are inserted in the created workflows and afterwards, the dependencies are set in the workflow properties (DEPENDENCY*=). You can either create workflows for all jobs or for jobs that include several steps.

Notes:

  • 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. The following placeholders are available for parameter values:

    • %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.
  • You can use uppercase and/or lowercase letters, parameters 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

  • R3_IMPORT_JOBS
    Imports SAP jobs to an AE system

  • SINGLE_JOBS=
    (Optional) Defines 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)
      A separate Job object is created for each R3_* function

    • NO
      The created Job objects can include several R3_* functions.

  • WORKFLOWS=
    (Optional) This parameter creates workflows for the imported jobs.
    Format: script literal or AE name
    Allowed values:

    • "" (default)
      No Workflow objects are created
    • 1
      Workflows are created for all imported jobs
    • 2
      Workflows are only created for jobs that include several steps
  • JOB_NAME=
    (Optional) Defines the naming convention for the created Job objects
    Format: script literal or AE name
    Default value: JOBS.%SID%.%CLIENT%@%JOBNAME%

  • LOGINS=
    (Optional) Creates Login objects
    Allowed values:

    • "" (default)
      No Login objects are generated
    • 1
      Login objects are created. The name of the agent is used in the object.
    • 2
      Creates Login objects. The wildcard character "*" is used in the object instead of the agent name.
  • LOGIN_NAME=
    (Optional) Defines the naming convention for the imported Login objects
    Format: script literal or AE name
    Default value: LOGIN.%SID%.%CLIENT%@%USER% 

  • WORKFLOW_NAME=
    (Optional) Defines the naming convention for the created Workflow objects
    Format: script literal or AE name
    Default value: JOBP.%SID%.%CLIENT%@%JOBNAME%

  • EXTENSION=
    (Optional) Defines an extension for the object name of jobs that are created per step
    Note: This parameter is only relevant if the parameter SINGLE_JOBS is set to YES.
    Format: script literal or AE name
    Default value: %STEP%

  • HOST=
    (Optional) Defines the host attribute of the created jobs
    Format: script literal or AE name
    Default value: %SID%

  • QUEUE=
    (Optional) Defines the queue attribute of the created jobs
    Format: script literal or AE name
    Default value: CLIENT_QUEUE

  • DEPENDENCY_STATE=
    (Optional) Defines the expected status that should be entered within the workflow in the job properties (dependencies).
    Note: This parameter is only relevant for the creation of workflows.
    Format: script literal or AE name
    Default value: ANY_OK

  • DEPENDENCY_ELSE_ACTION=
    (Optional) Defines an else action for the dependencies of the job within the workflow (task properties)
    Note: This parameter is only relevant for the creation of workflows.
    Format: script literal or AE name
    Allowed values:

    • ""
      The value of 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 sends a signal that it will abort to a superordinate workflow (if available)
    • SKIP
      The task is skipped
  • DEPENDENCY_ELSE_ALARM=
    (Optional) Defines the name of an object that should run if the dependencies of the job in the workflow are not fulfilled (task properties)
    Note: This parameter is only relevant for the creation of workflows.
    Format: script literal or AE name

  • EXT_COMMAND=
    (Optional) This parameter includes external command steps.
    Format: script literal or AE name
    Allowed values:

    • NO (default)
      Do not include
    • YES
      Include
  • EXT_PROGRAM=
    (Optional) This parameter includes external program steps.
    Format: script literal or AE name
    Allowed values:

    • NO (default)
      Do not include
    • YES
      Include
  • LOGIN_FOLDER=
    (Optional) Defines 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=
    (Optional) Defines 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=
    (Optional) Defines the path of the folder in the AE client in which you want to store the created Workflow object
    Format: script literal or AE name
    Default value: <No Folder>

  • OVERRIDE=
    (Optional) Overwrites existing objects
    Format: script literal or AE name
    Allowed values:

    • YES (default)
      Objects are overwritten
    • NO
      Objects of the same name are not replaced
  • JOB_TEMPLATE=
    (Optional) Name of an 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=
    (Optional) 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

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: