Start of Content Area

Function documentation Starting External Commands and Programs  Locate the document in its SAP Library structure

This section describes special procedures for starting service programs or daemons that are to remain active in the target system and multiple cascading programs.

Starting Service Programs and Daemons

Once you’ve used the background processing system to start service programs, such as daemons in UNIX systems, they remain active rather than terminating and returning to the SAP background control program as other programs do.

When you start a service program, you should use the control flag setting Job to wait for external program to end (found in Transaction SM36, the control flags function in the Job Step Definition) when you schedule the job. Since the external program isn’t supposed to immediately terminate, you should also change the default Wait setting. The SAP control program will then terminate as soon as it has started the external program. You can continue to get trace data back from the control program up until the time that it starts the external program.

Starting Cascading Programs

Cascading programs run one or more other external programs. However, you may not be able to obtain useful feedback from the initial external program. If the external program terminates without waiting for the other programs, the return code in the job log provides no useful information on the additional processing done in the target system. You may be able to remedy this in a couple of ways:

Example 

For example, during data transfer into your SAP System, you could start each external data transfer program from a script or small control program that waits for the transfer program to terminate.

Upon termination of the transfer program, the control program checks the return code and issues the appropriate event to the SAP System with the SAP program SAPEVT. You can have the background processing system use the event to start the ABAP program that processes the transferred data.

 

See also:

 

External Commands and External Programs

Prerequisites for Running External Programs

Defining External Commands

Events in Background Processing Explained