采购订单增强:ME_PROCESS_PO_CUST
抬头:
HEADER
DATA: ls_mepoheader TYPE mepoheader.
ls_mepoheader = im_header->get_data( ).
行项目:
ITEM
DATA: ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg,
lv_dummy TYPE c LENGTH 128,
lv_check TYPE char1.
DATA: ls_mepoheader TYPE mepoheader.
DATA: lo_header TYPE REF TO if_purchase_order_mm.
*---------------------------------------------------------------------*
* here we check customers data
*---------------------------------------------------------------------*
lo_header ?= im_item->get_header( ).
ls_mepoheader = lo_header->get_data( ).
ls_mepoitem = im_item->get_data( ).
数据检验CHECK:
*CHECK
DATA:
ls_header TYPE mepoheader,
lt_items TYPE purchase_order_items,
lo_item TYPE REF TO if_purchase_order_item_mm,
ls_mepoitem TYPE mepoitem,
lv_matnr TYPE ekpo-matnr,
lv_msg TYPE char60,
lv_msgv1 TYPE i.
* get po header
CALL METHOD im_header->get_data
RECEIVING
re_data = ls_header.
* get po items
CALL METHOD im_header->get_items
RECEIVING
re_items = lt_items.