cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Duplicate IDOC in workflow

former_member204661
Contributor
0 Likes
1,397

Hi,

I am seeing duplicate IDOCS in the workflow, but with different I.D's. This IDOC went to 51 and was processed again, and again went to 51.

This IDOC comes and creates G.R

The First IDOC in the workflow has time stamp same as the timestamp when the IDOC first went to 51, however the second timestamp of the same IDOC in the workflow is the same as that of the previous IDOC.

Ideally the duplicate IDOC should not have appeared, I am not sure how this has happened.

The IDOC was processed again after 30 mins, and it went to 51 .

Can someone throw some light on this, what exactly should I be checking.

Thanks

Shailesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member204661
Contributor
0 Likes

Hi Vipin,

The IDOC failing multiple times should not be triggering multiple messages in the workflow.

That is the concern.

Kindly help addressing this.

Thanks

Shailesh

Former Member
0 Likes

Shailesh,

If the workflow is triggered in an FM linked to your IDOC'S process code, you could probably modify the FM code to handle this situation. You could use some mechanism to control the triggering only once by manipulating the value of variable 'workflow_result'.

Hope this helps.

Vipin.

Former Member
0 Likes

Hi Shailesh,

If i understood correctly for a single IDOC it should have only one workflow. The same IDOC may failed multiple times but it should trigger the Workflow. Right?

If so then you can make use of Check function module. In the check function module you can build the below logic.

Call the FM SAP_WAPI_WORKITEMS_TO_OBJECT with your business object and Object Key - Idoc no.

It will show you the list if instances based on the business object and Object key.

If the FM returns has any instances dont trigger the workflow.

Thanks,

Viji.

former_member204661
Contributor
0 Likes

Hi Viji,

Many thanks for you inputs. I will clarify further.

The IDOC first went into error say at 12:00, the message appeared in the workflow at the same time.

However the IDOC was again processed and went into 51 at 12:30, but in the workflow I see the same IDOC appearing twice under different message I.D But at the same time 12:00.

Could you please help me in understanding the issue.

Thanks

Shailesh

Former Member
0 Likes

Hi Shailesh,

Is it a work item or just a Mail message?

Where did you see the Creation time of the IDOC in the Messages?

Thanks.

former_member204661
Contributor
0 Likes

Hi Viji,

Its a work Item, it has the creation date and time against it.

Thanks

Shailesh

Former Member
0 Likes

Hi,

At 12.00 there is a single work item for the IDOC number and at 12.30 there are two work items with same Idoc number?

Is it so? I think the two work items created at 12.00 only. In the workflow log please check the creator of the Work item.

May be due to wrong agent assignment you may get this second work item.

Thanks.

former_member204661
Contributor
0 Likes

Hi Viji,

At 12:00 there were 2 work items.

Thanks

Shailesh

Former Member
0 Likes

Hi Shailesh,

For a single Event, there is two workflow's are triggered or a single workflow sending work item's to Two times.

In the SBWP, Select the work item and Go to --> workflow log ---> List with technical details. --> Here get the Workflow ID of both work items. If it is differs, then you need to deactivate one workflow.

or you can use the event trace SWEL to check what are all the workflow triggered for your Event.

Just switch on the event using SWELS and create a new IDOC and check the Event log using SWEL.

It will display the event and workflow'a that are triggered for the same event.

Thanks.

former_member204661
Contributor
0 Likes

Hi Viji,

This is a case of single workflow sending work item's Two times.

Thanks

Shailesh

Former Member
0 Likes

Hi,

Can you please check the Event trace?

Also you can create the Event manually using SWU0 and check how many work items are triggered for the event.

Thanks.

former_member204661
Contributor
0 Likes

Hi Viji,

I had run the simulation for the object type and event concerned, I got 2 different receivers

I checked the properties of the same, they same almost alike, except the termination part.

Thanks

Shailesh

Answers (1)

Answers (1)

former_member204661
Contributor
0 Likes

Any suggestions/solutions please

Former Member
0 Likes

Shailesh,

Are you posting the IDOC inside your workflow?

Could u give some more details of the flow.

Vipin.

former_member204661
Contributor
0 Likes

Hi Vipin,

The IDOC when it goes into error, posts a message in the workflow of the user concerned, for him to take action, however in this case, we found the same IDOC being repeated, under different message I.D's

Thanks

Shailesh

former_member204661
Contributor
0 Likes

Hi Vipin,

The IDOC when it goes into error, posts a message in the workflow of the user concerned, for him to take action, however in this case, we found the same IDOC being repeated, under different message I.D's

Thanks

Shailesh

Former Member
0 Likes

So basically when the IDOC goes into error, the workflow triggers and now since the same IDOC is going into error repeatedly, your workflow is triggering again and again?

If this is the case, we should perhaps solve the IDOC posting issue.

Vipin.