Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Events in Bapi

Former Member
0 Likes
979

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.

4 REPLIES 4
Read only

Former Member
0 Likes
669

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

Read only

Former Member
0 Likes
669

This message was moderated.

Read only

former_member229729
Active Participant
0 Likes
669

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

Read only

Former Member
0 Likes
669

This message was moderated.