cancel
Showing results for 
Search instead for 
Did you mean: 

Use HR Structure for Agent Determination in Shopping Cart Workflow SRM7.0

Former Member
0 Kudos

We are implementing a Shopping Cart Approval Workflow in SRM 7.0. The process is that the Requester creates a Shopping Cart and an approval process will take effect.

The approvers will come from an HR structure wherein the direct superior (or supervisor) is the first approver. The second approver is the direct superior of the first approver; and so on, until the Shopping Cart is approved. A maximum of 7 approvals can be done in a Shopping Cart document.

I would like to ask the following:

1. How can I achieve this in our WF? I tried to implement BADI /SAPSRM/BD_WF_RESP_RESOLVER but I was not able to activate it (there are other active implementations for this in Shopping Cart).

2. If there are other suggestions on how to accomplish this, please let me know.

Thanks in advance for your help.

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Following Responsible Resolver Filters are available in standard.

RR_MANAGER Get Creator's Line Manager for Approval

RR_MANAGER_OF_MANAGER Get Manager of Previous Approver for Appral

CONF_RR_SOURCE_DOCUMENT_OWNER Confirmation: Owner of Source Document

INV_RR_SOURCE_DOCUMENT_OWNER Invoice: Owner of Source Document

QTE_RR_PURCHASING_MANAGER Quote: Get Manager of P. Group (Header) for Appr.

RR_EMPLOYEE Specify Employee for Approval

RR_PURCHASING_MANAGER Get Manager of P. Group (Header) for Appr.

RR_REPORTING_LINE_UNIT Get all Employees of Specified Dept. for Approval

RR_ROLE Get all Users of Specified Role for Approval

RR_SPENDING_LIMIT_APPROVER Get Requester's Spending-Limit Approver List

SC_RR_PURCHASING_GROUP Shopping Cart: Get Purchasers of Purch. Groups for Approval

Regards,

Masa

Answers (6)

Answers (6)

Former Member
0 Kudos

All is working fine.

1. We created BRF expressions for Release Strategy Z_RES_STRAT and Approver Levels Z_APP2 up to Z_APP7.

2. We created and assigned Function Modules to populate these BRF expressions.

2. Then we created BRF events that will compare the Release Strategy with the Approver Level.

3. We assigned the BRF events to our process level configurations and all worked fine.

Thanks for your help.

Former Member
0 Kudos

We created a custom expression for the Release Strategy and assigned it as one of the Rules on our schema definition. The Release Strategy gets populated at the schema evaluation. However, during the process level evaluation, this value is empty.

How can we pass the value of the expression from the schema event evaluation to the process level evaluation? Please send us the procedures. Thanks again for your help.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Schema evaluation returns schema name and level evaluation returns true or false.

My idea was follows.

Schema evaluation checks required approval steps and return schema name like ZSC1, ZSC2, ... ZSC7.

Each schema has fixed approval step and each level evaluation returns always true.

Does this fit for your scenario?

Or do you need dynamic approval step in the middle of approval flow.

For example, it depends on 2nd approver, approval step will be 4 or 7.

Regards,

Masa

Former Member
0 Kudos

I made some revisions with the FM that populates the Manager Level expression. Right now, I was able to get the value in SLG1 and compare this to the Release Strategy expression.

I still need to test this for each process level but looking into things right now, I hope I could proceed with this.

Thanks for always answering my inquiries.

Former Member
0 Kudos

Thanks Masa.

We created 2 custom expression for our requirement and copied FM /SAPSRM/WF_BRF_0EXP001 to put values on those expressions. Then, on our BRF we compared these 2 expressions. After putting the Eval. ID on the process level configurations, we were able to see in SLG1 that the fields are populated correctly. However, we just put constant values on the custom expressions so we can proceed with testing.

There is one problem in terms of populating the other custom expression. This expression is for the Level of the Manager. I understand that this custom expression is populated before RR_MANAGER_OF_MANAGER. I would like to understand how to get the next approver in the copy of FM /SAPSRM/WF_BRF_0EXP001. In this way, I can get the Manager Level from table HRP5581 and use this to compare with the Release Strategy. If this will not work, is there a way to get the work item ID for the WF so I could get the previous approver then get the superior of the that previous approver and then get the Manager Level from there?

Currently, only the GUID and Object Type is populated in the FM. Can I reuse some of the fields from other expressions so I can achieve my requirement?

Thank you very much for your help.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

How about cheking number of approval step when SC is created? ( at beginning of workflow = schema evaluation).

User A : 7 step approval is required. Becuase his/her Org Unit is the lowest position in the Company.

User B : 1 step approval is required. Because his/her Org Unit is the top position in the Company.

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

I tried to use 0EV000 but it only worked for the first process level (Level 100).

The business process is to compare the Release Strategy (determined from ECC) with the Level of the Manager (HRP5581-PERSK). If the Level of the Approvers from RR_MANAGER and/or RR_MANAGER_OF_MANAGER is less than or equal to the Release Strategy, then the approval must proceed. If not, then the approval ends.

I currently do not know if there is a field for Release Strategy in BRF. I'm gearing towards creating the custom fields in BRF and use them in the evaluation.

I would need help in creating the custom fields, how the fields should be populated at runtime and how to use this in the BRF. If you could send us a documentatation of how to do this, it would be really helpful.

Thank you very much for answering all of our questions.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can define custom expression to check number of approval steps in schema evaluation based on your business rule.

or

You can define max approval levels in 1 schema and each custom level evaluation returns trule or false.

Regards,

Masa

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I think you need custom BRF expression with FM type.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/1a/0cd140788c702ae10000000a155106/frameset.htm

Please copy FM /SAPSRM/WF_BRF_0EXP001 and change it.

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

Thanks again for answering, however your suggestion did not work.

We tried to create a custom BRF event and assign the following formulas on it.

1. 0V_SC_APPROVAL_LIMIT <= 0V_SC_TOTALVALUE - this compares the Approval Limit of the Approver with the Total SC value. However, the WF went to automatic approval (not correct).

2. 0V_SC_USRBUDGTDFND <= 0V_SC_TOTALVALUE - this compares the User Budget of the Approver with the Total SC Value. However, the WF also went to automatic approval (not correct).

My question is: is it possible to create a custom expression and use this custom expression in the custom BRF event? If this is possible, can you please us steps on how to do this?

Thanks in advance for your help.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Before you play with BRF expression, please test with 0EV000 and make sure RR_MANAGER and RR_MANAGER_OF_MANAGER work.

After that you can define custom BRF event and Expression based on your business requirement. You can check BRF result in SLG1 log.

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

Thanks for your inputs. We used Resolver Names RR_MANAGER and RR_MANAGER_OF_MANAGER below to determine the approvers in Shopping Cart. In the Process Level Configuration, we assigned RR_MANAGER to get the first approver. For the succeeding steps (until 7th), we used RR_MANAGER_OF_MANAGER.

When we tried to test it, we encountered a problem.

- For a SC document with one level of approval, the WF does not stop with the first approval. It goes to the next approver and so on. The correct process is to stop after the first person approves the WF.

We would like to know how we can evaluate this part in the process level definition. We understand that there are BRF's available, but we don't know which fields to use.

Thanks again for providing answers to my questions.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Please use 0EV000 evaluation(event) which returns always X doe Level evaluation.

Regards,

Masa