cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Business Object types for DBM service order

Former Member
0 Kudos
141

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!!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

former_member185167
Active Contributor
0 Kudos

Hello,

First step: use SAP_WAPI_CREATE_EVENT instead.

regards

Rick Bakker

hanabi technology