cancel
Showing results for 
Search instead for 
Did you mean: 

WF badi

Former Member
0 Kudos

Hi all,

We have identified that n-step(6-steps) approval workflow BADI needs to be

activated.We are working on SRM 4.0,R/3 4.6C.

I have the organization plan where the users have have been integrated.I have

assigned the roles of employee and manager to the relevant users.My questions

are:

--Where am i supposed to define the spend limit and approval limit(for managers

only) for each user?

--Do i have to activate any tasks/events or assign any users(similar to 1-step etc

workflows)?

--The developer has to create a table...what does the table contain?

Where can i find the n-step approval table?

--And apart from creating an organization plan and integrating users,what

is the role of a functional person(me?) when activating a n-step BADI?

Please direct me.

Thank you

Trey

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Trey

For spending limit and approval limit, its defined in the roles. Double click into a role and go to the "Personalization" tab. There you can define the Approval and Spending limits.

For the rest of your questions, what kind of n-Step are you using? Value-limit or just normal n-Step.

For more information, on normal n-Step approval determination you should look at the IMG.

<i>Supplier Relationship Management -> SRM Server -> Business Add-Ins for Enterprise Buyer (BAdIs) -> SAP Business Workflow -> Determination of Approvers for n-Step Dynamic Approval Workflow</i>

If you require more information, I can send you a document if you provide your email.

Former Member
0 Kudos

Hi Disha,

Thanks for all the explanation.It really helped.To answer your question,we are using 'item based workflow-ws14500015'.

1.]I have activated the above workflow in transaction OOCU(event linkage).Is there anything else that i need to activate?Start Conditions?

2.]I checked 'PFCG'.But,in my case there are multiple managers and employees with differing spend and approval limits.Where am i supposed to define those for each user?How about in extended attributes...PO Value limits?Is output limit same as spending limit?

3.]Here is the confusing part for me:

When is a custom table maintained and when is the organization plan used to determine approvers?

--In my case,if the SC value is above the spend limit of the user,the SC keeps moving up the organization plan,untill it finds a manager whose approval limit is greater than the SC.For this,no custom table is required,right?Please correct me if i am wrong.

In another case,we have identified a certain manager when SC contains products from a certain product categorydo we maintain a custom table for this??Where can i find the table in the system?

Also,when you said--n-step header level workflow,was the SC split based on the information at header level?Can you please explain?

Please let me know your views on the above queries.

Thanks a lot.

Trey

Nicholas,

My e-mail is is srmhelp@yahoo.com.Would appreciate it if you can mail me the doc.Thanks.Please spare some time to clear my above doubts.

Former Member
0 Kudos

Hi Trey

To your question 3...

For your first scenarion, you can use the Single-step Value Limit workflow (WS10000276) as shown in the documentation I sent you.

If you need to do a custom approver, I am afraid that that solution will not work and you need to use the normal n-Step (WS14000133) and customise the approvers via a custom table as mentioned by Disha.

For the rest of your questions I shall leave it to the rest.

Nicholas

Former Member
0 Kudos

Hi Trey,

For the WF 14500015 there are not start conditions to be mainatined.

Yeah you can either define the spending limit & approval limit in PFCG based on roles or in PPOMA_BP-->Extended attributes -->PO value limits for each user.

You can either determine te apporvers form Org chart ormantain a custom table to determine the approvers..mainatining a custom atble is useful particularly if your Approval is based on various criteria...to give you an eg..Say if teh SC value is above a certain limit,itmes innSHC belong to 'XYZ' category and the Cost center for teh user is 'XXX' then my approver will be 'ABC'. In yur case if you want to jsut determine teh approvers based on the spending limit then no need to mainatin a custom table.....In this case the WF 10000276(1 step) and wf 14000109(n step) are suitable.

ws10000276 is a <b>single</b> step WF wherin the total value of the SC is compared with the spending limit of the creator and accordingly the approver is determined(going up in the org chart).

For this WF, you have to maintain the starting conditions and the Approver in the attribute "SLAPPROVER".

ws14000109 is a nstep WF where teh same logic i followed as above to determine theapprover and the approval process continues until the appropriate Approver is found.however all the ntermediate approevrs have to approve the Witem so it becomes a n-step sequential WF.

WS14000133 is the header level n step WF wherin you can base r apporval on criteria such as product category,cost center ,total value of SC etc.

If you want item level approval then you need to use wf WS14500015.Again teh criteria can be decided as per ur reqt.

Just for ur info,in our case,we had put up a restriction that all the items in the SC should be of the same product category and Cost centre(while creating the SC) and hence the WF WS14000133 completely suited our reqts....

right now i dont have access to the system...But acc to ur needs and criteria ..you can finalise on one of the WF's mentioned above..note all the SC approval WF's are for Object BUS2121.

In case you require any help..Please do let me know....Hope this will give you a starting point...

BR,

Disha.

Pls reward points if answers are helpful.This is the best way to thank the contributors!

Former Member
0 Kudos

Hi Trey,

You can also define spend limit value to each user or at organization level.

For that u need to create Zattribute in Table T770MATTNR,

assign the attribute to user with spend value.

Use FM BBP_READ_ATTRIBUTES to get values , while processing SC for approval.

Regards,

Gopal

Former Member
0 Kudos

Hi Trey,

Whcih n-step WF have you identified to be used???

I have succesfully implemented the n-step header level WF(ws14000133)through the BADI BBP_WFL_APPROV_BADI.

--> For Spend limit and approval limit,you can define those for the ROles(say for managers role)in tcode PFCG under PERSONALISATION tab.There you have to mantain the attributes "BBP_APPROVAL_LIMIT" and "BBP_APPROVAL_LIMIT".

-->If you are using the n-level wf through BADI,you just have to take care that only that WF is active(i.e.event linkage) for the Object type BUS2121(for Shopping cart) and event saved in tcode SWE2.

For the n-level approval WF's there are not starting conditions to be maintained!

-->The developer has to basically create a custom table or getting the approvers name(Users).Preferably i would suggest maintain your custom table to get the appprovers then to get teh users form the Org structure(for this you may have to write a Z Fm to fetch the users from ORG chart)

In the BADI, the table Approval tabel needs to be populated with the appropriate users at runtime which are then passed to the WF.

-->if you are selecting the Approvers based on some conditions say based on of Cost centre of the user,teh approver should be 'XYZ' or 'ABC',then these values will be picked up through teh org chart and you have to take care that these are properly maintained at the org level.

Otherwise teh whole logi of Approval process will be in ur BADI acc which the Approval process will work.

If any more help is needed ..Pls do let me know...hope this helps...

BR,

Disha.

Pls reward points if the answers are helpful.

former_member191111
Participant
0 Kudos

Hi Disha,

I am trying to implement this WFws14000133 .

I have just Actvate Event linkage & place http break point on BADI Imp SAP_LIA_BADI_EXMPL_2 since it's already implemented & Active .

But while creating Shopping Cart it's giving error:

<b><i>Approval workflow is ambiguous. Inform system administrator</i></b> .

Could you suggest any idea?

Regards,

Sachin

Former Member
0 Kudos

Hi Disha

As per your post, I would like to ask, How do I get the logged-in user, I would be needing this to retrieve data from the Org Structure given its a 2nd or 3rd level approver.

"-->The developer has to basically create a custom table or getting the approvers name(Users).Preferably i would suggest maintain your custom table to get the appprovers then to get teh users form the Org structure(for this you may have to write a Z Fm to fetch the users from ORG chart)

In the BADI, the table Approval tabel needs to be populated with the appropriate users at runtime which are then passed to the WF."

How to trace WFL, what badi is called.

Thanks!