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.
Schreibe einen Kommentar
Du musst angemeldet sein, um einen Kommentar abzugeben.