cancel
Showing results for 
Search instead for 
Did you mean: 

Approval preview process controlled workflow

Former Member
0 Kudos

Hi,

We are using process controlled workflow (N step) for the shopping cart workflows.

While sending the reminder mails to the approvers, we would like to include the approval preview in the email.

In application controlled workflows we could use FM BBP_WFL_DIN_APPR_CONTAINER_GET to get the approval preview details.

Is there a similar function module to pick the approvers/approval status/step name etc for the process controlled workflows so that we can simulate the approval preview?

Thanks

BR

Swetha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use class /SAPSRM/CL_WF_APV_FACADE. This is used by standard SAP WF Analysis.

Methods - RETRIEVE_PROCESS_HISTORY, GET_CURRENT_PROCESS_STATE, CREATE_PROCESS_FORECAST.

To analyze more, check the program /SAPSRM/WF_CFG_ANALYSIS_002. Check lines 209...216 (These Lines pull Previous Approved Steps, Current Process Step & Gets the approval forecast). However the REJECTED Items (Accept Decision) work little different (which is not captured by this report).

To Identify the current approval process awaiting decision by the requester of the cart, use method GET_CURRENT_PROCESS_STATE, return parameter structure /SAPSRM/S_WF_PROCESS-PROCESS_LEVEL_LIST-DECISIONSET_LIST-ITEM_STATUS_LIST gets you the current status of the item (ACCEPTED, REJECTED, OPEN, INQUIRED). If ITEM_STATUS_LIST-ITEM_STATUS EQ 'REJECTED', then the WF is waiting for acceptance/resubmission from the requester.

To your specific need, pass DOCUMENT_GUID to the class /SAPSRM/CL_WF_APV_FACADE=>GET_CURRENT_PROCESS_STATE get the return parameter /SAPSRM/S_WF_PROCESS. It will give you PROCESS_LEVEL_LIST. Then loop through DECISIONSET_LIST. It contains Table Types of AGENTS_LIST, ITEM_STATUS_LIST, WORKITEM_LIST. At /SAPSRM/S_WF_PROCESS level, you can get all the details of the current process level details

Thanks,

SC

Answers (0)