BW_RESTART_CHAIN
Use the BW_ACTIVATE_CHAIN script element to continue an interrupted process chain. If the process chain continues, it is monitored until it ends.The process chain log is always saved in the activation report. Additionally, the script elements lets you store individual process logs or process background job logs.
Transaction: RSA1
SAP BW Version:
3.0B and later with Patch SAPKW30B11
Syntax
BW_RESTART_CHAIN
ID=...
,LOGID=...
[,NOFOUND=...]
[,ERROR=...]
[,PROCESSLOGS=...]
[,JOBLOGS=...]
[,LONGTEXT=...]
[,REPLICATE=...]
[,GET_SPOOL=...]
[,COLLECTLOGS=...]
Syntax |
Description / Format |
---|---|
ID= |
Technical designation of the process chain |
LOGID= |
25-digit Log ID Tip: Use PREP_PROCESS_REPORT to retrieve the Log ID from an AE job report. |
NOFOUND= |
Handling if the process chain cannot be found.
|
ERROR= |
Handling if the process chain ends abnormally.
Tip: You can use this parameter in order to restart process chains or their child processes. The advantage is that the job does not end which would include that processing continues in a parent (such as a workflow). |
PROCESSLOGS= |
Output of a process chain's individual process logs
|
JOBLOGS= |
Log output of the process background job Allowed values:
|
LONGTEXT= |
Output of a long text (diagnostics text) to a log message Format: script literal Allowed values:
|
REPLICATE= |
Handling of the children of a process chain Format of the value: script literal Allowed values:
|
GET_SPOOL= |
Requests the spool list of the started job.
Allowed values:
|
COLLECTLOGS= |
Writes the reports of the activated process chain's child processes to the job report. The reports of replicated child processes are by default available in the job report AND the task of the child process. Therefore, this information is redundant in the job and you can decide not to assume this information here. Allowed values: YES (default) or NO
Note: The reports of the child processes are not available if you specify NO in the REPLICATE and COLLECTLOGS parameters . |
Examples
This example serves to determine whether the ZSBB1 process chain has been interrupted in a job's post script by using the error number. If so, the 25-digit Log ID is saved in a variable.
:SET &HND# = PREP_PROCESS_REPORT(,,PLOG,'*U2004111*','COL=DELIMITER',"DELIMITER=@'@")
:SET &LOGID# = ''
:PROCESS &HND#
: SET &LOGID# = GET_PROCESS_LINE(&HND#,4)
:ENDPROCESS
:IF &LOGID# <> ''
: PUT_VAR VARA.CHAINS,'ZSBB1',&LOGID#
:ENDIF
An additional job reads the Log ID from the variable and restarts the process chain to continue processing.
:SET &LOGID# = GET_VAR(VARA.CHAINS,ZSBB1)
BW_RESTART_CHAIN ID='ZSBB1',LOGID='&LOGID#',ERROR='ABEND',NOFOUND='NORMAL'