Skip to Content
0
Feb 07, 2012 at 05:57 AM

Terminating Event for BUS2017 Custom Method

124 Views

Dear Experts,

I have an issue with the Terminating Event of the Workflow for BO : BUS2017. The event is getting triggered but receiver is not being picked.

I have created two events GR_103 and POST_105 in the Custom BO ZBUS2017 by delegating it to BUS2017. GR_103 is the triggering event for my workflow which I have triggered in the POST_DOCUMENT Method of the Implmentation for BADI : MB_MIGO_BADI.

GR_103 is triggered while doing MIGO (Goods Receipt) for Movement Type 103. My Workflow is triggered perfectly and then I have used a Dialog Asynchronous Task in which I have called the MIGO Transaction for Releasing the GR Blokced Stock using the Movement Type 105. I have created a Custom Method POST in the BO ZBUS2017 and I have used the FM: MIGO_DIALOG to call the MIGO. I am trying to raise the POST_105 event in the Method MB_DOCUMENT_BEFORE_UPDATE of the Interface IF_EX_MB_DOCUMENT_BADI. I have defined the Terminating Event for the asynchronous Task as POST_105.

Now the event POST_105 is triggered, but SWEL says 'No receiver entered'. Even the SWEINST shows the object data as the current Work Item along with Object Key, but still receiver not picked. When I try to trigger the same event in a test report by using call transaction, then the event triggers and work item gets completed without any issues.

Please advise.

Below is my terminating event code.

READ TABLE xmseg INTO wa_mseg INDEX 1.

CONCATENATE wa_mseg-mblnr wa_mseg-mjahr INTO l_objkey.

IF wa_mseg-bwart = '105' .

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'BUS2017'

objkey = l_objkey

event = 'POST_105'

EXCEPTIONS

objtype_not_found = 1

OTHERS = 2.

ENDIF.

Regards,

Raju.