cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

get approver details in doc check

Former Member
0 Kudos
125

Is there any way to get the current approver and corresponding item guid determined by the system in doc check badi?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

There is one std method /sapsrm/cl_wf_apv_facade=>get_current_process_state which returns item guid and approver name but it doesnt work in doc check badi as the SC is not yet created.

any other pointers? Thanks

Former Member
0 Kudos

Hi,

can you explain your business requirement ?

Saravanan

Former Member
0 Kudos

Hi Saravanan,

I am getting the approvers in the method GET_APPROVERS_BY_AREA_GUID via Z class which is a copy of /SAPSRM/CL_IM_WF_RR_CCTR_SC

Now in this method I am getting the approver details from ECC, if no approver details is found I want to throw a error in the SC saying no approvers found. Since I could not pass any error message via that method I wanted to implement a check in doc_check badi if there is an approver against a line item, if not then it will show error to the user. Instead of calling and using the entire logic again in doc_check badi I wanted to check if any method can be used to retrieve the approver for the item during runtime.

Former Member
0 Kudos

Hi,

You don't need to write whole WF logic in check BADI to confirm if CC approver maintain in ECC or not.. you can get the SC account detaills in check badi.. just loop through it , if you are maintaining the cost center owner is in ECC t.code KS01, then call the standard ECC BAPI FM 'BAPI_COSTCENTER_GETDETAIL' to get the PERSON_IN_CHARGE value.. if this is null then raise a error message..