December 14, 2011

Scheduling options in Process chains.


Different types of Scheduling option in Process Chain:

While Scheduling a Process Chain, there are two options:

The start process is set to Direct scheduling:

  • BI_PROCESS_TRIGGER is released with configured start options.
  • Subsequent application processes are scheduled and released as event triggered jobs.

The start process is set to Start Using Meta Chain or API:

  • No BI_PROCESS_TRIGGER is scheduled or released. You have to start the process chain via another process chain or API (Function module: RSPC_API_CHAIN_START). This provides flexibility to schedule process chains with the help of a driver ABAP program.
  • Subsequent application processes are scheduled and released as event triggered jobs.
  • In this case Change Selection option will not be there.

 Scheduling scenario for Direct scheduling:

 Scheduling a Process Chain on a particular day of every Month

1)  Suppose we want to schedule a Process chain on 1st of every month:

Open the Chain in Planning mode (RSPC or RSPC1) >> Right click on the Start Process >> Display variant >> Change Selections >> Click on Date/Time tab >> there click on Periodic Values Tab


Click on Periodic Values Tab >> There click on Monthly.

Check and Save.
In the Schedule Start date field enter 1st date of the present month.
Then the chain will run on first of every month.



 Schedule a process chain at different times during the day

Suppose we need to run a Process Chain twice a day daily at two different timings X and Y.
Open the Chain in Planning mode (RSPC or RSPC1) >> Right click on the Start Process >> Display variant >> Change Selections >> Click on Date/Time tab.
There in the Scheduled start field give the date when the Chain is going to run for the first time and enter the time in the Time field as X.
Then click on the Periodic value tab and Click on Daily.



Then Check and Save, again Check and save.
Activate and Schedule the Chain.

Now right Click on the Start Process >> Display Scheduled Jobs >> there you will find one Release Job (BI_PROCESS_TRIGGER) >> Select the Job >> In the top JOB tab >> Click on it and select Repeat Scheduling.



There Click on Date/Time tab, maintain the date and enter time as Y. Select Periodic Job Check Box >> Check and save. Then come out and you  will find that the Start Process is in red color. It means that the Process chain is scheduled for multiple times i.e. it has more than one Release Job.

Suppose you want to run the chain 5 or 6 times a day,you can do it in this way or you can do it in another way.

Create an Event in SM62.
Then go to SM36 Give a Job name >> Then click on Steps >> Click on ABAP Program >>Give the Program name BTC_EVENT_RAISE >> In the Variant Field Enter the Event created in SM62 >> Check and Save.



Then click on the Start Condition >> Click on Date/Time tab >> Give the date and give the first time.
In this way create 5 different Jobs by giving 5 different timings.
Maintain this Event in the Start condition of the Process chain.

Note: BTC_EVENT_RAISE is available in BI 7.0, for BW 3.X create a Program using function module "BP_EVENT_RAISE" and pass the event name as parameter. Save this as variant.

Check SAP Note : 919458 for Documentation.

Schedule a Process Chain to run only for X number of days of a month

Suppose we need to run a Process chain every first 15 days and Last two days of every month.

In this case, create a Factory Calendar using T-code SCAL. There declare first 15 days and Last two days as Working days and rest all as Holidays.
Right click on the Start Process >> Display variant >> Change Selections >> Click on Date/Time tab >> Click on the Restriction tab (F6) >> there maintain the Calendar id and Select Do not Execute on Sundays or Holidays>> Then Check and Transfer >>Then in the Scheduled start field give the date when the Chain is going to run for the first time.

Then the Process chain will only run as per the above requirement.....



Trigger Event at R/3 to BW side:

Suppose we want to Schedule a Process chain as event based. This event will be trigger from R/3 to BW:

In BW System:
1. Create New Z-Program with Parameters Event Id, Event Parameter and In the Code Use BP_EVENT_RAISE Function raise Event with Parameter. Create Transaction ZEVENT for this Program.
2. Create Process Chain to Load Data from R/3 to BW.
3. Schedule this process chain after the Event and parameter. Activate and Schedule this process Chain.
4. Now Run SHDB to Create BDC code for this Transaction 'ZEVENT' with Parameters of Event and Event parameters.
Now BW is ready to Load after

In R/3 System:
1. Call Function RFC_CALL_TRANSACTION with 'ZEVENT' Transaction and BDC Table with Correct Event and Parameter. Use Destination as your BW System.
2. Check SM59 for BW Connection.
This Function Execute the Transaction in BW system. That will raise the Trigger required and that will Start the Process Chain and Load the Data.

4 comments:

  1. awesome and clear doc... thanks for all your effort

    ReplyDelete
  2. I am William..
    I just browsing through some blogs and came across yours!
    Excellent blog, good to see someone actually uses for quality posts.
    Your site kept me on for a few minutes unlike the rest :)
    Keep up the good work!Thanks for sharing a important information on sharepoint


    ReplyDelete
  3. great work! really helpful docs!

    ReplyDelete
  4. Excellent Information.. All at one Place.. Thanks a Lot

    ReplyDelete