Skip to Content
avatar image
Former Member

Auto approval program triggering multiple instances of work flow

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • May 08, 2017 at 06:03 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • May 08, 2017 at 09:38 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    May 08, 2017 at 06:21 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • May 08, 2017 at 08:10 AM

    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

    Add comment
    10|10000 characters needed characters exceeded