cancel
Showing results for 
Search instead for 
Did you mean: 

Process chain scheduling with event

Former Member
0 Kudos

Dear All,

I am fresher in BI.

I am trying to schedule a process chain with an event. once the first chain is finished i want to schedule one more process chain. i created the Event in TCODE SM62. But i dont know how to define a parameter for that event and also please let me know how to use that event to run the CHAIN B after finish of CHAIN A.

Thanks in advance.

thanks

chaitanya.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member205352
Active Contributor
0 Kudos

Won't just using Metachain suffice ?

This will make chain B get triggered at succesful completion of chain A.

former_member181964
Active Contributor
0 Kudos

Hi,

Use the following program (change as per your Event anme and parameter).

1. Create the following program.

2. Create PC-1 at the end of this PC keep the following program.

3. Create PC-2 and then here, schedule it using Event , give your event name and parameter is 'ZEVENT_PARAM'. and activate and execute it.

4. Then execute PC-1 and then check after finishing PC-1 , it will call PC-2.

REPORT  ZFM_EVT1.

DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.

EVENTID = 'ZEVENT'.
EVENTPARM = 'ZEVENT_PARAM'.

CALL FUNCTION 'RSSM_EVENT_RAISE'
  EXPORTING
    I_EVENTID                    = EVENTID
    I_EVENTPARM                  = EVENTPARM
* EXCEPTIONS
*   BAD_EVENTID                  = 1
*   EVENTID_DOES_NOT_EXIST       = 2
*   EVENTID_MISSING              = 3
*   RAISE_FAILED                 = 4
*   OTHERS                       = 5
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Thanks

Reddy

Former Member
0 Kudos

Hi...

Ques : 1

To schedule a Event based process chain....

1) First create an Event in SM62...

2) Then Create a Job in SM36......In the first screen give the Job name >> Enter >> Then in the ABAP Program name : BTC_EVENT_RAISE...and in the varian name give the Event name that u hav created...save it and come out..

3) Then scedule the Job for a particular time ............for this ..click on the Start Condition tab >> Date/Time.....here give the date on which for the first time this job is going to run and the time...as per ur requirement......Click on Periodic Values tab....there give how frequent u want the job to run....Daily..Weekly...or Monthly...

When this job will run ....it will raise the Event....Now Maintain this event as the Start condition of the First Process chain.......To do this............open the chain in Planning mode..........u can open the chain using the tcode : RSPC1 >> Right click on the Start process >> Display Variant >> Click on After Event..........there u maintain the event name...........So whenever this job will run...it will raise the event...and this event in turn will trigger the chain...........

Ques : 2

Now u want ...that this chain trigger an Process chain B......For this create another Event in SM62..............Now in the end of the Process chain A...........include the Process ABAP Program >> there give the Program name and click on create............give the description.......then in the Program name write BP_EVENT_RAISE..........and in the variant name give the event name that u hav created...........In the destination will be Local...

Again maintain this event in the start condition of the Process chain B........

Hope this helps......

Regards,

Debjani.....

Former Member
0 Kudos

I am surprised this topic has not already triggered a response (if not reported). This topic has been discussed a lot in this forum. The only reason I didn't report it was for your second question.

For your first question, "How to schedule a process chain with event?"

Answer: You will need to create an ABAP program. Search this forum for any of the following: Z_EVENT_RAISE , ZBW_EVENT_RAISE , start chain event , SM62 , SM64 , etc.. Note you may have to go back a year, but if you search a little, you will get your answer.

For your second question, "How to run CHAIN_B after CHAIN_A?"

Answer: Have you considered adding CHAIN_B at the end of CHAIN_A? There is a process to execute a process chain within a process chain. Otherwise you will need to add an ABAP program to CHAIN_A to trigger the event which starts CHAIN_B. See above search criteria to find many ABAP examples on how to do this.

Good luck.

Edited by: Geo on Jan 21, 2009 10:07 AM