cancel
Showing results for 
Search instead for 
Did you mean: 

Is this possible with a process chain?

amine_lamkaissi
Active Contributor
0 Kudos

Hi experts,

I have a process chain containing 5 steps. All those steps take the value of tvarv value.

This TVARV value corrsponds to current period, today it's : 006.2013, next month it will be 007.2013 etc

Is it possible to schedule the loadings of this chain when launched as following:

If it's launched in Period 006.2013, i would like it to run 6 times based on current year (in my case today 2013) and limited to actual period (in this case 006.2013)

1st time : 001.2013

2nd time : 002.2013

3th time : 003.2013

4th time : 004.2013

5th time : 005.2013

6 th time : 006.2013

Thanks for your support.

Amine

Accepted Solutions (1)

Accepted Solutions (1)

former_member209032
Active Contributor
0 Kudos

Hi,

  Add another item in TVARV table say reporting period. Make this period 01.2013. Then create your process chain. Make your process chain trigger based on event. Write the infopack and DTP filter routine to read the value of reporting period in TVARV. Also create a program which checks the reporting period field in TVARV table and if it is less than current period then increases it by one and then updates the value in reporting period field in TVARV and then raised the event using FM  BP_EVENT_RAISE to trigger the chain. Add this program as the last step of ur chain. Every time when u want to run the chain make the reporting field in TVARV field as starting period of the year and trigger ur chain using FM RSPC_API_CHAIN_START. You cannot time schedule or immediately start the process chain bcoz it is based on event trigger. So this manual step will have to be done by u. SO

1) When the chain start using the above mentioned function module, It reads the reporting period field from TVARV which is 01.2013.

2) now the process chain runs for 01.2013

3) The program which is the last step of the chain checks the reporting field in TVARV table with your field in TVARV which contains current period and if it is less then increase it by 1 and then updates the reporting period field to 02.2013 and triggers the event to again rerun the same chain

4) now ur reporting field has value 02.2013

5) the above process is repeated until 06.2013.

6) when it is 06.2013 the program checks it with current period field and since it is not less than it, it does not change the value in TVARV table and it does not trigger the event to rerun the chain.

Hope u got my point.

amine_lamkaissi
Active Contributor
0 Kudos

Thanks for your proposal Raghavendra.

Amine

Answers (0)