Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
jochen_steinmetz
Explorer

How to generate child jobs

The function modules JOB_OPEN, JOB_SUBMIT and JOB_CLOSE make sure jobs can be scheduled out of ABAP reports. But what happens if these reports are part of a job themselves? In those cases we talk about the parent child relationship between background jobs. Applications using that mechanism do this to optimize load distribution and minimize run times by means of parallelization. As a result one parent process can have a big number of child processes. So it is even more challenging to control the whole set of jobs.

How to identify parent child relationships

In CCMS (using transaction SM37) the parent child relationship between jobs cannot be displayed. Let us take a look at the following example taken from SAP Note 438038 where the report RSGENINVLAS (here running in job LOAD_GENERATION) generates one or more child jobs running report RSPARAGENER8 (running in job RSPARAGEN8). From SM37 the parent-child relationship cannot be derived:

"

Starting with Scheduling job interface there are function modules which allow the identification of child jobs per parent job:
  • BAPI_XBP_JOB_STATUS_GET: returns the parent/child status per single job
  • BAPI_XBP_JOB_CHILDREN_GET : returns a list of all child jobs per single parent job.

In the screenshot below the function module BAPI_XBP_JOB_CHILDREN_GET is called with parent job LOAD_GENERATION and returns job RSPARAGENER8 as child.

How SAP Central Process Scheduling by Redwood (SAP CPS) uses this information

Let us take the above example and see how SAP CPS copes with this parent child relationship. First let us schedule the report RSGENINVLAS as SAP CPS job SDN_SAMPLE_PARENT_CHILD:

"

At runtime of that job it looks like any other regular job:

" Once the child job is started SAP CPS automatically links both jobs and displays them in a hierarchy:

"

Note the different status. The remote status of the parent job (visible in SM37) is “Finished” but the SAP CPS status is “Waiting” since the child job is still in status “Running”. Note also that the Gantt chart already assumes a runtime for the child process(es).

 Once the child job is finished the situation looks like that:

"

Both jobs receive the remote status “Finished” and the job status “Completed”.

What do I need to configure in to use that feature?

All information is available in the Scheduling and in the Scheduling (search for “parent”). The main activity is to activate XBP 2.0 in the SAP system (report INITXBP2). SAP Note 604496 details out the system requirements.

2 Comments