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: 

Outbound IDoc Error Handling via Workflow

former_member193518
Active Participant
0 Kudos

Hi tech guys,

I have been searching for hours on SDN for a solution to my problem, maybe someone can point me in the right direction.

I have inbound IDoc error handling via workflow setup and working correctly.

I have copied some of the standard tasks and created my own with more specific details and info in.

I now need to do the same for the outbound IDocs.

I've found the standard EDI outbound task (via WE40) and it is TS00007989.

I've tried to create an error situation that would provoke this work item to be run but can't seem to get it to work.

I can run the workflow task through the work item test tool (SWUS).

I have created all correct partner profiles and assigned post-processing agent (User name) and all outbound message types are correct.

To create the error situations I have done the following:

<b>Scenario A:</b>

1. Removed from the partner profile the CREMAS outbound message type.

2. Copied an existing working CREMAS IDoc and sent for standard outbound processing.

3. As expected the IDoc fails with "<i>entry in outbound table not found</i>" (status 37) but no workflow is generated!

<b>Scenario B:</b>

1. Correctly working partner profile restored.

2. CREMAS IDoc copied (in WE19) and messed with to make the syntax incorrect.

3. IDoc sent for standard outbound processing (immediately).

4. As expected the Idoc fails with "<i>syntax error in idoc</i>" (status 26) but no workflow is generated!

Have I missed some obscure customizing here.

I have been through SWU3 and checked the workflow customizing and there is no more customizing to be done! We're all out of customizing

Please help.

24 REPLIES 24

Former Member
0 Kudos

Hi,

Having identified the standard task, go to PFAC and identify to which agent is the standard task configured. Sometimes necessary configuarations have to be made in IMG.

Reward if helpful.

Regards

0 Kudos

Zapper,

The agent was assigned correctly to 30000013 "<i>Idoc organization and administration</i>".

Former Member
0 Kudos

Have you maintained the respective Agent in the partner profile?

Regards,

Vishal

0 Kudos

Vishal,

The partner profile has the agent defined at partner profile level.

The agent type is User, and I have a valid SAP account specified.

0 Kudos

Hi,

RCheck the agent assignment both responsible and possible agentes, since only the intersection of both agents are addressed.

Look into this...i`m off for some time..

Reward if helpful.

Rgds

0 Kudos

Zapper,

The task is classified as a general task.

When I click the Agent Assignment button, or possible agents, it says all users can execute this task.

Thanks.

0 Kudos

Have you tried creating the event using SWUE to see if your workflow is triggered. Turn on the event trance using SWELS then create the event and then check the event trace log in SWEL.

What event are you using to trigger your workflow? This task does not have a triggering event.

0 Kudos

Hi Matt,

I don't know how I can trigger the event.

I am using the CREMAS message type so I would presume that the BOR would be IDOCCREMAS, but as you said there is no specific trigger on the TS00008070 task.

The "<i>ALE, EDI & IDoc Technologies For SAP</i>" book that I have just says that there should be a workflow created.

Maybe there are certain tasks that run for the EDI admin that are triggered outside of the application processing workflows.

Thanks,

Darryl

former_member193518
Active Participant
0 Kudos

All,

I have finally managed to get this one sorted.

Who says persistence never pays!

I thought that it would be well worth posting it here for reference.

There were two issues that were preventing me from getting a workflow.

1. You <u><b>MUST</b></u> ensure that the partner profile is registered/setup in the distribution model (tx: BD64).

2. tx: WE19 will <u><b>NOT</b></u> perform the correct processing on an outbound message to enable a workflow to be created in the event of an error.

You must use the correct transaction in respect to the message that you are trying to generate.

i.e. I could not get WE19 to generate a workflow when I used standard outbound processing on a CREMAS message that was to fail due to the partner profile not being setup.

However, using XK02 and actually performing a change to a vendor, then running RBDMIDOC generated the workflow correctly.

This solution took me at least 3 working days to find out.

I have suggested to myself that I should get a tattoo with all the things that WE19 doesn't do, since I have spent the same amount of time in the past working on trying to get WE19 to start a sub-system after processing an IDoc.

It doesn't do that either.

Good luck peoples.

0 Kudos

Hi....

I have got a scenario similar to yours. I want my workflow to be triggered whenever an outbound IDOC gets into error state.

It is handled in SAP using a standard task 'TS00007989'.This task doesn't have any triggering event associated with it.

This task (TS00007989) is triggered in SAP by using a standard report program (RSEWFERR) and is associated with the eventcode 'EDIO'. All the eventcodes and the corresponding tasks to be executed are maintained in the table TEDE5.

I tried inserting my workflow-id in the table (TEDE5) in the place where the standard task (TS00007989) was. It didn't triggered my workflow. But stopped the standard task (TS00007989) from getting executed.

Can u suggest me a way out or Can u help me with a Business object and a triggering event for an outbound idoc of any message type.

Thanks in advance..

Balasubramanian Ravichandran.

0 Kudos

Hello,

Change the EDIO task in transaction WE40.

Are you sure that it didn't trigger your workflow?

Check in the workflow log SWI1.

If it did, there might not be an agent associated with it.

Make sure that your task is set as a "General Task":

- in SWDM edit the task, select "Additional Data -> Agent Assignment -> Maintain" from the menu, then set the attributes to "General Task".

Regards,

Darryl

0 Kudos

Hi Darry ..

Thanks a lot for ur inputs. Sorry for late reply . I am not that much well versed in IDOCs.The whole day i was breaking my head to solve some issues related to error in ALE Idoc setup. I had worked only in workflow for different business scenarios.

Now I am using a different sandbox to try out this scenario. In this system the standard task (TS00007989) itself is not getting triggered. I ll check that out and get back to you.

My workflow has got only a single 'sendmail' step. So there is no need for it to be specified as general task i believe.

If you know any Business object associated with an outbound idoc of message type COND_A. Kindly let me know. I have already found one object 'IDOCCOND_A' . But none of events inside that business object is getting triggered when the outbound idoc gets into error.

Thanks and regards,

Bala

0 Kudos

Bala,

You should also check that all workflow customising has been completed in SWU3.

Regards,

Darryl

0 Kudos

Hi,

Thanks Darry..

I have checked SWU3 transaction as well. I think workflow customization is done. I just executed the 'start workflow verification'. Its fine.

Can u suggest me any Business Object and event associated outbound idoc ??

I want to know starting point of the standard task TS00007989. I came to know that it is called inside the report program 'RSWFERR'. But how exactly that report program ('RSWFERR') is getting executed whenever the outbound idoc gets into error. If that is found, I can use that to trigger my workflow and I don't want to modify or alter the standard task.

Regards,

Bala.

0 Kudos

Bala,

I don't know where the workflow gets started.

How are you creating the outbound IDoc? WE19?

Regards,

Darryl

0 Kudos

Hi.

I am not using we19. I send material using BD10 transaction.

Regards,

Bala.

0 Kudos

Bala,

Have you tried calling the workflow through the test tool SWUS?

Make sure you add an IDoc to the workitem via "input data".

See if it generates a workitem.

0 Kudos

Hi Darry,

Thanks for ur suggesions.

The requirement in my case is to send an error notification via workflow, whenever the outbound idoc gets into error. As per my understanding, the errors during outbound idoc are handled through standard tasks and these standard tasks (eg. TS00007989 ) are associated with specific event codes (similar to process code) . Hence whenever an outbound error occurs, the standard task would automatically send a workitem (depending on the type of outbound error ) to the agent specified( Post processing agent ) in the task.

There is no specific Business object or triggering event available ( for outbound idoc ) in my case. Hence to start my workflow during outbound error, I need to goto transaction WE40 wherein I can specify my task in the place of standard task. But it will stop the standard task from getting executed which is not the proper way of proceeding.

There are two ways by which this task could be done.

1) Assigning Post processing agent for the standard task TS00007989. But it would send a workitem to the specified agent instead of notification.

2) Creating a report program similar to 'RSEIDOCA' (standard report pgm already available) inside which the task to be triggerred along with message type and other conditions can be specified. This report should be scheduled to run in the background in repetetive intervals of time.

I am still trying to find out an optimal solution for this problem. Once I finish it, I ll let you know how its done.

Thanks and regards,

bala.

0 Kudos

Bala,

Did you figure out how to do this...Please let me know.I'll send you my mailid to send the solution

Thanks

Sunil R

0 Kudos

Sunil,

I have developed a report which retrives data from idoc tables and sends notification in case of error. But the report has to be scheduled to run in the background for continuous interval of time.Its a perforamance issue.Hence I am yet to figure out any solution for this.

Once found i ll let u know.Any suggestions from u is also welcome.

regards,

bala

Former Member
0 Kudos

Hi Darryl,

Could you please provide me some documentation on how you did your IDOC error handling via workflow. We are mainly concerned with Inbound IDOCs.

Thanks...

0 Kudos

Tony,

I have been away from work for a while and just got your request.

Do you still need information on this?

Regards,

Darryl

0 Kudos

Hi Darryl,

Yes still need the information if you would be good enough to help me out...thanks.

0 Kudos

Tony,

For our inbound IDoc error handling we did the following:

1. Setup your partner profile to work as usual (including the distribution model).

2. Set a specific user in the "Post Processing Agent" field for the partner profile (WE20).

3. Perform workflow customising in SWU3 especially "Maintain Definition Env -> Prefix Numbers" and "Maintain Additional Services -> Activate Send to Objects and HR Objects".

4. In SWDM (workflow builder), choose a search range.

Select the "Object" tab and enter

category: "BOR Object Type"

Obj Type: "IDOCAPPL"

Method ID: "ERRORPROCESS"

and

category: "BOR Object Type"

Obj Type: "IDOCAPPL"

Method ID: "INPUTFOREGROUND"

NOTE: IDOCAPPL is the root IDoc business object, but depending on the IDocs you are wanting to monitor, you may have to use a specific IDoc object e.g. IDOCMATMAS etc. Your developers/customisers should know the business object used. It's just a matter of using the correct Method Id then. For IDOCMATMAS it is INPUTFOREGROUND.

If you want to change the standard workflow tasks you can customise the existing ones by copying the following standard tasks to your own tasks (based on IDOCAPPL):

TS00007989 name it: ZErrorProcO

TS00008070 name it: ZSynErrorO

TS00008074 name it: ZSynErrorIn

TS00008068 name it: ZErrorProcIn

TS20000051 name it: ZIDOC_APPL_E

5. Before any of the existing tasks can be executed by any user, you MUST ensure that they are of type "General Task". This means that any user is a possible agent:

When editing each of the tasks, select "Additional Data -> Agent Assignment -> Maintain" and click the Attributes button to set the task as a "General Task".

6. If you have copied the standard tasks, you also need to change the "Process Codes" table in WE40 to reflect the new tasks.

7. Make sure that the workflow linkage is actived (ticked) for the IDOCAPPL.INPUTERROROCCURED method (TS20000051) in transaction SWE2.

8. Test by creating an inbound error. You can use WE19 for inbound simulation (it doesn't work for outbound IDocs properly as WE19 doesn't call the subsystem).

You should see a workflow created (one of the ones listed in step 4) and placed in the specified user's Business Workplace Inbox. You should also see the workitem listed in SWI1.

Let me know if something needs clarifying.

Regards,

Darryl