采购订单BAIPI行项目增强自定义字段

文章目录

      • 1 Introduction
      • 2 Implementation
      • 3 Summary

1 Introduction

We need add customer field in the EKPO table. When we call BAPI ‘BAPI_PO_CREATE1’ for it . of course that we have add the field in the ekpo table.

2 Implementation

We need add the field in the structure .
采购订单BAIPI行项目增强自定义字段_第1张图片

We put it in the EXTENSIONIN table and transfer it to table.
采购订单BAIPI行项目增强自定义字段_第2张图片

Code


DATA: lt_extensionin  TYPE TABLE OF bapiparex WITH HEADER LINE,

        ls_item_ext     TYPE bapi_te_mepoitem,
        ls_item_extx    TYPE bapi_te_mepoitemx.

 SELECT SINGLE *
               INTO  @DATA(ls_zsrm_plaf)
               FROM zsrm_PLaF
              WHERE plnum = @PW_DATA-BEDNR and werks = '1100'.
 if sy-subrc = 0 .

    ls_item_ext-po_item = 10.
    ls_item_ext-zbs = 'X'.
    lt_extensionin-structure = 'BAPI_TE_MEPOITEM'.
    lt_extensionin-valuepart1 = ls_item_ext.
    APPEND lt_extensionin .
     clear:lt_extensionin.
    ls_item_extx-po_item = 10.
    ls_item_extx-zbs = 'X'.
    lt_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
    lt_extensionin-valuepart1 = ls_item_extx.
    APPEND lt_extensionin.
     clear:lt_extensionin.

3 Summary

You only keep careful in the anytime .

你可能感兴趣的:(ABAP,SAP,abap)