on 05-10-2012 1:59 PM
Experts,
We are into SRM 7.0 process controlled workflow. We have designed a multilevel workflow using BRF. I am looking to remove duplicate entry of the approver before shopping cart is ordered.
Level 1 = App1 ( immediate manager ) -- approver(s)
Level 2 = App1, App2 ( Category manager ) -- approver(s)
Level 3 = App2, App3 ( Cost center manager ) -- approver(s)
I want to remove duplicate entry of the approvers before it is ordered and I would like to make it in following way.
Level 1 = App1 ( immediate manager ) -- approver(s)
Level 2 = App2 ( Category manager ) -- approver(s)
Level 3 = App3 ( Cost center manager ) -- approver(s)
I tried to debug using stack to know where it actually fetches the approvers before SC is ordered. I didn't get any clue. I am not sure whether it was right directed attempt. Has anyone worked on such scenarion earlier ? Please share your ideas.
Thank you.
Best regards.
Hi Abhijit,
I am Having a similar issue.
How were you able to resolve it.
Regards,
Aakash Awasthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akash,
I am not sure whether your issue has been resolved or not. I am replying very late sorry about that. Sandy has suggested a very good pointer. I had not tried in this way.
I had tried a different way. In this approach, i was not able to remove the duplicate approvers before SC is ordered. As mentioned in earlier reply, I had used CALL METHOD /SAPSRM/CL_WF_APV_FACADE=>RETRIEVE_PROCESS_HISTORY. Using this method I used to get previous approver of the level then in the method, get_responsible_approvers, I was comparing this previous approver and used to remove it.
Disadvantage to use this approach is, when you order your cart, it would display all the approvers. Only after approving the current level, the previous approver would be disappeared from the very next levels. I hope you are getting what I am trying to say here. I would have attached screen shot of the SC and could have explained step by step but I am not working on SRM in these days.
Let's say when SC is ordered then it would display like below.
level 1 --- approver1, approver2, approver3
level 2 --- approver4, approver1, approver3
level 3 --- approver5, approver1.
After level 1, say approver1 approved, it would display like:
level 1 --- approver1 ( approved )
level 2 --- approver4, approver3 ( approver1 removed from level 2 )
level 3 --- approver5 ( approver1 removed from level 3 )
Thank you.
Best regards.
P.S. If you try any other better approach please post here. Thank you.
Hi Abhijit,
Thank you for the reply.
I am not sure, if I understand what you explained, but my scenario is somewhat different.
Please check the link once.
My problem is :
If a line item has 3 approvers, and other line item has 2 approvers, it takes 3 approvers, and the approver id for the level not needed is taken as global workflow admin as I used the logic, if approver is not determined, make the global WF admin as the approver.
So the point is, if I keep the level determination as it is acc to you for getting auto approved by the system, the approver id plays a crucial role here, as it goes to it for approval inspite of getting auto approved.
I guess I am doing something wrong while determining the process level, or I shud change the Process level config from 'ITEM LEVEL FOR PARTIAL DOCUMENT' to something else.
Thank You.
Aakash
Experts,
Any ideas/suggesions ?
I tried by calling get_buffered_instance and taskon factory.
That is not helping. Please share your ideas.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi abhijit,
pls debug in enhancment spot /SAPSRM/BD_WF_AGENTS of badi /SAPSRM/BD_WF_RESP_RESOLVER . method 2 ie is GET_APPROVERS_BY_AREA_GUID.
in this method every responsibility resolver will identified according to your business for a perticular line item which is based on the area GUID identified from the method GET_AREA_TO_ITEM_MAP. i would suggest keep the bp at the line rt_approver = lo_area->get_responsible_approvers( ).
here check the no of approvers for line item level and you can filter it as well.
reards
sahil p
Hello Sahil,
Thank you very much for your reply. I had debugged AREA_GUID earlier and I was able to see both approvers in the table and on the portal as well. However i didn't get clue to filter it before SC is ordered. Is there any specific method ? I have used
CALL METHOD /SAPSRM/CL_WF_APV_FACADE=>RETRIEVE_PROCESS_HISTORY earlier to remove approver who has already approved. But this method is useful after SC is ordered. I am looking to remove the duplicate approver before SC is ordered. How should I filter that as well ? Any method ?
PLease share.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.