cancel
Showing results for 
Search instead for 
Did you mean: 

Last approver in Process Workflow?

Former Member
0 Kudos

Hi guys,

   We need to figure out if the approver in runtime is the last in the current n-level workflow. Any idea?

   Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lexandre,

Do you refer about PC WFL?

If so One solution could be to get the SC instance from the PDO buffer ( /SAPSRM/CL_PDO_FACTORY_SC_ADV=>GET_BUFFERED_INSTANCE ).
If the instance is bound, get the source document instance ( /SAPSRM/CL_WF_PDO_IMPL_FACTORY=>GET_INSTANCE ).
Then, get the process info if the SC is intanciated ( /SAPSRM/IF_PDO_DO_APV_EXT~GET_PROCESS_INFO ).
With the exporting parameter ES_PROCESS_INFO, check if PROC_DETAIL_LIST has a Forecast time indicator. If not, your current process level is the last one.

Cheers,

Melina

Former Member
0 Kudos

Hi,

Check the method create_process_forecast of the class /sapsrm/cl_wf_apv_facade. Pass document guid, type etc., to retrieve the process information that follows. So that you can know in which level your current document is in.

Regards,

Karthik Babu