Follow these step-by-step instructions for an alternative mechanism to stop process chains from running without having to remove them from meta chains or from the schedule. This solution helps avoid human error and data discrepancies in BI reports.
Key Concept
A meta chain links several process chains together and allows you to use every process chain to load an independent data flow. You can create a meta chain to load all your transaction data (sales, billing, deliveries, inventory, and purchasing) into SAP NetWeaver BW by linking all the process chains that load this data in a single meta chain.
Developers often need to remove process chains from a schedule to stop them from executing. This is usually done during:
- Production import of back-end objects
- Downtime for system maintenance
- Project cutover activities
- System upgrades
- Re-initialization
Consider the following scenario: Meta chain ZMETA_CHAIN consists of the following local chains:
- Process chain to load sales order transaction data – ZPC_SALES_DLY_TX
- Process chain to load delivery transaction data – ZPC_DELIVERY_DLY_TX
- Process chain to load billing transaction data – ZPC_BILL_DLY_TX
- Process chain to load purchasing transaction data – ZPC_PURCHASING_DLY_TX
- Daily load for inventory transaction data – ZPC_INV_DLY_TX
As shown in Figure 1, the deliveries chain is dependent on successful completion of the sales order chain, and the billing chain is dependent on the successful completion of deliveries and sales order chains.

Figure 1
Meta chain
Now, consider that for your project, you want to stop the sales order chain from running. This may be due to reloads, transports, or some other project. To stop the sales order chain, you need to “remove” it from the meta chain. Along with this, you may want to remove the delivery and billing chains as well because they are dependent on the sales order chain.
You may have other scenarios, such as stopping all the chains from running (e.g., for system maintenance). In such a case, all the chains need to be removed from the schedule and then scheduled back once the project activity is complete. This can lead to human errors, including scheduling back incorrectly, forgetting to put the chain back into the schedule, or forgetting to put a local chain back in the meta chains.
A Solution Using Decision Variants
The solution I provide in this article allows you to remove the chain and its successor chains from the schedule without actually removing them from the meta chain. You create a decision variant in a process chain immediately after the start process in the chain. This variant acts like a switch. The chain’s execution is stopped based on table entries that control this step.
My solution uses the following steps to create the functionality of decision variants:
-
Create a dependency table. This defines dependencies between process chains.
-
Create an exception table. Creating an entry in this table stops a process chain from executing.
-
Create a decision variant. This step uses a “decision between multiple processes” process type. This process type determines whether the chain executes based on entries entered in the exception table in step 2.
-
Modify the process chains to include the decision variant.
-
Execute the process chains with the decision variant. In this step, you use the decision variant to stop a process chain.
Let’s look at the above steps in further detail.
Step 1. Create a Dependency Table
The dependency table documents the dependencies between local chains within a meta chain. Create a dependency table by taking the following steps:
- Go to transaction code SE11.
- Create a table called ZBWLOADDEPENDNCY.
- In the resulting screen, provide a short description of the table. Under the Delivery and Maintenance tab, select Delivery Class C, and select Display/Maintenance Allowed in the Data Browser/Table View Maint. field (Figure 2).

Figure 2
Create table ZBWLOADDEPENDNCY
-
Go to the Fields tab. Create the fields MANDT, CHAIN_ID, and ZDEPENDENT_CHAIN by entering them in the Field column (Figure 3).
-
Enter data element MANDT for field MANDT. Enter RSPC_CHAIN under the data element column for fields CHAIN_ID and ZDEPENDENT_CHAIN. RSPC_CHAIN is the SAP standard data element for process chains.

Figure 3
Select fields for table ZBWLOADDEPENDNCY
Now, you create entries for this table by taking the following steps:
-
Go to transaction code SM30.
-
Enter ZBWLOADDEPENDNCY in the Table/View field and click the Maintain button (Figure 4). Leave the No Restrictions button marked (it’s the default setting).

Figure 4
Maintain table ZBWLOADDEPENDNCY
-
In the next screen that appears, create a new entry by clicking the New Entries button (Figure 5).

Figure 5
Create entries in table ZBWLOADDEPENDNCY
Enter the details as shown in Figure 6. The successor process chains are in the left column and the predecessors are in the right.

Figure 6
Process chain dependencies in table ZBWLOADDEPENDNCY
The table entry in Figure 6 denotes that ZPC_DELIVERY_DLY_TX (delivery) in the left column is dependent on successful completion of ZPC_SALES_DLY_TX (sales orders) in the right column.
Similarly, ZPC_BILL_DLY_TX (billing) is dependent on the successful completion of ZPC_SALES_DLY_TX (sales orders) and ZPC_DELIVERY_DLY_TX (delivery).
The inventory and purchasing chains are linked by an always event in the meta chain and, thus, have no dependency on each other. Hence, they are not entered in the table.
Step 2. Create an Exception Table
Next, create an exception table by taking the following steps:
- Go to transaction code SE11, enter ZBWLOADEXCEPTION, and click the Create button.
- In the next window, enter a short description. Under the Delivery and Maintenance tab, choose Delivery Class C and select Display/Maintenance Allowed in the Data Browser/Table View Maint. field (Figure 7).

Figure 7
Create table ZBWLOADEXCEPTION
- Go the Fields tab and create the following fields:
- MANDT with data element MANDT
- CHAIN_ID with data element RSPC_CHAIN to specify the process chain
- VALID_FROM, which provides the validity start date of the table entry
- VALID_TO, which provides the validity end date of the table entry
- START_TIME, which provides the validity start time of the table entry
- END_TIME, which provides the validity end time of the table entry
- Create new data elements for the above date and time fields by taking the following steps:
- Under the Fields tab (Figure 7), double-click the entry in the Data element column.
- In the subsequent screen, enter a short description and the SAP standard domain DATS (Figure 8).

Figure 8
Create a data element
- Save and activate the data element by clicking the activate icon
(which is not shown in Figure 8). - Similarly, create data elements for the other fields, using data element DATS for VALID_TO and data element TIMS for the time fields.
- Save and activate the table by clicking the activate icon. The table is created as shown in Figure 9.

Figure 9
The structure of table ZBWLOADEXCEPTION
Creation of an entry in this table acts as a switch and stops a process chain from executing within the dates and time specified.
Step 3. Create a Decision Variant
To create a decision variant, you first need to create a custom formula function that is called in the process type “Decision between multiple alternatives.” You create this custom formula function using a Business Add-In (BAdI) implementation. An ABAP code is written here that reads the dependency and exception tables created above to start and stop the process chains depending on the entries in the table.
The custom formula function, when used in the process type “Decision between multiple process types,” is thus referred to as a decision variant. The steps below illustrate on how to create a decision variant.
First, you need to create a new BAdI implementation. The BAdI enables you to create user-defined formula functions for use in the decision-between-multiple-alternatives process type in process chains. Go to transaction code SE19 and create a new implementation, ZRSAR_CONNECTOR. In the subsequent screen, click the Create Impl. button (Figure 10).

Figure 10
Create a BAdI implementation
Press Enter. This creates a new class, ZCL_IM_RSAR_CONNECTOR (Figure 11).

Figure 11
Creation of a class
Double-click ZCL_IM_RSAR_CONNECTOR, which takes you to the screen in Figure 12.

Figure 12
Class interface screen
Next, click the source code icon
in Figure 12, which takes you to the screen shown in Figure 13.

Figure 13
Write the source code
Enter the method code shown in Figure 14 into the ABAP editor between the method and endmethod. statements shown in Figure 13. This code creates a custom formula function in the Decision between multiple alternatives process type. You can download the method code by clicking here.

Figure 14
Enter this method code into the ABAP editor
Save the ABAP code, and then create a new class, ZCL_CHECK_PCRUN, by taking the following steps:
- Go to transaction code SE24. Enter the class and click the Create button (Figure 15).

Figure 15
Create a class
- Under the Methods tab, enter a description and the method CHECK_PCRUN (Figure 16).

Figure 16
Enter the method
- Place the cursor on CHECK_PCRUN and click the Parameters button.
- In the next screen, manually enter the parameters shown in Figure 17. For example, enter CHECK_PC in the Parameter column and Importing as the Type. Leave the Optional check box empty. Check the Pass by Value check box, enter Type as the Typing Method, and enter ZCHECK_PC as the Associated Type. Leave the Default value column blank and enter a description in the final column.

Figure 17
Enter the parameters
- For parameter CHECK_PC, create the associated type ZCHECK_PC by double-clicking ZCHECK_PC.
- Enter a short description, and enter ZCHECK_PC as the domain (Figure 18).

Figure 18
Create associated type ZCHECK_PC
- Create the domain by double-clicking ZCHECK_PC. Enter the description, format, and output characteristics as shown in Figure 19.

Figure 19
Create the domain ZCHECK_PC
- Save and activate the domain and data element by clicking the activate icon, and return to the screen in Figure 17 by clicking the back arrow.
Click the custom source code icon again and write the source code in Figure 20 into the ABAP editor. This code looks up the ZBWLOADDEPENDNCY and ZBWLOADEXCEPTION tables created earlier to start or stop the chains, depending on the entries in the table. You can download the source code by clicking here.

Figure 20
Enter this method code into the ABAP editor
Now write the include program code shown in Figure 21 into the ABAP editor by double-clicking ZBW_PC_GLOBAL after the Include. You can download the include program code by clicking here.

Figure 21
Enter this include program code into the ABAP editor
The code can also be enhanced to send email notification if a chain is skipped. Comments have been added in the above code at appropriate places where email notification codes can be added. Activate the class by entering the class name in transaction code SE24 and clicking the activate icon.
Then activate the BAdI implementation by going to transaction code SE19. Enter ZRSAR_CONNECTOR under the Classic BAdI Implementation field (Figure 22), click the Change button, and then click the activate icon in the subsequent screen (Figure 23).

Figure 22
Enter the BAdI name and click the Change button

Figure 23
Activate the BAdI
Step 4. Modify the Process Chains to Include the Decision Variant
Now it’s time to modify the process chains so that they include the decision variant. Take the following steps:
- Go to transaction code RSPC, which takes you to the process chain display planning view. Open the process chain to which you want to add the decision variant in change mode (e.g., ZPC_SALES_DLY_TX).
- Drag the process type Decision Between Multiple Alternatives to include it below the start variant of process chain ZPC_SALES_DLY_TX.
- In the Decision Between Multiple Alternatives screen, click the create icon
(Figure 24). - In the next screen, enter the technical name in the Process Variants field, enter a description in the Long description field, and click the green checkmark (Figure 25).

Figure 24
Decision Between Multiple Alternatives process type

Figure 25
Provide a technical name and description
- In the next screen, create the formula by clicking the create icon in Figure 26 under the Formula column.

Figure 26
Create the formula
- Then select function C_CHECK_PCRUN from the Function column on the right as shown in Figure 27. Double-click C_CHECK_PCRUN after you select the function and it appears in the text box.

Figure 27
Select the custom function
- Enter the process chain name (e.g., ZPC_SALES_DLY_TX) as shown in Figure 28 to create a formula for the decision variant.

Figure 28
The formula for a decision variant
- Save the formula and exit the screen. The data loads in the process chain are specified under option 1 (the right green arrow with the red icon to indicate a run) under the OR process type (Figure 29). Option 2 (the left green arrow with the blue icon to indicate a skip) can have any dummy process type, such as an OR, AND, or a dummy program.

Figure 29
A decision variant with the data loads under the red icon and the OR condition under the blue icon, which skips the data loads
- Create similar decision variants for all chains, including the meta chain (Figure 30).

Figure 30
Decision variant for the meta chain
Step 5. Execute the Process Chains with Decision Variant
To prevent a chain from executing its data load steps, simply create an entry in table ZBWLOADEXCEPTION via transaction code SM30. As shown in Figure 31, the sales order chain is added under the exception for July 14, 2012.

Figure 31
The sales order chain is added in table ZBWLOADEXCEPTION
Now, click the execute icon (not shown in Figure 31) to execute process chain ZPC_SALES_DLY_TX. Notice that the chain skips to the OR condition and does not execute the data loads in the process chain (Figure 32).

Figure 32
The sales order chain is skipped
Similarly, all the other chains can be stopped as well.
For meta chain ZMETA_CHAIN, if the sales order chain is stopped, the delivery and billing chains automatically stop, too, because both are dependent on the successful completion of the sales order chain, as per the entries entered earlier in table ZBWLOADDEPENDNCY (Figure 33).

Figure 33
The delivery and billing chains are skipped
The purchasing chain executes its data loads because it is not put under exception, nor is it dependent on the successful completion of any predecessor chain (Figure 34).

Figure 34
The purchasing chain executes its data loads
The meta chain can also be stopped from executing in a similar way.
To re-start the process chains, you simply have to delete the entries in the ZBWLOADEXCEPTION table.
Abhijit Ghate
Abhijit Ghate has a bachelor’s degree in electronics engineering and more than 10 years of SAP experience in BI and ABAP, encompassing various industry verticals, spanning several implementation and support projects. He is an SAP-certified solution consultant and is ITIL V3 Foundation-certified as well.
You may contact the author at abhijit.ghate@gmail.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.