Showing results for 
Search instead for 
Did you mean: 

Process chain starts x-times without scheduling

0 Kudos


I don't know an exact subject. The subject isn't very good.

We have a process chain which loads data in the night.

The durability of this chain is very different. Once this chain need 10 minutes and the next time they need 60 minutes.

Now there are two problems:

- We need to start the same chain x-times. The x is defined with the content of a z-table. One time there is only one start and another time there are 10 starts

- We have only 2 hours in the night where we can schedule this chain. So we can't scheduled the chain every hour with the standard scheduling

We need to have a solution, how we can control that if the chain is finished, a new new start happens.

Important is that the active chain an its 7 processes always ends correctly!

Have you got any ideas or examples?

Thanking you in anticipation

View Entire Topic
0 Kudos

Hi Denis,

You can create the chain and use an event as the condition for starting it. With an abap program you can check the conditions or tables that you need and when the criteria is met, you trigger the event.

You can also add messages in the chain, so if there is any problem, an email is sent to the email address that you define and you can check if the chain was successful or not.

0 Kudos


we already tried your logic (we start the chain and didn't call the event) but it doesn't work fine.

In my opinion the code after the function module waits for the end of the chain.

The problem is the table RSPCLOGCHAIN. I don't know why we haven't got clear status in RSPCLOGCHAIN.

Yesterday the process chain called every 10 seconds, although there is a active chain instance.

What is wrong in our code?

Here is our Code:

  while queue = 'X'.
* read z-table and set QUEUE

* Kette neu anstarten
      call function 'RSPC_API_CHAIN_START'
          i_chain       = c_chain_init     "Intial chain
          i_synchronous = 'X'
          failed        = 1
          others        = 2.

* Solange warten, bis die Kette beendet ist
      while l_analyzed_status = 'A'.

        select single analyzed_status
          from rspclogchain
          into l_analyzed_status
          where chain_id        = c_chain_init     "Intial chain
          and ( analyzed_status = 'A' or analyzed_status = '' ).

        if sy-subrc <> 0.
          l_analyzed_status = ''.
          wait up to 10 seconds.
          l_analyzed_status = 'A'.

Former Member
0 Kudos


may be you can try with chain id of last local chain in select statement

also take date and time into consideration while reading values from RSPCLOGCHAIN to check last successful run

Edited by: shailesh patil on Sep 23, 2011 2:15 PM

0 Kudos

Is it right that you think it is right?

We found a little mistake before a few minutes. We have to set "l_analyzed_status = 'A'." before the while statement called because this isn't set at the second pass.

Former Member
0 Kudos


it was understood that you have initialized it.

also you are starting the chain irrespective of condition. it will always run after 10 sec. i think you need to put call function statement in after sy-subrc.

0 Kudos

After a little bit testing with the new code which I postet before, I get new information.

Now the program works fine and starts the process chain after the ending of the actual chain pass.

But another problem is that the chain doesn't set the Analyzed_status = 'G' when the chain ends. This only happens when I actualize the protocol.

I don't understand it?! What is the reason?