Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Events are not triggering for BUS2000113

Dear Experts

We are trying to trigger an event for BUS2000113 for create and Saved. We have maintained the receivers in SWE2 and maintained entries in BSVW as well. However when we create contract, this events are getting fired.

I have activated event trace in SWELS.

Appreciate your help to guide me, if I am missing any step or any process. This is my first attempt in SRM.

Thanks in advance

Praveen

Former Member
replied

Hi praveen

Below is how I had done .. Please check and see if it helps you :

1.Check the events triggered in SWEL  for example Rejected is what got triggered in SWEL

2.Based on this I did code changes in DOC_SAVE BADI which you can filter based on the object type being BUS2000113  i.e confirmations where object key would be the SC number and Lv_event would be the event rejected which would be triggered ..

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
     EXPORTING
       object_type             = 'BUS2121'
       object_key              = lvObject_key
       EVENT                   = lv_event
      COMMIT_WORK             = ' '
*   IMPORTING
*     RETURN_CODE             =
*     EVENT_ID                =
*   TABLES
*     INPUT_CONTAINER         =
*     MESSAGE_LINES           =
*     MESSAGE_STRUCT          =
            

3. Once you above triggered it will check for an entry in the SWE2 tcode where you need to maintain the logic in any Z function module of type as below :

IMPORTING
*"     VALUE(SENDER) TYPE  SIBFLPORB
*"     VALUE(EVENT) TYPE  SIBFEVENT
*"     VALUE(RECTYPE) TYPE  SWFERECTYP
*"     VALUE(HANDLER) TYPE  SIBFLPORB
*"     VALUE(EXCEPTIONS_ALLOWED) TYPE  SWEFLAGS-EXC_OK OPTIONAL
*"     VALUE(XML_SIZE) TYPE  SWF_XMLSIZ
*"     VALUE(EVENT_CONTAINER) TYPE  SWF_XMLCNT
*"  EXPORTING
*"     VALUE(RESULT) TYPE  SWFREVRSLT
*"  EXCEPTIONS
*"      READ_FAILED
*"      CREATE_FAILED



So your logic would be called..

Let me know if you need more help with the code design etc maybe I could help


Regards

Vinita

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question