cancel
Showing results for 
Search instead for 
Did you mean: 

Search next approver

0 Kudos

Hello Experts,

we are in SAP 7.0, controlled using BRF process workflow.

For all the approval I need to send an email to the approver later.

Does anyone know how to get the next approver or approvers of all the process?

Thank you all.

Federico

Accepted Solutions (0)

Answers (1)

Answers (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Federico,

use class /SAPSRM/CL_WF_PROCESS_MANAGER

for example /SAPSRM/CL_WF_PROCESS_MANAGER=>GET_PROCESS_BY_DOCUMENT

or

use class /SAPSRM/CL_WF_APV_FACADE

for example /SAPSRM/CL_WF_APV_FACADE=>GET_PROCESS_INFO

Regards

Konstantin

0 Kudos

Hi Konstantin,

thanks for your help but these classes extract the workflow process already approved.

needs be the next step to send the email to the person who must approve the document.

Sorry if my English is not good.

Regards

Federico

konstantin_anikeev
Active Contributor
0 Kudos

Are you sure?

/SAPSRM/CL_WF_APV_FACADE=>GET_PROCESS_INFO should extract also forecast..

0 Kudos

Of course I'm sure!!

this is my code:

         CALL METHOD / sapsrm / cl_wf_apv_facade => get_process_info (

           EXPORTING

             iv_document_guid = iv_object_guid

             iv_document_type-object_type = <fs_event>

             iv_agent_id = sy-uname

           IMPORTING

             es_process_info = ls_process_info

                                ).

In the table 'ls_process_info' there are data that step and the previous step, but those are not present after.

Do you have any example?

konstantin_anikeev
Active Contributor
0 Kudos

C - for current steps.

F - for future steps

H - for historical steps

Regards

Konstantin

konstantin_anikeev
Active Contributor
0 Kudos

May be you on the last step and no future steps are relevant.

0 Kudos

Konstantin're a big

Thank you very much, it is true in the record 'F' is the next step.

Now I do not want too much to ask but how do I estrarmi the table with users?

ls_process_info-PROC_DETAIL_LIST-[3]-PROC_LEVEL_LIST [1] AGENTS_BY_KEY-[1]-AGENT_LIST

konstantin_anikeev
Active Contributor
0 Kudos

Hi Federico,

generally yes. But if you have parallel approval or split of SC for approval - you may need to check all the entries of the

ls_process_info-PROC_DETAIL_LIST-[3]-PROC_LEVEL_LIST [1] AGENTS_BY_KEY


and not just the first one.


Regards

Konstantin