Thursday, November 19, 2009

Triggering workflow event from WE19 (Inbound)

Joyjit Ghosh, Kolkata.

We were trying to test a custom inbound function module where for error it triggers the workflow so that user can be send notification mails with details of the problem.

We were using transaction WE19 to test the FM, for that we had chosen Inbound function module option.

But in SWEL we had found that no event was raised by the FM.

But in our code we had populated workflow variables correctly

Also we had checked the config. and found that this FM is properly configured to raise the event INPUTERROROCCURRED.

After spending few minutes we were able to figure out the problem. We had observed that if we choose Standard Inbound option with ALE Service Check box checked then it triggers the event.

Note: Our custom inbound FM Z_IDOC_INPUT_GOODS_RECEIPT was attached with custom process code ZMIM_POGR.

SWEL:

Then what was the reason for not triggering the workflow? Reason is very simple; workflow is triggered by the ALE layer itself, without ALE layer we cannot trigger the workflow. So if you want to trigger workflow for inbound IDOC from WE19, choose Standard Inbound option with ALE Service Check box checked.