Vous êtes sur la page 1sur 10

How to trigger Jobs in ECC from SAP-BI

SCENARIO – We have a requirement where we need to trigger Sales and Distribution


Process Chain in BI after completion of the corresponding V3 jobs (Order, Delivery,
Billing and Inventory) ECC.
NEED – There are lot of documents over different forums to accomplish this requirement
but they are vague from concept point of view, I am posting this document after successful
testing of the solution in my system.

1. Create the job in ECC which you want to trigger from BI as explained below:
a. Go to SM36 T-Code and give the job name which you want to create as shown
below:

b. Create steps for the job by including different standard program to run the V3 jobs for
different application component (02,03, 11, 12, 13) as shown below:
c. Final job will appear as shown below:
2. Create an event in ECC system by using t-code SM64 to trigger the job as explained
below:
a. Go to t-code SM64 and click on ‘Create icon’ as shown below:

b. Give the job name and save as shown below:

3. Schedule the job created in Step-1 by this event as explained below:


a. Go to SM36, give the job name and go to start condition as shown below:

b. Click on ‘After event’ and give the event name as shown below, you can made it
periodic also if you want by checking Periodic check box as shown below:
4. Create a remote function module in ECC which will be called by BI system via a
program in BI (This function module need not be present in BI system from which it is
been called but it must be present in ECC system where it will get executed)
as explained below:
a. Go to SE37 t-code in ECC and give the function module name which you want to
create and click on ‘Create’ button as shown below:
b. Enter the details in different tabs as shown below:
Use following source code in the source code tab and activate the function module.
FUNCTION Z_BW_EVENT_RAISE3.
*”——————————————————————–
*” IMPORTING
*” VALUE(EVENTID) TYPE TBTCO-EVENTID
*” EXPORTING
*” VALUE(RESULT) TYPE CHAR2
*”——————————————————————–
CALL FUNCTION ‘BP_EVENT_RAISE’
EXPORTING
EVENTID = EVENTID
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 5 .
IF
SY-SUBRC EQ 0 .
RESULT = ‘OK’ .
ENDIF .
ENDFUNCTION.
5. Create a program in BI which calls the Remote Function Module created in ECC
asexplained below.
a. Go to SE38 t-code in BI and give the name of the function which you wanted to
create as shown below:

b. Use following code and activate the program:


REPORT ZBW_EVENT_RAISE.
PARAMETERS : RFCDEST LIKE RFCDISPLAY–RFCDEST,
ZEVENT TYPE CHAR32.
CALL FUNCTION ‘Z_BW_EVENT_RAISE3’
DESTINATION RFCDEST
EXPORTING
EVENTID = ZEVENT.
Mind that we have to call same function module which we created in ECC.
6. Run the program and this program will trigger job in ECC.

Same procedure can be adopted to trigger any job or process chain in BI from ECC only
change is we need to create event and remote function module in BI and we have to write
the program in ECC to call this remote function module.

Vous aimerez peut-être aussi