cancel
Showing results for 
Search instead for 
Did you mean: 

Tips for procesess controlled workflow

Former Member
0 Kudos

Hi everyone,

We need your help. We are in SRM 7. We have to create a WF for SC. The approver of the item depend of the account assignment category (AAC). For example, we have a SC with 2 items. The first item has the AAC "Cost center" and the second has the AAC "Asset". In this case, the item 1 has to be approved by approver 1 and the item 2 has to be approved by approver 2.

What do you recomend to do this?

Thanks,

Ivá

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa

Answers (5)

Answers (5)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa

Former Member
0 Kudos

Hi Masa,

I have implemented the BADI /SAPSRM/BD_WF_RESP_RESOLVER that have the same methods as /SAPSRM/BD_WF_SC_RR_PGRP:

GET_AREA_TO_ITEM_MAP Area of responsibilities for document items

GET_APPROVERS_BY_AREA_GUID Agents working in the responsibility area

Is this implementation equivalent to /SAPSRM/BD_WF_SC_RR_PGRP?

Regards,

Ivá

former_member578547
Participant
0 Kudos

Similar to that , you need to build your logic.

Balaji.T

Former Member
0 Kudos

Hi,

We develop the badi and it works, but we need one more suggestion. Now, we need a second process level. In this level, only items with AAC "cost center" are taken in count and only if the price of the item is more than a X value. For example, you have the following SC:

Item 1: ACC= CC and Price = $100

Item 2: ACC= AS and Price = $100

Item 3: ACC= CC and Price = $10

Item 4: ACC= AS and Price = $10

Item 5: ACC= OR and Price = $100

In this case (consider that the second level applies only for items with price more than $90), the approvers have to be:

Level 1 / Level 2

Item 1: approver for CC / approver for more than $90

Item 2: approver for AS

Item 3: approver for CC

Item 4: approver for AS

Item 5: approver for OR

What do you suggest?

BR

Ivá

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You need following 2 logic.

1. Level Evaluation. If there is an item with CC and price over $90, return TRUE. Please define custom BRF event and expression.

2. Agent BADI and exclude items which do not need 2nd level approval in GET_AREA_TO_ITEM_MAP.

Regards,

Masa

Former Member
0 Kudos

Thanks Masa

Former Member
0 Kudos

Hi Masa.

I was Reading this forum regarding this agent determination and would like to ask your advice.

I had an issue that I was able to solve, but I am not happy with the solution. I kindly ask your advice to check if the solution is OK or could be improved.

I have implemented item-based PCW for SC with several levels. The 6th level is regarding cost approval.

In the method GET_AREA_TO_ITEM_MAP I create the areas of responsibility accordingly based on the cost objects. After this I call ERP to determine the approvers in GET_RESPONSIBLE_APPROVERS that calls my custom area object->GET_RESPONSIBLE_APPROVERS to return the approvers. So far so good, everything is working fine. The issue happens when the approver for the cost object is equal to the requester.

The system eliminates the approvers as expected and method fallback agents is called where I assign an administrator, BUT the customer wants this approval to be excluded when approver = requester. My problem is that the area of responsibility is already created and an approver is required for that.

My solution was to call the function module to return the agents, check if the approver NE requester and then created the area of responsibility. I did not like this solution because the function module will be called again later in area object.

Do you have a better solution for this ? Like eliminate this area of responsibility after it is created, just after I know the approvers ?

Thanks and regards

Denis

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Agent BADI is a solution.

/SAPSRM/BD_WF_SC_RR_PGRP is the good exsample.

-


Define Agents

Use

This Business Add-In (BAdI) is used in the SAP Supplier Relationship Management (SAP SRM) Workflow component (SRM_EBP_WFL).

You can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent groups for approval.

1. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP to assign the document items to a specific agent group. This assignment can be made by specifying the area of activity of that group. The area can be a technical key identifying the group itself or can also identify a master data range (for example, a cost centre range or an organizational branch) for which the agent group is responsible. When you return an initial item ID and specify a single area, you indicate that all document items should be assigned to a single agent group for approval.

2. Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID to return all members of each individual agent group.

3. Optional: Use the following methods in cases where you need an additional parameter for evaluating the assignment of the different agent groups:

a) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4 to provide an input help for your additional parameter.

b) Use method /SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER to check the user's input for your additional parameter.

4. Optional: Use method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_FALLBACK_AGENTS to specify the fallback agents that are used when method /SAPSRM/IF_EX_WF_RESP_RESOLVERGET_APPROVERS_BY_AREA_GUID does not return any results, that is, when the system cannot determine a responsible agent.

Note:

Fallback agents can approve or reject the items of a document or they can forward the work item to another processor.

Requirements

You have defined filter values in Customizing for SAP SRM under SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process-Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdI 'Define Agents'.

-


Regards,

Masa