SAP-BI: Starting Process-Chain via Programm RSPC_API_CHAIN_START and wait for result

Sometimes you want to start a Processchain via programm and wait for it to end. This is a bit tricky as a Processchain starts normaly in Background and doesn’t give you a result if it is ended correctly.
SAP provides for !!!small!!! Processchain the Function
RSPC_API_CHAIN_START

This can be called synchonous with the following example:
call function 'RSPC_API_CHAIN_START'
exporting
i_chain = 'ZMYPROCCESSCHAIN
* I_T_VARIABLES =
i_synchronous = 'X'
* I_SIMULATE =
* I_NOPLAN =
* I_DONT_WAIT =
* IMPORTING
* E_LOGID =
exceptions
failed = 1
others = 2
.

What you have to know is – the result of this function is given on the !!!first!!! finished step – and !!!not!!! for the whole chain. To wait you have to use a little trick:

While using a one-step-chain with a Sub-Processchain this little problem is solved.


Beitrag veröffentlicht

in

, ,

von

Schlagwörter:

Kommentare

Eine Antwort zu „SAP-BI: Starting Process-Chain via Programm RSPC_API_CHAIN_START and wait for result“

  1. Avatar von Klaus
    Klaus

    Another option is to use wait and RSPC_API_CHAIN_GET_STATUS in a while loop. This works witht every chain.

Schreibe einen Kommentar

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.