cancel
Showing results for 
Search instead for 
Did you mean: 

Decision type 3, RR_MANAGER_OF_MANAGER not working?

Former Member
0 Kudos

Hi

we are using SRM7 with process controlled workflow for the shopping cart approval. We configured process levels

100 determine budget holder (bespoke implementation for RR, using field "user responsible field" in cost centre) to route the SC to the manager of the cost centre.

200 manager of manager (using the standard implementation of RR_MANAGER_OF_MANAGER), using an expression "if SC total value exceeds previous approver's limit". ie, we escalate the SC to the line manager of the budget holder. This expression uses the formula editor to make use of expression 0V_SC_TOTALVALUE and 0V_SC_PREVAPPROVLIMI

The interesting thing is that this works fine if we define decision type 1 = "Decision for entire document".

The only problem is that if a shopper enters two SC items relating to two different cost centres we would like to route the SC items to the managers of both cost centre.

Therefore I have changed the decision type in both process levels to 3 = "overall decision for partial document"

This works fine when I look at approvals and agents during creation of the SC. It determines the approvers correctly for both process levels (if the SC value is high enough). It also works fine when I start processing the first process level "budget holders". I get two task items to the two managers for the two different cost centres. Problem occurs however when it comes to the escalation step "line manager of budget holder" because the standard implementation of RR_MANAGER_OF_MANAGER doesn't determine the line manager - although it was showing it correctly during SC creation... I see the error in tx SWI1. It simply says "no approver found"...

Does anyone have an idea or have the same problem? If yes, how did you fix it?

I would appreciate any pointing to the right direction.

I have already created an OSS message with SAP, but was hoping that maybe someone else has a resolution?

Bjorn

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Just to confirm, did you bind the workflow template WS40000014.? check if these event type linkages as shown in fig are available.

Regards,

Karthik

Former Member
0 Kudos

Hi Karthik

yes, we did. We set it as per IMG config documentation. (see below)

The workflow as such works when i user header approvals (decision type 1 in the "Define Process Levels"). The problem arises using decision type 3, but the agents aren't determined using the standard RR_MANAGER_OF_MANAGER.

Bjorn

Check Event Type Linkage

Use

In this Customizing activity, you check the event type linkage.

Activities

To check the event type linkage, check whether an entry has been added for the main workflow and whether the linkage is active. This entry should contain the following:

  • Object category: ABAP class
  • Object type: /SAPSRM/CL_WF_PDO
  • Event: READY_FOR_WORKFLOW
  • Receiver type: WS 40000014 (main workflow)
  • Type linkage active: Checkbox selected

If the main workflow entry does not exist, choose New Entries and create it according to the settings above.

In addition, ensure that the following entry has been added:

  • Object category: ABAP class
  • Object type: /SAPSRM/CL_WF_PDO
  • Event: READY_FOR_RELEASE
  • Receiver type: SRM_PROCESS_RESTART
  • Type linkage active: Checkbox selected
Former Member
0 Kudos

I got some reply for SAP messages:

The problem seems to be that with decision type 3 an automatic approval step is added to the list of agents which basically results in WF-BATCH being the last approver of step 100. Since WF-BATCH obviously isn't assigned to the SRM org structure, the step Manager-of-Manager fails... makes sense, but since we use bog standard SAP workflow i assume this is a sap bug.

watch this space.

Former Member
0 Kudos

Hello Harzer;

Did you found a work around for this?  Did SAP provided a more helpful answer? I'm having almost the same exact issue, the step Manafer-of-manager fails because of WF-BATCH.

Thank you in advance and kind regards.

Cristian R.

Former Member
0 Kudos

Hi Cristian

no. unfortunately not. It came down to consultant questions which they won't cover.

I then spend quite some time to debug/reengineer/understand the logic the programs...

1)

My first problem actually was, that I assigned the wrong GUID in a bespoke resonsibility resolver implementation in the previous process level. ==> check your badi implementation code if in method ~map_responsibility_area you return the correct mapping of SC item GUID to the GUID of the responsibility area (eg. cost centres) - you need of course some ABAP OO knowledge here...

2)

Second problem is, that although you have defined item-based decision (3 or 4) the process level escalation is performed for the whole shopping cart. That means the BRF expressions/events for the process levels consider the whole document not its items...

In my case the issue was not finding a line manager once escalation reaches the top manager in the org structure. Best explained in an example:

item 1 - cost centre 1 - 10.000$

item 2 - cost centre 2 - 100.000$

approval limits for the responsibility areas would stipulate that following managers have to approve

cost centre 1: manager 2 only

cost centre 2: manager 1 and manager 2

manager 2 is also the HIGHEST manager in the org structure and i am using RR_MANAGER_OF_MANAGER...

Then, what happens is that alothough approval for item 1/cost centre 1 only requires approval of the top manager 2 it will still escalate and try to find a manger of manager 2 - and it of course will fail.

resolution:

I copied the Badi implementation of RR_MANAGER_OF_MANAGER and used the code and adjusted it to my needs... yet, again, you need a ABAP OO developer to do this if you are a functional consultant (luckily i double up, so after I cracked the logic, I could do this in a few hours...)

Sorry, not a better answer.

If you like and if I find some time I can neutralise my documentation and publish it?

Kind regards

Bjorn

Former Member
0 Kudos

Hello Bjoern Harzer;

Thank you for your comments. I ended up doing something similar to what you did. My requirement was to validate the total value of each line item of the SC and trigger a second step of approval if it exceeded a predefined amount. As you mentioned, the standard BRF's only consider total value of the SC and not the value per line item. I copied the Badi implementation of RR_MANAGER_OF_MANAGER as well since we needed the approver to be the manager of the previous approver level and in the method GET_AREA_TO ITEM_MAP I worked up the logic we needed.  For the first level of approver additionally of the mentioned method i had to re-write the method get_responsible_approvers of a Z class ZCL_WF_AREA_MANAGER (Copy of /SAPSRM/CL_WF_AREA_MANAGER) to get the approver information of the ECC system and in the method GET_AREA_TO ITEM_MAP i split the area of responsibility according to the account assignment  ( so it was 1 badi implementation for each level of approval). I currently i'm i have to implement a third level of approval almost exactly as the second level, with a higher amount validation, so i should not have problems with that.

It would not be a bad idea what you mentioned about publish a document about this, cause there are a lot of question regarding this in the forums.

Kind regards and thank you very much.

Cristian R.

Former Member
0 Kudos

Hello Bjoern Harzer / Cristian,

Do you have any documentation over the above scenario. If yes, please publish it as it would be helpful for people like us to explore on same functionality.