Quantcast
Channel: SCN : Document List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 1574

How to….Automate “Reset Interrupt” in Process Chain

$
0
0

The purpose of this document is to replace the manual activity by automating “Reset Interrupt” in Process Chain

 

 

INTRO:

 

 

In Release SAP NetWeaver 7.0, several functions have been added to the process chain maintenance, one of them is “Interrupt” process type, replacing Event collector.

 

 

With the process type Interrupt, you can interrupt the processing of a process chain until a given condition has been satisfied. In this way you can, for example, define conditions that need to be satisfied in addition to the start condition defined in the start process so that the entire process chain or parts of it can be processed.

 

 

Requirement:

 

 

We have a situation wherein Process chain step has to wait until an external/Internal event finishes.

 

 

Below case is one of them -

 

 

Suppose we have Interrupt in the middle of process chain which has been scheduled based on the event. The process chain has to wait at
Interrupt step until the event triggers the Interrupt and then the next steps of process chain should proceed.

 

 

What happens if the event is triggered before the Interrupt step in process chain is hit?

 

 

The answer is Interrupt step will not wait for the event. As the event is already completed, process chain Interrupt step will be green and
goes to the next step of the process chain without waiting.

 

 

This case does not fulfill the desired condition to stop at the interrupt step.

 

 

Solution:

 

 

To solve this, in the planning view of the process chain, in context menu of Interrupt process we have to use “Reset Interrupt”.

 

 

1.png


 

With reset Interrupt, process chain Interrupt step will wait for event to trigger despite of event in unusual times.

 

 

How this works?  Let us look at the background.

 

Interrupts in process chain will be logged in RSPCINTERRUPTLOG table.Whenever interrupt is triggered, an entry is created in
RSPCINTERRUPTLOG table.

 

 

If an Interrupt is triggered before Interrupt step in process chain is run then it creates an entry as in below screen with BLANK “Log-ID
of a process chain” and “Instance ID”.

 

2.png

  

 

Since the event is already triggered, the process chain assumes the Interrupt step is Green, because of the entry in the table process
chain proceeds to the next Chain step.

 

 

When we use Reset Interrupt as in below screen,

 

3.png

 

4.png

 

   We can see the status as “Interrupt was successfully reset”.

 

 

That is, Reset Interrupt will delete the record from table RSPCINTERRUPTLOG with blank log_id. (Below
screen)

 

 

5.png

 

 

  
Conclusion is Every time when the event is triggered multiple times, we have to manually run “Reset Interrupt”.

   

 

Automating:

 

 

To overcome the manual activity of “Reset Interrupt”, a small code to be incorporated in process chain before the Interrupt step.

 

 

In SE38, create a program

 

6.png

  

CODE:

   

 

CALL METHOD cl_rspc_interrupt=>reset

 
EXPORTING

    i_variant
= VARIANT

    i_chain  
= CHAIN

   
.

 

  

Include the Program in process chain before Interrupt step as in below screen.

 

7.png

 

Once we include the above steps in process chain, we can see the log showing the successful reset

 

8.png

 

If no open run found then the program runs without issues.

 

 

9.png

       

 

http://help.sap.com/saphelp_nw70/helpdata/en/58/9c6c4251e4c153e10000000a1550b0/frameset.htm


Viewing all articles
Browse latest Browse all 1574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>