Java

SAP Java Jobs allow you to handle jobs in the SAP Java Scheduler. To be able to work with them, the Java job definition must be deployed in the Java Scheduler. This deployment makes it visible for the SAP Agent.

This page includes the following:

Executing Jobs in Java Stack (JXBP)

You can use your AE system to start Java jobs through parameters. You can cancel jobs, include the logs in the job reports, or can monitor jobs through filters by using the Remote Task Manager (See Defining Remote Task Manager Objects). You must deploy the Java job definition in the Java Scheduler so that it becomes visible for the SAP Agent. Only then, you can use a Job object to generate an instance from an existing job definition.

Create an SAP Java Job object and select an SAP Agent plus a Login object. In the Job Settings section, you determine how to handle the child jobs as well as the job logs created in SAP.

The Job log section includes the following options:

  • Delete after x days

    Deletes the job log from the Java Scheduler after x days

  • Do not delete

    Does not remove the job log from the Java Scheduler

  • Use default settings

    The period after which the job log is deleted from the Java Scheduler depends on the settings you made in the job definition.

Notes:

  • An SAP Job object always belongs to exactly one SAP Java job definition.
  • The job log is always deleted together with the job instance.

Reports for Java Statistics

A processed SAP Job object can also contain a report (SJJI) which includes information about the Java job. Activate the extra reporting option on the SAP page of the Job definition. See Job Reports

Configuring the Connection

To create the external scheduler in SAP

  1. Log on to the SAP NetWeaver Administrator through its web interface
  2. Select the Job tab
  3. Click the link Java Scheduler -> External Scheduler
  4. Add a new entry in the list of registered external Java Schedulers
  5. Complete the fields. Specify the Automation Engine in the name and the description
  6. Click Add

To create a Connection object in the AE:

  1. Log on to system client 0
  2. Create a new Connection (CONN) for SAP
  3. In the Connection section of this object, select the connection type Internet
  4. In the Connection Parameter section, specify the connection data for the SAP Java Scheduler, and the user that you have used to define the Automation Engine as the external Scheduler
  5. Save and close the Connection object

To configure the SAP Agent in the AE:

  1. Open your SAP Agent object and click the Agent page
  2. In the SAP Connections section, select the Connection object in the Java Scheduler field
  3. Click Save and close the Agent object
  4. Restart the SAP Agent if it is currently running

Special Cases

  • In an environment with multiple nodes, the Java Scheduler jobs are processed on the node on which the Scheduler Service is active. If you deactivate this node, or if it fails, job processing continues on a different node.

  • If the agent loses its connection to the Java Scheduler while it is executing a job, it tries periodically to re-establish the connection. The job remains active in the AE system and obtains the status Waiting for remote system.

  • If the attempt to call the Java Scheduler results in an error, the job aborts and there is no report about the Java job statistics. The error is logged in the agent log of the Job object, and the log file of the SAP Agent. The job aborts with return code 403.

  • You cannot restart a job. The complete job always starts in the Java Scheduler because there is no AE JCL.

Return Codes

The following list shows the job return codes that reflect the corresponding SAP states

  • 0
    SAP status: COMPLETED. HOLD, RUNNING, SCHEDULED, STARTING, or UNKNOWN

  • 501
    SAP status: ERROR

  • 502
    SAP status: CANCELED

See also: