Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To get service taba data in ME_PROCESS_PO_CUST

0 Kudos

Hi Experts, I need to add validation on while creating/changing PO, On SERVICE TAB which is available in ITEM , service no would be related to same material group which is given in line item at item over view. I am using BADI- ME_PROCESS_PO_CUST .

Kindly help me, how will i get service tab data .

Regards,

SPcapture-1.png

1 REPLY 1

mejias10
Explorer

For people who are looking for the answer

METHOD if_ex_me_process_po_cust~check.

DATA: lt_items TYPE purchase_order_items,
ls_items TYPE purchase_order_item,
lo_item TYPE REF TO cl_po_item_handle_mm,
lti_esll TYPE mmsrv_esll.

lt_items = im_header->get_items( ).

LOOP AT lt_items INTO ls_items.
CLEAR: lo_item,
lti_esll.
lo_item ?= ls_items-item.

" Get services
CALL METHOD lo_item->if_services_mm~get_srv_data
EXPORTING
im_packno = ls_item_data-packno
IMPORTING
ex_esll = lti_esll
EXCEPTIONS
failure = 1
OTHERS = 2.
ENDLOOP.

ENDMETHOD.