Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Event trigger when Order inbound IDOC fails

Former Member
0 Kudos

Hi All,

I am working on a solution which needs to use a custom workflow which I have developed when an Order inbound IDOC fails in SAP. I am using business object IDOCORDERS, Event of the object INPUTERROROCCURRED. My solutions works perfectly fine when an IDOC comes from our external system and fails in SAP but I want to test some new changes that I have added to the WF, therefore I am triggering the inbound IDOC from WE19 and when the IDOC fails the event is not triggered. I don't know why but it works when the IDOC is sent from the external system.

Can anyone help me to understand how this could be resolved.

Advance Thanks,

Pradeep


10 REPLIES 10

Former Member
0 Kudos

You can use transaction SWUS - for testing workflow or trigger the event using SWUE transaction

0 Kudos

Thanks for the response Mrugesh Phatak but I would like to test the full process from the IDOC failure till the end of the WF. Mainly in the workflow one of the step is to create an IDOC and if that fails I want to see the event is triggered which I think is not working at the moment.

Simply if the IDOC comes from outside SAP the process work as expected but when we trigger the Inbound IDOC inside the SAP using a function module / program the event is not triggered, therefore the WF is not executed.

0 Kudos

I believe you might need to start workflow explicitly in the program - see FM IDOC_ERROR_WORKFLOW_START.

0 Kudos

Hi Pradeep

Do one thing in WE19 let the debugger stops inside posting FM before error occurs. Switch on update debugging. Put a breakpoint at CL_SWF_EVT_STRATEGY_BOR_FB method PROCESS. It will stop here. Change the mode to D to debug the receiver stuff

Nabheet

0 Kudos


Thanks Nabheet, but no joy.

0 Kudos

Hi Pradeep

Does it stop in debugging?

Nabheet

0 Kudos

Hi Pradeep

WE19 wont trigger event as it is a testing tool and the idoc is marked with special flag for the same. I just read it in one of the SAP note 850050.

Please read it for more details

Nabheet

himanshu_gupta13
Active Participant
0 Kudos

Dear Pradeep,

Before this you have to use WE19 to generate the inbound idoc.

After you have tested the inbound and outbound processes, you can specifically test the workflow

component's exception−handling process. One obvious method is to create an error in the process and check for a work item in the Inbox of the responsible user. However, this approach requires you to build error data, which can be difficult at times. You can test the workflow component itself by using the simple procedure listed here. This procedure applies to all error workflows for the outbound and inbound process.

Use transaction SWUS :

In this step, your aim is to test the exception−handling process and to make sure that the correct person is notified when an error occurs. You start the error process manually, using transaction SWUS. In an actual process, the system starts the error process based on the type of error. The steps are as follows.

     1.  Identify the workflow task that is started for a particular exception..

     2.  On the selection screen enter the task number in the Task field, and click the Input Data button. On the next screen, press F4 and enter an IDoc number.

     3.  Click the back arrow and click the Start button. This step should start a workflow process.

Errors in this step are communicated in the status bar. You click the message to get additional details. The Testing the Workflow Exception Process 140 common problem in this step is related to workflow configuration. If the system reports that you are not one of the possible agents, either the task profile has not been maintained, or there is a problem with your PD−ORG setup. If this step is successful, the person responsible for the task should receive a work item in his or her Inbox.

Many Thanks / Himanshu Gupta

himanshu_gupta13
Active Participant
0 Kudos

Dear Pradeep,

You can also see the possible cause of any problem, You run this report for all process codes by using program RBDMOINF via transaction SE38. Alternatively, you run program RBDMOINC to test an individual code.

Many Thanks / Himanshu Gupta

0 Kudos

Hi Himanshu Gupta, Nabheet,

I am going to run the program which creates an IDOC and see if the Event is triggered. I will let you know the results soon.

I don't have any problem with the workflow. if the event is triggered then the workflow is working correctly.

Regards,

Pradeep