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:

/wp-content/uploads/2016/09/1_1046415.jpg

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:

/wp-content/uploads/2016/09/2_1046416.jpg

/wp-content/uploads/2016/09/3_1046418.jpg

c. Final job will appear as shown below:

/wp-content/uploads/2016/09/4_1046419.jpg

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:

/wp-content/uploads/2016/09/5__1046423.jpg

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

/wp-content/uploads/2016/09/6_1046424.jpg

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:

/wp-content/uploads/2016/09/8_1046425.jpg

       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:

/wp-content/uploads/2016/09/9_1046429.jpg

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:

/wp-content/uploads/2016/09/10_1046430.jpg

      b. Enter the details in different tabs as shown below:

/wp-content/uploads/2016/09/11_1046431.jpg

/wp-content/uploads/2016/09/12_1046432.jpg

/wp-content/uploads/2016/09/13_1046434.jpg

/wp-content/uploads/2016/09/14_1046438.jpg

/wp-content/uploads/2016/09/15_1046439.jpg

/wp-content/uploads/2016/09/16_1046440.jpg

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 as explained below.

   a. Go to SE38 t-code in BI and give the name of the function which you wanted to create as shown below:

/wp-content/uploads/2016/09/17_1046441.jpg

   b. Use following code and activate the program:


REPORT  ZBW_EVENT_RAISE.
PARAMETERS : RFCDEST LIKE RFCDISPLAYRFCDEST,
ZEVENT TYPE CHAR32.
CALL FUNCTION ‘Z_BW_EVENT_RAISE3’
DESTINATION RFCDEST
EXPORTING
EVENTID = ZEVENT.

/wp-content/uploads/2016/09/18_1046442.jpg


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.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply