Events are not triggering for BUS2000113
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
Vinita kasliwal replied
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'
object_type = 'BUS2121'
object_key = lvObject_key
EVENT = lv_event
COMMIT_WORK = ' '
* RETURN_CODE =
* EVENT_ID =
* 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 :
*" 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
*" VALUE(RESULT) TYPE SWFREVRSLT
So your logic would be called..
Let me know if you need more help with the code design etc maybe I could help