cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR - Strategy ZXXXXXXXX did not determine approvers.

Former Member
0 Kudos

Hi all,

We are on SRM 7.0 and are in the prcoess of configuring the n step approval workflow for shopping crat using PCW.

We ahve done the procss level and prcoess schema config for the shopping cart worklfow but now when ordering the shopping cart,the approvers are not getting determined,

When I click on the APPROVAL PROCESS OVERVIEW tab,I see the error in red under column PROCESSSOR ;

Strategy ZXXXXXXXX did not determine approvers.

Also when I click on the link DISPLAY/EDIT AGENTS(at header level),I see that PROCESSOR column has the value SYSTEM!

Also when I put a brekapoint in the custom implementation of the badi,.the breakpoint doesnt stop at the code when I clcik on the APPROVAL PROCESS OVERVIEW tab which means the BADI is not getting called at all.

The BADI implemebtation/class ias active.

The strange thing is in the prcoess level configuration,I ahve not added any process level for APPROVA(AUTOMATIC STEP FOR APPROVAL OF CART) but still when I order this cart,it gets automatically approved!

Pls advise.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do you any condition to determine the process schema, i feel that process level did not find the approver.. just implement the GET_FALLBACK_AGENTS and check whether approver assign in the fall back method display in the approval preview..

Saravanan

Former Member
0 Kudos

Thanks Saravanan!

But my BADI implementation for /SAPSRM/BD_WF_RESP_RESOLVER is not getting called at all as when I put an external breakpoitn with the REQUESTER ID,control doenst go to badi when creating a cart and after clicking on te APPROVAL PROCESS OEVRVIEW tab.

Is this a std bug that sometimes the implementation of BADI /SAPSRM/BD_WF_RESP_RESOLVER doesnt get called??

Also as an alternative solution,do you wnat me to implement the badi method GET_FALLBACK_AGENTS ?I have implemented the method GET_FALLBACK_AGENTS also to populate the table " rt_agent" with the approver name.But again when i put the breakpoint in this badi,it doesntget triggered at runtime in debug mode.

Also can you confirm if the APPROVER ID in bpoth methods GET_FALLBACK_AGENTS and GET_APPROVERS_BY_AREA_GUID have to be in the format "USXXXX".

I'm populating the APPROVER ID somethign like "USxxxx".

Edited by: cg_srm on Oct 13, 2011 1:36 AM

Former Member
0 Kudos

Hi,

I never try maintaining as "USxxxx". i think that could be the reason.. try maintaining as USXXXX".

Saravanan

Former Member
0 Kudos

Thanks...I have maintained the approver ID in all capital letters..It was a typo mistake in prevous reply...

E.g. USDAVIDL

Also have implemented the method GET_FALLBACK_AGENTS also to populate the table " rt_agent" with the approver name.But again when i put the breakpoint in this badi,it doesntget triggered at runtime in debug mode.

I don't underatnd why my BADI implementation is not getting triggered?

Edited by: cg_srm on Oct 13, 2011 2:40 AM

laurent_burtaire
Active Contributor
0 Kudos

Hello,

Be sure filter values you gave to your BAdI implementation are correct. If not, method will not be triggered.

Regards.

Laurent.

Former Member
0 Kudos

Hi Laurent,

The filter values have been defined correctly in the BADI implementation.The filter value alos appears in the error message "Strategy ZXXXXXXXX did not determine approvers"

BUt as mentioned,none of the two methods i.e. GET_APPROVERS_BY_AREA_GUID and GET_FALLBACK_AGENTS are triggered.

I'm just totally clueless why the BADI implementation is not getting triggered!

Pls advise.

Former Member
0 Kudos

Hi,

The first method GET_AREA_TO_ITEM_MAP is trigger then follow by GET_APPROVERS_BY_AREA_GUID, does GET_AREA_TO_ITEM_MAP trigger in dedug mode?

Saravanan

Former Member
0 Kudos

Thanks Saravanamn for the response.

I impleented the following code(For testing DEBUG) in the method GET_AREA_TO_ITEM_MAP and it did get triggered:

IF is_document-document_type = 'BUS2121'.
    EXIT.
  ENDIF.

The code I have written in the other method "GET_APPROVERS_BY_AREA_GUID" which is not getting triggered is:

DATA : ls_approver TYPE /sapsrm/s_bd_wf_approver.

  ls_approver-approver_id = 'USGARYL'.
  APPEND ls_approver TO rt_approver.

Former Member
0 Kudos

Hi,

you have updated these two fields..

ls_approver-APPROVER_OT = 'US'.

ls_approver-APPROVER_ID = only user id 'GARYL'

APPEND ls_approver TO rt_approver.

Saravanan

Former Member
0 Kudos

Thanks Saravanan.

I still dont understand why one methiod in in the BADI gets triggered while the other does not.

After making the suggested changes in the badi code,I still get the same error "Strategy ZXXXXXXXX did not determine approvers".

Former Member
0 Kudos

Hi,

Can you please share your code of the GET_APPROVERS_BY_AREA_GUID?

did you use method get_leading_object_id to get the leading object GET_APPROVERS_BY_AREA_GUID? if not then implement the below method in Badi GET_APPROVERS_BY_AREA_GUID.

DATA: lo_area TYPE REF TO /sapsrm/if_wf_area.

lv_lead_id = lo_area->get_leading_object_id( ).

variable lv_lead_id is basically parameter of lo_area of the method GET_AREA_TO_ITEM_MAP.

Saravanan

Former Member
0 Kudos

Thanks Saravanan.

The code in the method GET_APPROVERS_BY_AREA_GUID is;

DATA : ls_approver TYPE /sapsrm/s_bd_wf_approver.

if is_document-document_guid IS NOT INITIAL.

ls_approver-approver_ot = 'US'.
ls_approver-approver_id = 'TOML'.
APPEND ls_approver TO rt_approver.
ENDIF.

If i write the below code(as you suggested) in the above method,I see the below error:

DATA: lo_area TYPE REF TO /sapsrm/if_wf_area.

lv_lead_id = lo_area->get_leading_object_id( ).

ERROR :Field "LV_LEAD_ID" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.

Cna you please let me know what code should I write in the other method GET_AREA_TO_ITEM_MAP also?

Is there any dependancy on these two methodS?

Pls advise.

Edited by: cg_srm on Oct 19, 2011 8:45 PM

Edited by: cg_srm on Oct 19, 2011 8:45 PM

Former Member
0 Kudos

Hi,

I think , you miss the whole concept behind the PCW, better look at this Badi '/SAPSRM/BD_WF_AGENTS_SC' example and implement the logic. You just put the code GET_APPROVERS_BY_AREA_GUID , that why the problem . refer the Badi example and implement the logic .

DATA : ls_approver TYPE /sapsrm/s_bd_wf_approver.

if is_document-document_guid IS NOT INITIAL.

ls_approver-approver_ot = 'US'.

ls_approver-approver_id = 'TOML'.

APPEND ls_approver TO rt_approver.

ENDIF.

Saravanan

Former Member
0 Kudos

Thanks Saravanan.

can you briefly tell me what is the link between the two methods GET_APPROVERS_BY_AREA_GUID and GET_AREA_TO_ITEM_MAP?Do I need to implemenet both these methods for poulating the approvers for teh shopping cart process levels??

I am not very familiar OOPS approach of coding and hence unable to clearly understand what the code in tyhe std implementation in these methods do.

The implementation code which I copied is as follows:

IMPLEMENTATION -->/SAPSRM/BD_WF_SC_RR_EMPLOYEE

IMPLEMENTATION CLASS-->/SAPSRM/CL_IM_WF_RR_EMPLO

GET_AREA_TO_ITEM_MAP

DATA lv_employee_id      TYPE bu_partner.
  DATA lv_employee_guid    TYPE bu_partner_guid.
  DATA lo_area             TYPE REF TO /sapsrm/if_wf_area.
  DATA ls_area_to_item_map TYPE /sapsrm/s_wf_item_to_area.


* Input checks
  ASSERT ID /sapsrm/wf_cfg CONDITION ( NOT is_document IS INITIAL ).
  IF is_document IS INITIAL.
    RAISE EXCEPTION TYPE /sapsrm/cx_wf_abort.
  ENDIF.

* Verify employee ID of configuration table
  lv_employee_id = is_current_process_level-resolver_param.
  CALL FUNCTION 'BUPA_NUMBERS_GET'
    EXPORTING
      iv_partner      = lv_employee_id
    IMPORTING
      ev_partner_guid = lv_employee_guid.
  IF lv_employee_guid IS INITIAL.
    lv_employee_guid = /sapsrm/if_wf_process_c=>gc_nil_guid. "fallback agent
  ENDIF.

* Create responsibility area (responsible for the employee's default department)
  lo_area = /sapsrm/cl_wf_area=>/sapsrm/if_wf_area~create_instance(
    iv_area_type         = /sapsrm/if_wf_process_c=>gc_area_type_employee
    iv_leading_object_id = lv_employee_guid
    ).

* All items are assigned to a single area
  ls_area_to_item_map-area_guid = lo_area->get_guid( ).

* Return responsibility area GUID ... w/o item assignment (nil GUID)
  ls_area_to_item_map-item_guid = /sapsrm/if_wf_process_c=>gc_nil_guid.
  APPEND ls_area_to_item_map TO rt_item_to_area_map.

-


~GET_APPROVERS_BY_AREA_GUID

DATA lo_area TYPE REF TO /sapsrm/if_wf_area.

* Input checks
  ASSERT ID /sapsrm/wf_cfg CONDITION ( NOT is_area IS INITIAL ).
  IF is_area IS INITIAL.
    RETURN.
  ENDIF.

* Get responsibility area reference for given area GUID
  lo_area = /sapsrm/cl_wf_area=>/sapsrm/if_wf_area~get_instance_by_guid(
    iv_area_type = /sapsrm/if_wf_process_c=>gc_area_type_employee
    iv_area_guid = is_area-area_guid
    ).

* Return all responsible users assigned to that area
  rt_approver = lo_area->get_responsible_approvers( ).

ls_approver-approver_ot = 'US'.
ls_approver-approver_id = 'TOML'.
APPEND ls_approver TO rt_approver.

-


I just copied the code from one of te std implementations and the badi did get triggered.

I just appended my approver names at teh end of the code as can be seen above.

But now the approvers do show up in the approval preview but when I goto BBP_PD,I see the Workflow as STARTED but there is a message "No Workflow Item Found".

Also when I check the approvers inbox,there is no work item created.

Any idea what is wrong now?

Answers (0)