My requirement is as follows:
If I give the shopping cart document id, I should be able to find
1) the list of approvers who approved the document
2) how much time they have taken to approve the document
3) any pending approvals for the document.
Can anyone help me in this?
Here is technical details which will help if you are in SRM 7.0..
The below methods are in the class /SAPSRM/CL_WF_EVENT_FACADE
Pass the SC GUID to method 'GET_WORKFLOW_ID_BY_DOCUMENT' .. get the header workitem id.
1 . to get the current approvers list call the method GET_CURRENT_AGENTS..
2. to get the previous approvers list call the method GET_PREVIOUS_AGENTS.
if you are in SRM 5.0 then use the below FM's..
1 . call the FM BBP_PDH_WFL_WI_FROM_OBJECT_GETu2019 to get the header workitem id..
2 . call the FM u2018BBP_WFL_DIN_APPR_FINALLIST_GETu2019 to get the list approver's for a SC
3 . if you need the workitem details then call FM BBP_PDH_WFL_WI_DETAILS_GETu2019..