‎2009 May 20 10:44 AM
Hello,
How do Handle the "Events in Bapi "?
Where do we write the code to trigger the Events ?
Please explain me clearly.
Thanks in Advance.
‎2009 May 20 10:48 AM
hai,
u dotn have any events for a BAPI instead u haev events for business objects
and u can check them in trx SWO1 there u can see the events and when ever the object is called the events are triggered
regards
afzal
‎2009 May 20 10:51 AM
‎2009 May 20 12:07 PM
Hi,
The Event inside the BAPI (Business Object) can be called by following Function Module:
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'ZWOCONT' " Business Object Name
objkey = v_objkey " Document Number i.e. Input Parameter
event = 'ZWEMODIFIED' " Event Name in the BAPI to be called
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Rgds,
Ramani N
‎2009 May 20 12:18 PM