on 12-01-2010 4:39 PM
Hi Friends,
My process controlled is triggering when i specify User name and User type(US) in Method : /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUI of Custom implementation in which code is written like below.
WA_rt_approver-APPROVER_OT = 'US'.
WA_rt_approver-APPROVER_ID = 'BTHUNUGUNTU'. (User name)
APPEND WA_RT_APPROVER TO RT_APPROVER.
But , for my requirement, i need to fetch this User name, dynamically from Ztable which is having Costcenter. How to obtain cost center from this method : GET_APPROVERS_BY_AREA_GUI so that i can fetch data from Z table.
Infact, this method have only import value : IS_AREA , but not document id. How to obtain document id from IS_AREA.
Please help me .
Balaji.T.
Hi,
The "iv_leading_object_id" of the method GET_AREA_TO_ITEM_MAP will have the cost center.
implement the below codes into method GET_APPROVERS_BY_AREA_GUID
DATA LEADING_OBJECT_ID type /SAPSRM/WF_LEADING_OBJECT_ID.
*----
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
).
*----
Get Plant ID
*----
LEADING_OBJECT_ID = lo_area->GET_LEADING_OBJECT_ID( ).
Now LEADING_OBJECT_ID will have the cost center which you can use to find the corresponding approver's...
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,
I implemented this below code as you said in Get_approver_by_area_gui.
DATA LEADING_OBJECT_ID type /SAPSRM/WF_LEADING_OBJECT_ID.
DATA lo_area TYPE REF TO /sapsrm/if_wf_area.
*----
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
).
*----
Get Plant ID
*----
LEADING_OBJECT_ID = lo_area->GET_LEADING_OBJECT_ID( ).
it is not giving any Leading_object_id.
Let me know what should i do Please..
Balaji.T.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.