Monday, January 9, 2012

Process Chain Scheduling

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

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



image"



There Click on Other Period >> there in the Day(S) field enter 1.....



image



Then Check and Save >> Again Check and Save .........

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

Then the Process chain will run on 1st of every Month...

Or U can do it in another way....

Click on Periodic Values Tab >> There click on Monthly.....Check and Save.

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



image



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

Then click on the Periodic value tab and Click on Daily.......



image



Then Check and Save ..............again Check and save.......

Activate and Schedule the Chain......

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



image

image



There Click on Date/Time tab.................maintain the date and enter time Y......Select Periodic Job Check Box >> Check and save ...................then come out...........

Then u 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 u 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.....



image



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 Tcode 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 Holid.........>> 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.....



image



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.

No comments:

Post a Comment