Professional Documents
Culture Documents
Applies to:
SAP BW 3.x, SAP BI 7.x, SAP ECC, APO Systems.
Summary
This document gives the procedure to trigger events in a Remote System using an ABAP Program.
Author Bio
Venkata Nagarjuna Reddy is a Technology Lead working in Infosys Limited, Nagarjuna Joined Infosys
Limited in Sep 2008 and worked on various SAP BI Projects.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Procedure to Trigger Events in Remote System Using an ABAP Program
Table of Contents
Introduction ......................................................................................................................................................... 3
Scenario .............................................................................................................................................................. 3
Procedure ........................................................................................................................................................... 3
Creating a Table .............................................................................................................................................. 3
RFC Enabled Function Module ....................................................................................................................... 4
Creation of Main ABAP Program .................................................................................................................... 6
Testing through SE38 ..................................................................................................................................... 8
Related Content .................................................................................................................................................. 9
Disclaimer and Liability Notice .......................................................................................................................... 10
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Procedure to Trigger Events in Remote System Using an ABAP Program
Introduction
As a part of BW Process it may be required to trigger events in Remote System (eg: BW. R/3, APO) to start
a Job or a process chain.
This can be achieved by an ABAP prgram which can be used to call the events in a Remote System.
Scenario
In this document an ABAP Program “ZRFC_RAISE_REMOTE_EVENT” is created which will call a remote
event in R/3 from a BW system.
Procedure
Creating a Table
1. Go to T-Code SE11 and create a Transparent table “ZRFCDETAILS” with Delivery Class “C” with the
below fields
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Procedure to Trigger Events in Remote System Using an ABAP Program
FUNCTION Z_BP_EVENT_RAISE.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(EVENTID) TYPE TBTCO-EVENTID
*" VALUE(EVENTPARM) TYPE MSXXLIST-NAME DEFAULT SPACE
*" VALUE(TARGET_INSTANCE) LIKE MSXXLIST-NAME DEFAULT SPACE
*" EXCEPTIONS
*" BAD_EVENTID
*" EVENTID_DOES_NOT_EXIST
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Procedure to Trigger Events in Remote System Using an ABAP Program
*" EVENTID_MISSING
*" RAISE_FAILED
*"----------------------------------------------------------------------
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(EVENTID) TYPE TBTCO-EVENTID
*" VALUE(EVENTPARM) TYPE MSXXLIST-NAME DEFAULT SPACE
*" VALUE(TARGET_INSTANCE) LIKE MSXXLIST-NAME DEFAULT SPACE
*" EXCEPTIONS
*" BAD_EVENTID
*" EVENTID_DOES_NOT_EXIST
*" EVENTID_MISSING
*" RAISE_FAILED
*"----------------------------------------------------------------------
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = eventid
EVENTPARM = EVENTPARM
EXCEPTIONS
BAD_EVENTID = 1
EVENTID_DOES_NOT_EXIST = 2
EVENTID_MISSING = 3
RAISE_FAILED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
case sy-subrc.
when 1.
raise bad_eventid.
when 2.
raise EVENTID_DOES_NOT_EXIST.
when 3.
raise EVENTID_MISSING.
when 4.
raise RAISE_FAILED.
when 5.
raise RAISE_FAILED.
endcase.
ENDIF.
ENDFUNCTION.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Procedure to Trigger Events in Remote System Using an ABAP Program
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Procedure to Trigger Events in Remote System Using an ABAP Program
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Procedure to Trigger Events in Remote System Using an ABAP Program
This will trigger the event RE_OK in the Remote R/3 System “RCQCLNT310”
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
Procedure to Trigger Events in Remote System Using an ABAP Program
Related Content
EDW homepage
SAP Help Documentation
How to trigger the Process Chains in BW from ECC
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Procedure to Trigger Events in Remote System Using an ABAP Program
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10