BAPI_PO_CHANGE修改NETPRICE

在使用该BAPI创建和新增PO行项目时,行项目价格都能得到创建,但是在修改已经存在的行价格时,BAPI成功,但价格没有被修改,需要填写POCOND/POCONDX内表数据,示例如下:
PARAMETERS: p_ebeln LIKE ekko-ebeln.
 
DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: t_cond LIKE bapimepocond OCCURS 0 WITH HEADER LINE.
DATA: t_condx LIKE bapimepocondx OCCURS 0 WITH HEADER LINE.
 
 
t_poitem-po_item = '00010'.
t_poitem-net_price = '17.00'.
APPEND t_poitem.
 
t_poitemx-po_item = '00010'.
t_poitemx-net_price = 'X'.
t_poitemx-po_itemx = 'X'.
APPEND t_poitemx.
 
t_cond-itm_number = '00010'.
t_cond-cond_type = 'P000'.    " Give the pricing condition type that derives netprice
t_cond-cond_value = '17.00'.
t_cond-currency = 'USD'.
t_cond-change_id = 'U'.
APPEND t_cond.
 
t_condx-itm_number = '00010'.
t_condx-itm_numberx = 'X'.
t_condx-cond_type = 'X'.
t_condx-cond_value = 'X'.
t_condx-currency = 'X'.
t_cond-change_id = 'X'.
APPEND t_condx.
 
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln
TABLES
return = t_return
poitem = t_poitem
poitemx = t_poitemx
pocond = t_cond
pocondx = t_condx.
 
COMMIT WORK.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值