SAP Jobs

This subtype of the JOBS object defines SAP-specific processing steps to be carried out in a target system. Like all other job objects (JOBS), SAP jobs can run independently or they can be added to a group (JOBG) or to a workflow.

Three templates are available for defining SAP Jobs, namely:

The pages for SAP_PI and SAP_JAVA job types are identical and contain only part of the fields available on the SAP_ABAP page. The later is depicted in the screenshot:

SAP jobs can contain one or more sub jobs; you entered the script to be processed wit these jobs in the Child Post Process page, see SAP Jobs - Child Processes.

The script editor on the Process page contains an additional function in the case of SAP jobs, namely the possibility to build scripts using pre defined sets of commands via forms. See SAP Forms.

Take a look at Creating and Executing an SAP ABAP Job from within the Automation Engine for an example of how to set up your system to execute an SAP job from within the Automation Engine.

Prerequisites to Start SAP Jobs from the Automic Web Interface

Thanks to the integration with SAP systems, you can execute jobs in SAP directly from within the Automation Engine.

Your Automation Engine system is connected to SAP via the agent, which interprets and transforms the commands sent by the client so that SAP understands them. This means that the only prerequisites your system must meet to be able to create jobs via the Automic Web Interface and execute them in the SAP client are providing the necessary connection and login data, namely:

  1. The agent binaries are installed and its INI file is configured to connect to the Automation Engine.
  2. The SAP Agent is defined
  3. At least one Connection (CONN) object provides the necessary data for connecting the agent to the SAP application server (the user and his/her login data). See Connection Objects.
  4. A Login (LOGIN) object is defined that provides the necessary credentials for the job to be executed. See Login Object (LOGIN).

Please refer to the Technical Connection chapter for detailed information.

SAP BW: Data for Chain Steps Published as Script Variables

In SAP jobs with BW chains, the agent creates the following script variables for each child process. These variables and their values are available automatically in the (child) post process window and are displayed in the Details Window of the tasks.

Key Variable Name Value On Chain Level Value On Step Level Value On Step Job Level
LOGID &@sap_bw_logid# "Logging Identifier of the Process Chain (e.g DAUDN8Z697MBBFNJ4Q75JS80C)." "Logging Identifier of the Process Chain (e.g DAUDN8Z697MBBFNJ4Q75JS80C)." "Logging Identifier of the Process Chain (e.g DAUDN8Z697MBBFNJ4Q75JS80C)."
NAME &@sap_bw_name# Technical Name of the Process Chain (e.g. Z_NI) Technical Name of the Process Chain (e.g. Z_NI) Technical Name of the Process Chain (e.g. Z_NI)
ID &@sap_bw_id# empty "Technical Identifier of the Step (e.g. DAUDN966N6KGDOWMEAPP5TFV0)" "Technical Identifier of the Step (e.g. DAUDN966N6KGDOWMEAPP5TFV0)"
STEPNAME &@sap_bw_stepname# empty Technical Name of the Step (e.g. RSM04000_ALV) Technical Name of the Step (e.g. RSM04000_ALV)
TYPE &@sap_bw_type# empty Process Step Type (e.g. ABAP). Process Step Type (e.g. ABAP).
STATUS &@sap_bw_status# empty Job Status of the Chain Step (e.g. F) Job Status of the Chain Step (e.g. F)
JOBNAME &@sap_bw_jobname# empty empty SAP Job Name of the job (e.g. BI_PROCESS_TRIGGER)
JOBCOUNT &@sap_bw_jobcount# empty empty SAP Job Count of the job (e.g. 13450100)
TYPE_TEXT &@sap_bw_type_text# "E_TYPE_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Processkette lokal)" "E_TYPE_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Startprocess)" "E_TYPE_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Startprocess)"
VARIANT_TEXT &@sap_bw_variant_text# "E_VARIANT_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Chain with nested chain)" "E_VARIANT_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Startni)" "E_VARIANT_TEXT of RSPC_API_PROCESS_GET_INFO (e.g. Startni)"
RESTART_COUNT &@restart_count# "number of restarts by BW_SET_CONSTRAINT, or 0 if not yet accessible" "number of restarts by BW_SET_CONSTRAINT, or 0 if not yet accessible" "number of restarts of the parent by BW_SET_CONSTRAINT, or 0 if not yet accessible"
RESTART_COUNT_MAX &@sap_bw_max_restart_count# "max number of restarts BW_SET_CONSTRAINT, or 0 if not yet accessible" "max number of restarts by BW_SET_CONSTRAINT, or 0 if not yet accessible" "number of restarts of the parent by BW_SET_CONSTRAINT, or 0 if not yet accessible"

To Define an SAP Job

  1. ClosedDefine the required values in the Start Parameters Section

    The following table describes the available options:

    Field Description
    Language

    Language used in SAP.

    The code of the language you select here is passed on to SAP in uppercase letters. Please, keep this in mind when you set the language using the script (SAP_LANG attribute, :PUT_ATT script element)

    Job Name

    Name of the job in SAP. It can contain up to 32 characters.

    If no job name is specified here, the default format is used by default:

    UC_JOB_RUN#

    Job Class This value specifies the priority that will be applied for handling jobs in SAP.
    Target System

    No specification or target system in SAP.

    Up to SAP Basis Release 4.0: This is the name of the host on which the job should be executed. An SAP instance with work processes for batch processing must run on this host.

    SAP Basis Release 4.5 and later: This is the name of an SAP Server in the form "<host name>_<system ID>_<system no>". For example: "host31_T40_00". This SAP Server must contain work processes for batch processing.

    SAP recommends to not use these parameters because they invalidate "Workload Balance" for batch processes.

    Delete Job
    • Do not delete job

      The job is not deleted after it has been executed.

    • Always delete job in CCMS after completion

      The job is deleted in SAP after it has been executed. Deletion takes place in the CCMS (Computing Center Management System) which is a special application area for administrators.

    • Only delete job from CCMS if no error occurred

      The job is deleted in SAP after it has been executed only if the execution was successful and error-free.

    Login Override

    Override agent login information with job login

    The SAP job runs using the login credentials configured in the Login Object (LOGIN) object that you select in the Attributes Pages of Executable Objects. This function overrides the login information used for the agent.

    Start Mode
    • As soon as possible, possible fallback to SAP system

      The system attempts to start the job as soon as possible.

      If there is no SAP background task available, the job is scheduled in the SAP system.

    • Immediately, abort if no SAP background task is available

      The system attempts to start the job immediately.

      The job aborts if there is no SAP background task (Type BTC) available.

  2. ClosedDefine the required values in the Spool List Recipient Section

    The following table describes the available options:

    Field Description
    Recipient Receiver of the message.
    Address Type Type of address.
    Report Send Status* This report returns the transmission status. The sender is informed whether the addressee has received the message.
    Report Status by Mail* The report on the transmission status is sent by e-mail.
    Copy The recipient obtains a copy of the message for information purposes.
    Blind Copy The recipient obtains a copy of the message that cannot be read by any other user.
    Send Express Express sending. As a result, a dialog is displayed in which you can switch to the inbox.
    No Printing* Printing the document is not allowed.
    No Forwarding The recipient is not allowed to forward the document to other users.

    * The following SAP support packages are required for using the options No printing, Report send status and Report status by mail:

    • for 4.6C - SAPKB46C52
    • for 6.20 - SAPKB62059
    • for 6.40 - SAPKB64017
    • for 7.00 - SAPKB70008
  3. ClosedDefine the required values in the Job Report Section

    The following table describes the available options:

    Field Description
    Store to
    • Database: As soon as the job has been processed, the process log available on the target system is stored in the database.

      Job reports consist of:

      • the actual job report (LIST0SO)
      • the specification of the created spool file
      • the cover page with the selected parameters (if required)
    • File: The process log is stored as a file on the target system.

    You can select one option or both of them simultaneously.

    Generate

    Define when the operating system process log is written.

    • Always: The process log is always written.
    • On error only: The process log is written only when an error occurs, for example, when the job is canceled or aborted.
    Add

    These are optional reports retrieved from the SAP system. They are available for the SAP job but not for its children.

    • Agent log
    • Application logs
    • Spool directory
    • Step lists
    • Statistics
  4. ClosedCreate the scripts you need to process the SAP jobs.

    In addition to the Pre-Process Page and the Post-Process Page available for all Job objects, SAP jobs provide additional features that allow you to build functions that you can then execute in your SAP system directly from within the Automation Engine. See SAP Forms.

Next Steps

The list below tries to depict a possible road-map to define and work with Job objects and provides short descriptions of the actions you can take, additional information that can help you understand how they work and links to topics that further describe them:

  1. Define the job general settings, which include the following:

    • The basics, on the General Page.
    • If required, apply a Sync object to the job; You do so on the Sync Page.
    • On the Runtime Page specify the job runtime settings.
    • Fine-tune access rights at object level on the Authorization Page.
    • Specify the object Attributes on the Attributes Pages of Executable Objects.
    • Register the output files that will be produced when processing them on the Output Page.
    • To be able to carry out searches in those output files and, if required, perform follow-up actions, specify these settings on the Output-Scan Page.
    • You may want to use variables or prompts. You do so on the Variables & Prompts Pages.
    • You may want to define the settings to backup and restore a job task when included in a workflow. This is useful to recover the last successful status in case of failed processes. You do this on the Rollback Page.
    • The Version Management Page lists all the versions of an object and allows you to restore it to an older version in case of a misconfiguration.
    • Enter information on the job you are defining on the Documentation Page.
  2. Job objects (JOBS) have three pages on which you enter the scripts to be processed. They provide a number of convenience functions to help you with your work. If you enter scripts on all of them, they are processed in the following order:

    1. Pre-Process Page
    2. Process Pages
    3. Post-Process Page
    4. Child Post-Process (SAP and PeopleSoft only), see Child Post-Process Page.
  3. You can easily reuse code using Include Object (JOBI), which saves time and helps you keep your scripts consistent.
  4. Execute the job.

    There are multiple ways to do this that can be grouped as follows:

    • By a parent task.

      This is the case of jobs that are included in a parent object (for example a Workflow or a Group). When defining them, take into account that their activation time can be different from their start time; the latter usually depends on the parent object.

      See Superordinate Tasks (Parents).

    • Stand alone

      This is the case when the job is not part of a parent object or, even if it is, you execute it independently of its parent. You have three possibilities:

    When executable objects are processed, they go through the following four stages: 1. Activation, 2. Generation, 3. Processing and 4. Completion. Take a look at these topics to understand what happens with every processing stage.

  5. When processing jobs, the Automation Engine generates output files and reports that guarantee traceability and auditability. Have a look at the following topics to learn more about this:

  6. In the Process Monitoring perspective a number of functions are available, depending on the status of the job. See Working with Tasks.

See also: