2021 Oct 07 9:15 AM
Hi there,
We are using the method GET_SRV_DATA of interface IF_SERVICES_MM in order to get the services data in the method CHECK of BADI ME_PROCESS_REQ_CUST. This works correctly when the PR is being created or modified from transactions ME51N or ME52N.
DATA: lo_services TYPE REF TO if_services_mm.
* Get current item data
CALL METHOD im_item->get_data
RECEIVING
re_data = ls_item.
TRY.
* Casting
lo_services ?= im_item.
CATCH cx_sy_move_cast_error.
RETURN.
ENDTRY.
* Get data from Services and Limits tabs
CALL METHOD lo_services->get_srv_data
EXPORTING
im_packno = ls_item-packno
* im_limit = abap_true
IMPORTING
ex_esll = lt_esll
ex_esuh = lt_esuh
ex_esuc = lt_esuc
ex_eskl = lt_eskl
EXCEPTIONS
failure = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
But the method GET_SRV_DATA does not return data when the PR is being created or modified via BAPI (BAPI_PR_CREATE or BAPI_PR_CHANGE). Is there an alternative way to obtain the service data in this case?
Thanks!
Regards,
2022 Oct 03 5:12 PM
Did you find any solution to this ?
I am facing the same problem in my project.