on 02-08-2011 8:03 AM
I am implementing a Costcenter based brf workflow and have copied /SAPSRM/CL_WF_AREA_COST_CTR to a Z object. I need to get the Shopping cart details in the /SAPSRM/IF_WF_AREA~GET_RESPONSIBLE_APPROVERS method. I was planning to use BBP_PD_SC_GETDETAIL FM to get the required details but which value from the method should I pass to get the I_GUID or I_OBJECT_ID for passing to the FM?
Hi,
What is your requirement ? you can pass the SC GUID in different way to GET_RESPONSIBLE_APPROVERS. but GET_RESPONSIBLE_APPROVERS is optional and this method is used to identify the approver by pass the leading_object_id from method GET_APPROVERS_BY_AREA_GUID.
Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan,
The requirement is to have SC approval based on Cost Center.
The Approver details needs to be selected from ECC based on the gross price.
I have copied the following standard class and modified the methods given for the requirement.
Class: /SAPSRM/CL_IM_WF_RR_CCTR_SC, Method: GET_AREA_TO_ITEM_MAP
Class: /SAPSRM/CL_IM_WF_RR_CCTR_SC, Method: GET_APPROVERS_BY_AREA_GUID
Class: /SAPSRM/CL_WF_AREA_COST_CTR, Method: GET_RESPONSIBLE_APPROVERS
I want to do a rfc call in the GET_RESPONSIBLE_APPROVERS to get the approvers.
Do let me know your view.
Thanks
Hi,
The workaround to get the DOC_GUID into method GET_RESPONSIBLE_APPROVERS is, you can concatenate DOC_GUID with cost center to leading_object_id in the GET_AREA_TO_ITEM_MAP method and the split the cost center and DOC_GUID in the GET_RESPONSIBLE_APPROVERS, Hence you can get the current leading_object_id in the GET_RESPONSIBLE_APPROVERS method.
FYI -
As I replied my previous response, GET_RESPONSIBLE_APPROVERS is itself optional.. you can get the leading object details in the method GET_APPROVERS_BY_AREA_GUID. Here is the sample code..
DATA LV_LEADING_OBJ_ID TYPE STRING.
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_COST_CTR
iv_area_guid = is_area-area_guid
).
WRITE THE BELOW CODE AFTER
LV_LEADING_OBJ_ID = LO_AREA->GET_LEADING_OBJEACT_ID().
Saravanan
Edited by: Saravanan Dharmaraj on Feb 10, 2011 1:40 PM
Thanks Saravanan.
Got the user ip and person id mapping in usr21 table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan,
I am getting the approvers in GET_APPROVERS_BY_AREA_GUID. method. So there is no concatenation logic involved.
Do let me know any pointers on the same. Thanks
EDIT: I deactivated the badi and changed back to the standard process level config as earlier, still when I try to view old shopping carts before this change I am getting the same error.
Edited by: Srinivas Kalluri on Feb 14, 2011 10:16 AM
I am trying to get the shopping cart instance to get the SC item details. any ponters as how to get the SC guid in this method is appreciated.
Thanks
Edited by: Srinivas Kalluri on Feb 8, 2011 5:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.