扩展MSEG 加入Z字段
append MSEG
append IMSEG
append BAPI_TE_XMSEG
实现 BADI: MB_BAPI_GOODSMVT_CREATE
BAPI中:
BAPI_TE_XMSEG-MATDOC_ITM = 1.
BAPI_TE_XMSEG-ZVBELN1 = '1'.
BAPI_TE_XMSEG-ZPOSNR1 = '2'.
GT_BAPIPAREX-STRUCTURE = 'BAPI_TE_XMSEG'.
GT_BAPIPAREX-VALUEPART1 = BAPI_TE_XMSEG.
APPEND GT_BAPIPAREX.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GS_GOODSMVT_HEADER
GOODSMVT_CODE = '04'
IMPORTING
MATERIALDOCUMENT = GV_MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = GT_GOODSMVT_ITEM
EXTENSIONIN = GT_BAPIPAREX
RETURN = GT_RETURN.