Definition
An ABAP program is a process type within the context of BW process chain maintenance.
Use
Use the ABAP Program process type if you want to use a simple, independent program in a chain or if you want to use a program scheduled by a user or another program in the background. You then have the option to schedule a program of your choice (ABAP report) in the process chain management, with or without program variants.
The scheduling options are as follows:
Specify the program name and variant under Program to be Called Up ® Program. The program is started when the event for the predecessor process was triggered.
The program is executed in the background on the same server on which the process chain is scheduled. The process chain waits until the program has finished before it continues with any successors.
Choose this option when your program is asynchronous.
An asynchronous process is also called a distributed process. Distributed processes are characterized as having different work processes involved in specific tasks. A program is asynchronous when it does not end the task which it started itself. In an asynchronous process, the process chain maintenance does not equate the end of the process with the end of the background process. The process status remains active.
In asynchronous processes, successor events are not automatically triggered.
You need to call the remote-enabled
Inform the function module of the process variant, with which your program is scheduled. To do this, you need to either hardcode the process variant in the program or transfer the process variant in a program variant You need the following lines in your program to do this:
PARAMETERS variant TYPE rspc_variant.

The process chain management does not recognize when your program terminates.
Therefore, when you re-start the chain, it will also terminate since the old run was not yet completed. To avoid this, you need to manually set the process to terminated in the chain log view in the process monitor (Process tab strip). Do this prior to starting again.
Choose this option when you want to start a program scheduled in the background. The program must be scheduled to wait for a background event. Enter the event and, if necessary, the parameter under Program to Call ® Scheduled Program.
This option allows you to execute a program on a different server in the same system.
For this option, you must schedule the program to be called up on the target server to wait for an event.
Under Called From, enter the Destination for the target system and enter the event and, if necessary, the parameter via Program to Be Called Up ® Scheduled Program.

This option is only available for target systems as of service API 3.0A.

We recommend that you write a local program, in which you synchronously call up a remote-enabled function module in the target system. Then choose the option Synchronous, Local. This allows you to monitor your process with the process chain maintenance.
You can write logs without much effort by issuing success messages. These protocols are displayed via the context menu for a process in the process chain maintenance log view. Choose Display Messages® Tab Strip Batch.

Error messages terminate the job. Therefore, write your logs as success messages.
Integration
We recommend you model more complex processes not covered by BW process types using
Implementing Your Own Process Type .