Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Participant

Have you wondered how, after you've finalized your release strategy configuration (for Purchase Order and Requisition as an example), how the approvers for each code are ACTUALLY found?

If you're using the standard Workflows, they're using Rules (PFAC) to do so. One thing in common between these 2 rules (PO and PR) is that they both execute the FM ME_REL_GET_RESPONSIBLE to actually find the approvers for the Workflows (FIORI or SBWP).

As you can see, it selects approvers data... It could also call Customer Functions... 🙂

Both rules (you can check them out on PFAC Transaction):

Let's create a use case to demonstrate the process... I'm assuming that you have your release strategy already configured (with approvers) from SPRO (not covering this part here).

Let's say we have a PO, and i want to SIMULATE the approvers for a code, how can i do that?

First option, you can simulate using the standard RULE. Go to PFAC using the PO rule (screen above), click on view and them Simulate:

Using the F4 Search help on the Purchase Order field, enter your PO... Same thing with the Release Code:

Click on simulate (F8), you'll see the approvers list below(if found correctly), like below:

A second option, would be to execute the simulate report that i've created, entering PO and Release Code:

It will list the Approves like PFAC:

You can get the code here:
*& For Linkedin 🙂 by José Sequeira

report zmm_get_approvers.

include <cntn01>.

"Little Hack...
types: begin of ty_cont,
logsys type char10,
objtype type char10,
objkey type char70,
describe type char10,
end of ty_cont.
"Little Hack...

data: gr_table type ref to cl_salv_table.

data: lt_actor type table of swhactor,
lt_cont type table of swcont,
s_cont type ty_cont,
ls_obj type swc_object,
ls_cont type swcont,
ls_actor type swhactor.

parameters: p_ebeln type ebeln obligatory,
p_code type frgco obligatory.

* Getting stuff done...

"Litle Hack here, just to move the data between the program and FMs...
s_cont-objtype = 'BUS2012'.
s_cont-objkey = p_ebeln.

swc_set_element lt_cont 'purchaseorder' s_cont.
swc_set_element lt_cont 'ReleaseCode' p_code.

call function 'ME_REL_GET_RESPONSIBLE'
actor_tab = lt_actor
ac_container = lt_cont
nobody_found = 1
others = 2.
if sy-subrc eq 0.
"Showing simple ALV...
cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = lt_actor ).
gr_table->display( ).
message 'No Approvers found, something is wrong...' type 'S' display like 'E'.

Now you can explore the simulation program, create one for PR, etc... etc...

The main goal is to always monitor your release strategy for "misconfigurations" that could cause Workflow not finding the correct approvers...

You can check you the video here.

Enjoy, Regards.
Labels in this area