In a cloud environment (software-as-a-service), SAP is responsible to setup, run and monitor the systems. We can only reduce costs of operations if we avoid manual activities for system operations.In order to keep the system up and running, several technical background jobs have to run on a regular basis. We are calling a job a technical job if doesn’t require any customer interaction and can be scheduled automatically.
Technical jobs don’t have a Fiori UI. In contrast to classical jobs they are not scheduled via sm36 but they are scheduled automatically based on the job repository.
In this blog, we will be going through the steps to create a Technical Job for a report successfully which will run in the cloud system daily.
The execution of a technical job requires the following main attributes (detailed description see below):
- Report name
Name of the ABAP report that shall be executed
- Report variant (optional)
Name of transportable ABAP report variant (system variant). If the report can run without input parameters then variant doesn’t have to be specified. In case input parameters are required, these have to be defined during implementation time by a system variant
- Execution terms: Recurrence
You can choose between time-based and event-based execution. In most times time-based recurrence will be required, e.g. daily execution.
- Execution terms: Additional attributes
The repository contains additional attributes (e.g. execution in system client vs. application client), some are for future use (e.g. Health checks).
Creation of Technical Job:
- Create a new Job Definition in SE80 from your package. Go to Menu Create->More….->Technical Job Definition.(Naming Convention: SAP_< Area>_<Name>,
Example: SAP_CEI_xxx, SAP_FIN_GL_xxx, SAP_SCM_xxx, …)
- Specify the package for the Technical Job. Typically this should be the same package as the one for the report that needs to be executed in the job.
- In the Technical Job Definition Page, Go to Overview section.
- Specify the User Name under which the report will be executed. If nothing is entered here (DEFAULT), the report will be executed with user SAP_SYSTEM (authorizations: SAP_ALL).
- Specify the Report Name of the SE38-report that should be executed.
- Specify the name of report variant (optional).
- In the Execution Terms Section, Select Run job:
Administration Client – Indicates if job should run in administration client 000.
Business Client – Indicates if job should run in business client 100 for customer like systems, all clients <> 000 for internal systems.
- Select the Application attributes:
Scope Dependent – Specifies if job should only be executed if specific content has been activated. If the flag is set, the job is only executed, if it’s included in the corresponding customizing table.
Use Scope Control Class (Optional) – Specifies the class which is processed in order to set the scoping flag.
Maintenance Mode – Specifies if job should run in maintenance mode also.
- Specify the Runtime Attributes:
Maximum runtime – Relevant for future health-check.
Reaction on termincation – Specifies health-check behavior in case of job termination.
- Specify the Recurrence as time based or event based.
- Save and Activate the Technical Job.
As the job is flagged as scope dependent, we need to deliver an entry for table STJR_JOBD_SCOPE with the SET content.
Lastly, You can check the status of the technical job implemented via transaction – SJOBREPO.