Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Using Interrupt process type, we can make the process chain step to wait until the desired condition is satisfied. These conditions will be same as start variant conditions in process chain.

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”.




 

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”.

  

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,

   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)

 

  
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

  

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.

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

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

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

4 Comments
Labels in this area