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
- Log on to the SAP NetWeaver Administrator through its web interface
- Select the Job tab
- Click the link Java Scheduler -> External Scheduler
- Add a new entry in the list of registered external Java Schedulers
- Complete the fields. Specify the Automation Engine in the name and the description
- Click Add
To create a Connection object in the AE:
- Log on to system client 0
- Create a new Connection (CONN) for SAP
- In the Connection section of this object, select the connection type Internet
- 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
- Save and close the Connection object
To configure the SAP Agent in the AE:
- Open your SAP Agent object and click the Agent page
- In the SAP Connections section, select the Connection object in the Java Scheduler field
- Click Save and close the Agent object
- 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: