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