on 01-09-2015 4:03 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.