cancel
Showing results for 
Search instead for 
Did you mean: 

Use Rules & Responsibilities in Workflow BADI for Approvers

Former Member
0 Kudos

Hi,

SRM 5.0. Classic Scenario.

I am using Workflow BADI for 4 level Approval in our scenario.

Approvers to be determined based on Shopping Cart Value.

Example: Our levels for approval strategy is

Level 1: 0-$500 no approval needed

Level 2: $500-$10,000 Cost center owner

Level 3: $10,000-$50,000 Plant Managers

Level 4: $50,000-$250,000 Pole Level

Level 5: $250,000 GM Level

Level 1 is taken care by Standard Workflow conditions maintained.

So for other levels,

What would be the best way to determine approvers?

How can we use Rules and responsibilities ?

Necessary steps to be taken in maintaining and using responsibilities ?

Note: Pls give step wise approach and FM's used.

ALL HELPFUL ANSWERS WILL BE REWARDED.

Thanking you,

Ashwin.

Edited by: Ashwin Kumar on Feb 12, 2008 6:13 PM

Edited by: Ashwin Kumar on Feb 21, 2008 12:33 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ashwin,

If you wanted to use standard workflow for Shopping Carts, you can determine approvers using the workflow approval BADI only.

As Usman and Disha suggested, please use a custom table for populating approvers and other fields used for determining approvers and workflow BADI should be able to determine approvers from this table.

Else if you wanted to use other dynamic agent determining techniques like Responsibilities/Rule/Expression etc , you may want to customise workflow template also.

Hope this helps.

Thanks

Venkat Pappu

Former Member
0 Kudos

Thanks SRM Gurus,

I had an idea of Custom table, but then what about the maintenance?

My functionals modified the workflow template to use rules & responsibilites.

Now I am using FM: RH_GET_ACTORS.

So, passing AC+rule number

CALL FUNCTION 'RH_GET_ACTORS'

EXPORTING

ACT_OBJECT = 'AC99900001' " THIS IS RULE NUMBER

  • ACT_TASK =

  • ACT_WI_ID =

  • ACT_PLVAR =

  • SEARCH_DATE = SY-DATUM

  • ACTOR_CONTAINER_OO =

TABLES

ACTOR_CONTAINER = LT_ROLE_CONTAINER

  • EXCLUDED_AGENTS =

ACTOR_TAB = LT_AGENTS

  • ERROR_TAB =

By passing the above concatenated rule number, i am getting all the users that are present under this rule number.

However, the rule has been created with cost centre as field.

Now my question is how to pass costcenter to this function module so as to get user based on costcenre.

Thanks for all the Support SRMers.

Ashwin.

Answers (1)

Answers (1)

khan_voyalpadusman
Active Contributor
0 Kudos

as starting point , please go through the sample implementation provided by SAP for the BADI

BBP_WFL_APPROV_BADI

For the determination of approvers by BADI--->

1 ) there are no standard function modules available.

2 ) Each customer has his own implementation.

3) Approver determination based on the values stored in the custom tables.

Edited by: khan voyalpad usman on Feb 12, 2008 9:11 PM

Former Member
0 Kudos

I already used that BADI, and used that sample implementation too.

However I need, by what means can i assign Approvers based on Shopping cart value?

Regards,

Ashwin.

Edited by: Ashwin Kumar on Feb 13, 2008 12:33 AM

Former Member
0 Kudos

Hi,

As Usman suggested,you can create a custom table to maintain all the Approver names and the corresponsing ranges for the SC value.In the Approval BADI,jst check the value of the SC at runtime(Use FM BBP_PD_SC_GETDETAILS) and then select the Approver names from the custom/Z table and pass to the approver structure in the badi.

BR,

Disha.

Do reward points for useful answers.