Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 09, 2015 at 04:43 AM

    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


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Vinita Kasliwal

      Hi Vinita

      Thanks for your help and quick response.

      Settings are there in SWE2 and I could see the contract is created properly. But my issue is its not even triggering the events upon created or saved of the contract.

      Regards

      Praveen