问题描述
STO单创建交货单接口中,由于STO单的公司间-结算价为0而不能创建交货单,此时需要成本同事维护好成本,然后我们在接口中做重定价处理
解决方案:
刚开始没找到合适的BAPI,尝试录BDC发现不可行,查阅资料发现可用BAPI_PO_CHANGE
ls_poitem-po_item = ls_crt-ebelp.
ls_poitem-calctype = 'B'.
ls_poitem-pricedate = '3'.
APPEND ls_poitem TO lt_poitem.
ls_poitemx-po_item = ls_crt-ebelp.
ls_poitemx-calctype = 'X'.
ls_poitemx-pricedate = 'X'.
ls_poitemx-po_itemx = 'X'.
APPEND ls_poitemx TO lt_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ls_crt-ebeln
TABLES
return = lt_return
poitem = lt_poitem
poitemx = lt_poitemx.
如有其他问题或解决方案,欢迎大佬在评论区留言讨论~
标签:BAPI,STO,单重,poitemx,lt,ls,poitem From: https://blog.csdn.net/weixin_44150356/article/details/143203124