BAPI_SALESORDER_CHANGE修改销售订单价格

REPORT ztest.


DATA: salesdocument LIKE bapivbeln-vbeln,
order_header_inx LIKE bapisdh1x,
order_header_in LIKE bapisdh1,
return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE,
conditions_in TYPE STANDARD TABLE OF bapicond WITH HEADER LINE,
conditions_inx TYPE STANDARD TABLE OF bapicondx WITH HEADER LINE,
logic_switch LIKE bapisdls,
step_nr LIKE conditions_in-cond_st_no,
item_nr LIKE conditions_in-itm_number,
cond_count LIKE conditions_in-cond_count,
cond_type LIKE conditions_in-cond_type.


salesdocument = ''.
logic_switch-cond_handl = 'X'.
order_header_inx-updateflag = 'U'.
CLEAR conditions_in[].
CLEAR conditions_inx[].
CLEAR: step_nr,item_nr,cond_count,cond_type.
step_nr = '10'.
item_nr = ''.
cond_count = '01'.
cond_type = ''.
conditions_in-itm_number = item_nr.
conditions_in-cond_st_no = step_nr.
conditions_in-cond_count = cond_count.
conditions_in-cond_type = cond_type.
conditions_in-cond_value = 668.
conditions_in-currency = 'RMB'.
APPEND conditions_in.


conditions_inx-itm_number = item_nr.
conditions_inx-cond_st_no = step_nr.
conditions_inx-cond_count = cond_count.
conditions_inx-cond_type = cond_type.
conditions_inx-updateflag = 'U'.
conditions_inx-cond_value = 'X'.
conditions_inx-currency = 'X'.
APPEND conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument    = salesdocument
    order_header_in  = order_header_in
    order_header_inx = order_header_inx
    logic_switch     = logic_switch
  TABLES
    return           = return
    conditions_in    = conditions_in
    conditions_inx   = conditions_inx.




IF return-type NE 'E'.
  COMMIT WORK AND WAIT.
ENDIF.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ChampaignWolf

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值