BAPI_PO_CHANGE 采购订单修改服务

修改服务页签里面的价格和数量,达到修改净价和条件里面金额的目的

数据可以通过采购订单查询ESLH和ESLL表获取

BAPI_PO_CHANGE 采购订单修改服务

BAPI_PO_CHANGE 采购订单修改服务

POITEM-PO_ITEM = '00010'.
POITEM-NET_PRICE = Z_NETPR.
POITEM-PCKG_NO = '66628'.
APPEND POITEM .


POITEMX-PO_ITEM = '00010'.
POITEMX-PO_ITEMX = 'X'.
POITEMX-NET_PRICE = 'X'.
POITEMX-PCKG_NO = 'X'.
APPEND POITEMX.

CLEAR:POSERVICES.
POSERVICES-PCKG_NO = '66628'. "头包
POSERVICES-LINE_NO = 1 .
POSERVICES-EXT_LINE = '0000000000' .
POSERVICES-OUTL_LEVEL = '0'.
POSERVICES-OUTL_NO = ' '.
POSERVICES-OUTL_IND = 'X'.
POSERVICES-SUBPCKG_NO = '66629'.
POSERVICES-EDITION = '0000' .
APPEND POSERVICES.

CLEAR:POSERVICES.
POSERVICES-PCKG_NO = '66629'. "子包
POSERVICES-LINE_NO = 2.                  
POSERVICES-EXT_LINE = '10'.
POSERVICES-OUTL_LEVEL = '0'.
POSERVICES-EDITION = '0000' .
POSERVICES-BASE_UOM = 'LE' .
POSERVICES-QUANTITY = 1 .
POSERVICES-PRICE_UNIT = '1' .
POSERVICES-OVF_TOL = '0' .
POSERVICES-SHORT_TEXT = '测试'.
POSERVICES-GR_PRICE = Z_NETPR .
POSERVICES-MATL_GROUP = '&DB001'.
APPEND POSERVICES.

CLEAR:POSRVACCESSVALUES.
POSRVACCESSVALUES-PCKG_NO = '66629'.
POSRVACCESSVALUES-LINE_NO = '2'.
POSRVACCESSVALUES-QUANTITY = 1.
POSRVACCESSVALUES-NET_VALUE = Z_NETPR.
APPEND POSRVACCESSVALUES.

CALL FUNCTION 'BAPI_PO_CHANGE'
  EXPORTING
    PURCHASEORDER     = PURCHASEORDER
* IMPORTING
*    EXPHEADER         =
*      EXPPOEXPIMPHEADER =
  TABLES
       RETURN            = RETURN[]
       POITEM            = POITEM
       POITEMX           = POITEMX
       POCOND            = T_COND
       POCONDX           = T_CONDX
       POSERVICES        = POSERVICES
       POSRVACCESSVALUES = POSRVACCESSVALUES

 

上一篇:Pytest中PO模式及数据分层


下一篇:「SAP技术」SAP MM 采购信息记录新价格不能体现在采购订单新的ITEM上?