cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Get Adhoc Approver list before ordering SC in SRM 7 (BRF)

Logu
Explorer
0 Kudos
458

Hi,

We are using auto Approval for shopping cart and adhoc approvers is allowed.

We have got a scenarion to make teh approver as mandatory based on one custom field.

I have tried to get the approved with the class /SAPSRM/CL_WF_APV_FACADE but i am not getting the data's .

We are getting data only after order but we need the data before ordering the SC.

Any suggestion?

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello,

you can get SC process info in BAdI SC check:


DATA: lo_instance          TYPE REF TO /sapsrm/cl_pdo_bo_sc_adv,
     lo_pdo_sc           
TYPE REF TO /sapsrm/if_pdo_bo_sc,

     lo_message_handler   TYPE REF TO /sapsrm/if_pdo_msg_consumer.


DATA: ls_process_info         TYPE /sapsrm/s_pdo_wf_process_info,  



lo_pdo_sc = /sapsrm/cl_pdo_factory_sc_adv=>get_buffered_instance( iv_doc_guid ).

IF lo_pdo_sc IS BOUND.

     lo_instance ?= lo_pdo_sc.

           

            TRY.
          lo_instance
->/sapsrm/if_pdo_do_apv_ext~get_process_info(
              
IMPORTING
                    es_process_info   
= ls_process_info
              
CHANGING
                    co_message_handler
= lo_message_handler
               
).
         
CATCH /sapsrm/cx_pdo_abort.
    
ENDTRY.

ENDIF.

In ls_process_info-proc_detail_list, you will have the process levels information.

Regards.

Laurent.

Logu
Explorer
0 Kudos

Hi Laurent,

We are not able to implement this code.This code is suitabel only for static scenario.This is not returning value in dynamic secnario.

Any other method to retrieve the approvers before ordering the shopping cart.

Logu

laurent_burtaire
Active Contributor
0 Kudos

Hello,

we implemented ABAP code i gave you and it works perfectly (in all cases).

Regards.

Laurent.

Answers (0)