Skip to Content
avatar image
Former Member

Workflow looping around same agent and finally skipping the next approvals

Dear SRM friends,

We have a problem with Shopping Cart workflow. We are using SRM standard workflow for Shopping Cart approvals. However we have implemented BADI BBP_WFL_APPROV_BADI to determine approvers of Cart based on different Account assignment categories and financial policies.This BADI determines all approvers and populates in the table

APPROVAL_TABLE along with the proper approval Index. In the end it also appends Buyer as the last approver.

The problem that we are facing at present is some of the workflows are looping around same approver multiple times and in most of these looping cases it is skipping Buyer approval before getting converted into a Backend Purchase Req. This is a case of violation of approval policy.

Upon analysis there is no specific pattern or trend found among these workflows. One thing that is observed in the workflow container element "Approver List", for the Buyer approver the value of the field 'Type' is 'C' which means the Buyer agent is changed, but in reality this was not changed.

Any advice on this is highly aprreciated. Full points will be rewarded.

Thanks & Regards,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 30, 2008 at 08:38 PM

    Thanks Khan and Atul,

    I followed all the steps mentioned by Khan and when compared with the steps, i found that our workflows are working fine as per them.

    Also there seems to be no problem with the custom BADI code because when checked for values in debugging, everything seems to be fine.

    However we did not face this problem in Development or Quality systems. We are unable to replicate in these systems in whichever method we try.

    One observation i could made is regarding a container element

    'branchindex' in method 'nextdynamicapproverget' of Business Object 'BUS4101'. This is imported in Business object method as

    swc_get_element container 'BRANCHINDEX' branchindex.

    This method is importing this element, however neither the standard task(TS14007989) calling this method nor the workflow template(WS14000134, step 146) calling this task are not having this element as binding parameters.

    When checked in Workflow container for a Shopping Cart, this container value seems to be blank.

    Is this container element has got anything to do with the issue.

    Any help in this issue is highly appreciated. Full points will be rewarded.

    Thanks & Regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Venkat,

      I am facing the similar issue in my SRM 4.0 production system. I have carried out all the checks that you have mentioned and I notice stricking similarities in the onservations made in your case and mine.

      Please check this thread posted by me sc-going-to-same-approver-twice

      the post title is : SC going to same approver twice

      It's a real brain teaser and I require your help in this. Kindly let me know how you resolved this issue. What Notes have you applied. Reply to my thread so that I will be able to award points.



  • Jan 29, 2008 at 06:54 AM


    Let me know the following things.

    1) How many levels of approvers are there in the approval chain.

    2) is the approval_table of the container filled correctly , please check the workflow cotainer , is the buyer user assgined correctly (prefixed with US?)

    3) is the workitem going to buyer (or) not?

    4) for example , consider the following -->

    approver 1

    approver 2

    Buyer approver.

    in the container --> when the workitem is with --> approver2 --> approval_state for approver2 will be 5

    and approval_state for Buyer approver will be 2

    5) once the approver2 approves the cart --> then the approval_state for the approver 2 should be 0

    and approval_state for Buyer approver will be 5

    6) when the approval_state is 5 --> then it will go to the buyer for approval.

    7) looks like there is problem in the way --> approval_state is set in your system.

    8) compare the shopping carts which work correclty and which do not work correctly.

    specifcally look for approval_state

    9) do you see any errors in the application montiors??

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 29, 2008 at 08:46 AM

    Seems like bug in your custom code.. please paste the detailed code in next reply...


    - Atul

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2009 at 06:26 AM

    Hi Venkat,

    I am facing similar issue. Kindly let me know how you were able to resolve this issue.

    Thanks & Regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI All Experts,

      I am finding a same issue . How i can go ahead and chekc this issue....when custom badi iis working fine all the approvers are corect and when i replicate scenario in Quality no problem comes and one most interesting part is it happens with 1 or 2 scarts out of 100 scarts.....please let me knw how to proceed futher on this ?

      thanks in adcance to all the experts