Hi,
In the Service Purchase order, I want to add some validation on the basis of service item, this is working fine at method PROCESS_ITEM
as I am able to read the service data as per below code
lr_po_item_handle ?= im_item.
CALL METHOD lr_po_item_handle->get_data
IMPORTING
ex_data = ls_mepoitem
EXCEPTIONS
failure = 1
OTHERS = 2.
if ls_mepoitem-PSTYP = '9' and
ls_mepoitem-BANFN is NOT INITIAL and
ls_mepoitem-bnfpo is NOT INITIAL.
CALL METHOD lr_po_item_handle->if_services_mm~get_srv_data
EXPORTING
im_packno = ls_mepoitem-packno
IMPORTING
ex_esll = lt_esll
" ex_esuh =
" ex_esuc =
"ex_eskl =
EXCEPTIONS
failure = 1
OTHERS = 2.
delete lt_esll where pln_packno is INITIAL.
but this get triggered when press enter, but if we click directly on 'SAVE' button after changing the quantity at service level,
method 'PROCESS_ITEM' does not getting trigger
so same logic I want to add in POST method, in this I am able to read the line items details as per below logic.
lr_po_header_handle ?= im_header.
CALL METHOD lr_po_header_handle->if_purchase_order_mm~get_items
RECEIVING
re_items = lt_po_items. " Table with PO Items
loop at lt_po_items into ls_po_items.
clear : ls_mepoitem.
ls_mepoitem = ls_po_items-item->get_data( ).
append ls_mepoitem to lt_mepoitem.
endloop.
NOW in lt_mepoitem I am getting all the line item details,
How to read the service data from here?
regards,
zafar