cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow looping around same agent and finally skipping the next approvals

Former Member
0 Kudos

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,

Venkat

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Venkat,

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

Thanks & Regards,

Kris

Former Member
0 Kudos

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

Vishwjeet

Former Member
0 Kudos

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,

Venkat

khan_voyalpadusman
Active Contributor
0 Kudos

hi,

the business object which you are talking about is considered only in the case of classic workflows and not in BADI workflows.

so this is not relevant for your case ,as you are using BADI workflow.

and so call

swc_get_element container 'BRANCHINDEX' branchindex is not considered in your case -> and so this will not update the container.

are your all systems at the same support pack level? please check..

if the BADI is the same in all the systems is same --> then might be some relevant notes are missing from the system where the problem occurs.

Edited by: khan voyalpad usman on Jan 31, 2008 8:16 PM

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

This badi may be tricky depending on your requirement but there is always a way to make it work.

I didn't notice your SRM version and SP level, but whatever the SP, I recommend you to check for notes and apply the maximum of them. Especially the one concerning the index in approval tables.

There maybe a bug in your implementation or not.

Try to do first a very simple badi implementation and test it. You'll know where the bug comes from (badi or standard).

About debugging, you can debug it. But don't expect the same behaviour of the workflow after a debugging session than in a normal session (without debug or break point). I cannot explain it but I already observed it. So trust only test without debugging.

If you need more information on what is going wrong, you can activate WF trace with the report BBP_WFL_TRACE.

Rgds,

Pierre

Former Member
0 Kudos

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

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.

Cheers,

Kris.

Former Member
0 Kudos

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

Regards

- Atul

khan_voyalpadusman
Active Contributor
0 Kudos

hi,

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.

😎 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??