cancel
Showing results for 
Search instead for 
Did you mean: 

rspc_api_chain_start synchronous flag not working?

alex_wiebe
Participant
0 Kudos

How to programatically run a process chain synchronously:

To dynamically control some processes, I have a master process chain consisting of 2 "Execute ABAP Programs" in series. Both steps are configured to run a custom program Synchronously. The program looks up a flag in a config table and if set, calls "RSPC_API_CHAIN_START" with i_synchronous = 'X'. However, the call immediately returns (before the subsequent chain has finished running) and the next step runs. This results in both sub-chains running in parallel, and object locks occur.

Is there something broken with RSPC_API_CHAIN_START?

Or do I need to configure something else/extra in the sub-chain to ensure it blocks the RSPC_API_CHAIN_START from returning prematurely?

Version info:

ComponentReleaseSP-Level
SAP_BASIS74013
SAP_ABA74013
SAP_UI74015
SAP_BW74013

Accepted Solutions (0)

Answers (2)

Answers (2)

alex_wiebe
Participant
0 Kudos

Solved: the 'I_SYNCHRONOUS' flag only behaves synchronously when the 'I_POLL' flag is also set.

I can only presume this must be a throw back to by gone days of manually managing threads...

If someone can link to documentation supporting my results, i'll give them the correct answer points, 'cause I was not able to find something that made it explicit that I_SYNCHRONOUS by itself was not sufficient.

alex_wiebe
Participant
0 Kudos

Normally, one would use the "Local Process Chain" variant to run a sub chain. This variant blocks/waits for the sub-chain to complete.

I am trying to emulate that same behaviour, but by executing a custom ABAP program that calls RSPC_API_CHAIN_START instead.

How does one ensure a call into RSPC_API_CHAIN_START does not return until the invoked process chain completes?