cancel
Showing results for 
Search instead for 
Did you mean: 

Excluded Agent restricts our Buy on Behalf approval process

Former Member
0 Kudos

We are implementing a step in the BRF that if a shopping cart is bought on behalf of another user ( we will call him A ), then the first approval will go to user A.

however, the standard determination of excluded agents within SRM 7 is to use the document owner as the excluded agent. Therefore, since user A is not in effect the creator of the shopping cart, but is marked as the requestor and hence the owner of the shopping cart, that user is excluded from the approval.

I have already implemented the workflow BADI to use the fallback agent determination when user A is first removed from the list; however, once the workflow task is created, user A is still in the excluded agent section which prohibits the user from seeing the shopping cart approval in their inbox to approve.

How can I remove the document owner from the excluded agents and possibly put in the document creator instead? This would keep the business rules of the document creator/owner still being excluded except in the cases where we have this buy on behalf situation.

Thank you.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you for your suggestion, but I was able to resolve it.

The actual issue was from within the Workflow Excluding the owner of the document. I switched it to the initiator of the workflow and that has solved it.

Commenting out that code as you specified would only serve to allow the BADI determining the agent to work without using the fallback section. That would not impact the overall excluding of the owner of the document on the task when the workflow is enacted.

Former Member
0 Kudos

Hi,

The purpose of the fall back agent method to let SRM workflow admin to add as approver when system could not determine any approver for a scenario, so that workflow will not hang on.. Technically, Partner Function 16 and 20 will be played main role to determine the requester of the SC, when you buy for BOB then 16 and 20 will be updated with the user partner guid of the BOB and creator will be who create the SC, but when you buy for yourself then all these these fields value will be your id only. The way you implement would fail if your business requirement is need SL Approval functionality.

Saravanan.

Former Member
0 Kudos

Hi,

SAP won't allow to add requester in the approval list in SRM 7.0. even you add them into approval_table , SAP standard code will be deleted back in the class /SAPSRM/CL_WF_PROCESS_MANAGER~GET_RESPONSIBLE_AGENTS.

lt_excluded_agents = lo_wf_pdo->get_document_owner( ).

LOOP AT lt_agent REFERENCE INTO lr_agent.

READ TABLE lt_excluded_agents FROM lr_agent->approver_id TRANSPORTING NO FIELDS.

CHECK sy-subrc EQ 0.

DELETE TABLE lt_agent FROM lr_agent->*.

ENDLOOP.

to achieve this requirement, you need to remove the above code and delete the excluded agent in the task level.

Saravanan