on 2011 Oct 22 4:24 PM
hi everyone,
I am using the following code to trigger the 'CREATED' event which is in custom object type 'ZBUSORD'. I have specified the code in a method using enhancement concept which will get triggered while saving the document. I had put breakpoint on the below function module and executed the service order creation. While saving the service order it comes to debugging mode, and the variable 'KEY' having the service order number. So, everything has been passed correctly. But the event is not getting triggered in SWEL. But while executing the triggering code alone in se38 the event is getting triggered. I am still analyzing it for long time.
DATA: KEY type SWEINSTCOU-OBJKEY.
DATA: EVT_CONT TYPE TABLE OF SWCONT.
KEY = ms_header_detail-vbeln.
IF SY-SUBRC = 0.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'ZBUSORD'
objkey = KEY
event = 'CREATED'
CREATOR = ' '
TAKE_WORKITEM_REQUESTER = ' '
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
NO_COMMIT_FOR_QUEUE = ' '
DEBUG_FLAG = ' '
NO_LOGGING = ' '
IDENT =
IMPORTING
EVENT_ID =
TABLES
EVENT_CONTAINER = EVT_CONT
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ELSE.
*WRITE 'Event Triggered'.
ENDIF.
COMMIT WORK.
ENDIF.
Thanks in advance!!
Hello ,
did you check if your 'ZBUSORD' is activated in a Workflow Builder (SWDD) ->Basic Data ?
Somethimes it is not active in 200 or 300 clients.
Hope it is helping you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
First step: use SAP_WAPI_CREATE_EVENT instead.
regards
Rick Bakker
hanabi technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.