cancel
Showing results for 
Search instead for 
Did you mean: 

Events are not triggering for BUS2000113

praveen_hannu
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vinita_kasliwal
Active Contributor
0 Kudos

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

praveen_hannu
Contributor
0 Kudos

Hi Vinita

Thanks for your reply, actually my problem is it  not even triggering and its not showing anything in SWEL.

My requirement is up on creation of contract, if the event created or saved triggers, then it will create a workspace in Opentext server. Now my issue is events are not triggering at all.

Regards

Praveen

vinita_kasliwal
Active Contributor
0 Kudos

Hi praveen

Did you try to check the option in SWE2 related to Type linkage active checkbox as below

Is your contract saved correctly in your system without any errors .. can you try with a different set of data if any errors are reported .. is the config for creation of contract is in place ?

Check the link below as well

http://help.sap.de/saphelp_srm2007/helpdata/en/a5/b7da2b12034978a5e646a419ed2c87/content.htm?framese...

Regards

Vinita

praveen_hannu
Contributor
0 Kudos

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

Answers (0)