Skip to Content
0

Auto approval program triggering multiple instances of work flow

May 08, 2017 at 05:39 AM

161

avatar image

Hi Experts,

We have a custom auto approval programs to approve all the invoices which has exceeded the certain days of approval. This program is working fine when it was triggered for less number of invoices (around 200 invoices).

Problem which we are facing now is the workflow is not getting completed but getting stuck when the program is executed for around 2500 pending invoices. This auto approval program will just trigger the approval event for the wait step. Within 10 secs, event for all the invoices will get triggered. I believe after triggering, document posting will happen in parallel for all the invoices which is causing the workflow to get stuck. Is there any way to check whether the document posting is completed so as to proceed with the triggering of the next document?

Thanks in advance,

Fahmeetha.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Pavan Bhamidipati May 08, 2017 at 06:03 AM
1

Hi,

Have you tried to enable event queue report. Usually, in these kind of scenarios where the volume of event getting triggered in the system is high we enable event queue so that there is a proper load balance across the WP's.

Thanks,Pavan

Share
10 |10000 characters needed characters left characters exceeded
Rob Dielemans May 08, 2017 at 09:38 AM
1

Hi,

2500 events should not be a problem anymore. Please check OSS for known problems. Also activate event queue to see if this solves it and ask Basis if they can figure out what is causing the bottle neck.

Kind regards, Rob Dielemans

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Rob,

I am not sure whether 2500 events getting triggered at a time is the root cause of this issue. However the workflow is getting stuck at the 'Document Post' step. So as a work around, I am thinking to track the status of the workflow, following which I can trigger the following documents.

0

Hi,

Check if the post document method has a temporary error modeled in case that it is locked somewhere. If you can raise a temporary error then the standard job SWERRE picks those up and tries to post it again.

Kind regards, Rob Dielemans

0
Fahmeetha M May 08, 2017 at 06:21 AM
0

Hi Pavan,

Could you please elaborate how to enable the event queue report?

Also let me know if there is a way to identify whether the workflow is complete or not in the report program, so that we can trigger the next document after that.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi,

The report which I am referring you can find it in Workflow customization transaction SWU3

let me know if there is a way to identify whether the workflow is complete

One of the standard report which I always refer to check not only the status of the workflow but also the technical details of the workflow by using SWI1.

Thanks, Pavan

eventq.png (39.8 kB)
0

Using SWI1, I am able to get the workflow details.

After triggering the event, is there a way to identify whether the workflow is completed or not? I need to do this via report program. My requirement is to give time between each trigger so that workflows will not execute in parallel and get stuck.

0
Pavan Bhamidipati May 08, 2017 at 08:10 AM
0

Hi,

After triggering the Event to get the workitem related to the business object you may have to use the function module SAP_WAPI_WORKITEMS_TO_OBJECT. You have to pass the business object key to this function module which will return the parent or top workitem ID. After you identify it you have to use SAP_WAPI_GET_WORKITEM_STATUS. to know whether it is completed or not.

Thanks, Pavan

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks Pavan for your reply.

SAP_WAPI_GET_WORKITEM_STATUS does not exist in our system. Any other alternate FM available for the same?

0

Using SAP_WAPI_WORKITEMS_TO_OBJECT was able to check the status too.

0