cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Shopping Cart approval by manager with correct approval level

Former Member
0 Kudos
196

Hi

Just wondering if anyone can help me.

My requirement is to allow an employees manager to approve their shopping cart provided the managers approval limit is greater than the value of the shopping cart. If the managers approval limit is not large enough I want the workflow to go to the managers manager. I want this process to continue until a manager with an approval limit big enough is found.

I realise populating the SLAPPROVER attribute, and configuring RR_SPENDING_LIMIT_APPROVER as the responsible approver would achieve this, but I am looking for a way to do this so the SLAPPROVER attribute does not have to be populated and maintained. I intend to bring the organisational structure in from our core SAP application, therefore I will automatically have all the managers identified. The approval levels will be setup using roles.

Any good suggestions gratefully received.

Thanks

Claire

Edited by: Claire Crosby-Clarke on Nov 11, 2009 11:04 AM

Edited by: Claire Crosby-Clarke on Nov 11, 2009 12:27 PM

View Entire Topic
masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can create custom agent BADI implementation for getting approver from Org.structure and role.

You can copy BADI implementation for spending limit and change the logic to check role.

Regards,

Masa

Former Member
0 Kudos

Hi Masa

Thanks for your suggestion.

Can I just confirm, that to create the custom agent BADI I do this in the IMG:

SAP Supplier Relationship Manager / SRM Server / Cross Application Basic Settings / Business Add-Ins / Business Workflow / Process Controlled Workflow / - Execute 'Define Agents', then create a new implementation with:

Enhancement Implementation Name = whatever I want to call it

Composite Enhancement Implementation - not quite sure what I need to enter here - would this be '/SAPSRM/BD_WF_SC' ?

Presumably then I need to get an access key to register the object I am creating?

Your guidance would be appreciated.

Many Thanks

Claire

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I usually do following steps. Off cause there are many other ways to implement.

1. Define Resolver name

Go to IMG, Define Filter Value for BADI Define Agent, Z_AAA(any name)

2. Find SAP sample implementation which is close to your logic. In this case, approved by responsible purchasing group, type 4

Go to IMG, BADI section, Define Agents

Display BADI implementation /SAPSRM/BD_WF_SC_RR_PGRP

Select Implementation Class

Copy Implementation Class /SAPSRM/CL_IM_WF_RR_PGRP_SC

3. Copy SAP sample class to your name space and enhance it to your logic.

Go to SE24 and copy /SAPSRM/CL_IM_WF_RR_PGRP_SC that you found at step 2 to Z_BBB(any name)

Change the method GET_AREA_TO_ITEM_MAP based on your logic

Change the method GET_APPROVERS_BY_AREA_GUID based on your logic

4. Create Enhanced Implementation

Go to IMG, BADI section Define Agent, Create

Enhanced Implementation Z_CCC(any name)

Composite Enhanced Implementation (blank)

BADI Implementation Z_DDD(any name)

Implementation Class Z_BBB <- you have created at step 3

BADI Definition /SAPSRM/BD_WF_RESP_RESOLVER

5. Activate Enhanced Implementation

Set the filter value.

DOCUMENT_TYPE = BUS2121

RESP_RESOLVER_NAME = Z_AAA <- you defined at step 1

Check Runtime Behavior, Implementation is active

6. Define "Define Process Levels"

7. Test & debug

Set the breakpoint in your method GET_AREA_TO_ITEM_MAP and GET_APPROVERS_BY_AREA_GUID

Regards,

Masa

Former Member
0 Kudos

Hi Masa

Thanks very much for your help, I have now managed to do what I want.

Kind Regards

Claire