cancel
Showing results for 
Search instead for 
Did you mean: 

Know if the SC is shop on behalf

joseph_fryda2
Participant
0 Kudos

Hi,

I'm using process-controlled workflow, and i would like to know if the SC is "shop on behalf" someone and send the approval task to the requester.

I have created a "SAP Formula Interpreter" expression that return me true if:

0V_SC_CREATEDBY <> 0V_SC_RQUSTONRNM

Is that correct?

If yes, how now do I send the approval task to the requester?

Regards,

Joseph

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Joseph,

I think you should create a new Rule for Approver determination.

SPRO->SAP Supplier Relationship Management->SRM Server->Cross-Application Basic Settings->Business Workflow->Process-Controlled Workflow->Business Process Configuration->Define Filter Values for BAdI 'Define Agents'

And assign it to your step in schema. (TA /SAPSRM/WF_PROCESS)

Then you should create a BADI Implementation with defined filter value.

SPRO->SAP Supplier Relationship Management->SRM Server->Business Add-Ins->Business Workflow->Process-Controlled Workflow->Define Agents

As a reference you can use Implementation /SAPSRM/BD_WF_SC_RR_EMPLOYEE.

Important are methods

/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP

/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID

First creates a mapping for grouping positions.

You can copy it from the class /SAPSRM/CL_IM_WF_RR_EMPLO and just change line

* Verify employee ID of configuration table

  lv_employee_id = is_current_process_level-resolver_param.

with the requester determination.

Second method you can just copy from /SAPSRM/CL_IM_WF_RR_EMPLO

Best Regards

Konstantin

Answers (1)

Answers (1)

joseph_fryda2
Participant
0 Kudos

Hi Konstantin,

Thank you for the reply.

Regards,

Joseph