cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7.0 Workflow: some line items do not need approval

Former Member
0 Kudos

Hi Experts,

We have implemented SC approval workflow using BRF in SRM 7.0.

The first level approval is based on Product Category (UNSPSC) and the Decision type is 4 (Item-Based Decision for Partial Document). The responsiblity area is created for each UNSPSC in BAdi method GET_AREA_TO_ITEM_MAP.The responsible manager is selected for each UNSPSC from a custom table using method GET_RESPONSIBLE_APPROVERS.

Client's requirement is: If a line item's UNSPSC is not maintained in the custom table, then that line item should not have any approval. Rather it should wait for other line items to be approved by their responsible UNSPSC manager. Please advise how we can get this.

Regards,

Bijaya

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I think items should be excluded in ~GET_AREA_TO_ITEM_MAP method, if it does not need any approval.

Regards,

Masa

Former Member
0 Kudos

Yes What Masa said is right.. If you don't need an Item should be approved, please don't assign a Area GUID for that Item..

The system will take care of it automatically..

Thanks!!

Bharath

Former Member
0 Kudos

Hi

You have implemented Decision sets functionality by making decision sets comprising of SC items and then assigning those decision sets to the responsible agents.

In this case, create your decision sets based on your predefined logic and keep the items without UNSPCS code in one set(responsible area). While assigning agents to this set, do not assign any agent so system wont send these items to any agent for approval

Note: Make sure you are using APPROVAL as approval type because if Approval with Completion is used in this scenario and any approver tries to edit the cart while approving some decision set having say 4 items from the SC (Out of total of say 12 SC items) , then whole shopping cart will be available to him for making changes even to the items where he is not supposed to take any action.

Virender Singh

Former Member
0 Kudos

I used the following code: it worked. Thanks

IF lv_subrc NE 0.

  • Responsibility area will be created for product actegory id

lo_area = /sapsrm/cl_wf_area=>/sapsrm/if_wf_area~create_instance(

iv_area_type = lc_area_type

iv_leading_object_id = lv_leading_object_id

).

ls_area_to_item_map-area_guid = lo_area->get_guid( ).

ELSE.

  • No responsibility area will be created for product actegory id which does not require approval.

ls_area_to_item_map-area_guid = /sapsrm/if_wf_process_c=>gc_nil_guid.

ENDIF.

IF NOT ls_area_to_item_map-area_guid EQ /sapsrm/if_wf_process_c=>gc_nil_guid.

ls_area_to_item_map-item_guid = lr_item_to_comm_map->item_guid.

APPEND ls_area_to_item_map TO rt_item_to_area_map.

ENDIF.

Former Member
0 Kudos

Hi Bijaya,

I have exactly the same requirement, please help me with the sample code you used to accomplish the same. I am looking for sample code for GET_AREA_TO_ITEM_MAP & GET_APPROVERS_BY_AREA_GUID.

Any help would be appreciated.

Thanks,

Sangeeta

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bijay,

one way out of many would be to create a process level step at the begining where you check any such UNSPSC product category is there that can be auto approved.

create the areas guid for only those line item and make the approval type as system approval.

cheers

Iftekhar alam