ABAP BAPI_PO_CREATE1 PO净价从信息记录获取问题解决

本文介绍了如何通过BAPI_PO_CREATE1 API创建采购订单时,如何利用NO_PRICE_FROM_PO和POITEM-PO_PRICE字段来指定是否从价格信息记录中传递净价,以及不同设置的含义。重点讲解了NO_PRICE_FROM_PO=X和Poitem-po_price='2'的情况,并给出了替代方案BBP_PO_INBOUND_BADI。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

about bapi_po_create1

using BAPI_PO_CREATE1 to create POs meanwhile passing the netprice instead of price from inforrecords.

From 580225:

  1. 1. NO_PRICE_FROM_PO

If you transfer the value 'X' in this field, no conditions are copied from the last document. This includes purchase orders, scheduling agreements, contracts and quotations. The system still copies  conditions from the information record.
The field can only be filled at header level. It is valid for all items.

Prerequisite
You must implement Note 552189 in your system to use the NO_PRICE_FROM_PO field.

  1. 2. POITEM-PO_PRICE

You can use the PO_PRICE field to control, at item level, if the value should be copied from the POITEM-NET_PRICE field to the conditions. PO_PRICE can have the values ' ', '1' or '2' with the following  meaning:

  • PO_PRICE = ' ': The conditions are determined automatically, the value from the NET_PRICE field is only copied if the system cannot determine a condition.

  • PO_PRICE = '1': The value transferred in field NET_PRICE is copied as a  gross price that is, it is set with the condition type specified as base price in the calculation schema. In the SAP Standard System, these are condition types PB00 or PBXX. All other condition types  remain unchanged. No conditions are copied from the last document.

  • PO_PRICE = '2': The value transferred in field NET_PRICE is copied as a  net price that is, it is set with the condition type specified as base price in the calculation procedure. All other condition types are deleted.

 

Keyword: NO_PRICE_FROM_PO = X   Poitem-po_price = '2'

Alternative: BBP_PO_INBOUND_BADI

reference:http://archive.cnblogs.com/a/1839235/

### ABAP BAPI_PO_CREATE1 错误解决方案 当遇到 `BAPI_PO_CREATE1` 报错的情况时,通常可以从以下几个方面来排查和解决问题: #### 参数验证 确保传递给 `BAPI_PO_CREATE1` 的参数完全正确。任何不匹配的数据类型或错误的输入都可能导致异常抛出[^1]。 ```abap DATA: lv_return TYPE TABLE OF bapiret2, ls_purchaseorder TYPE bapi_purord. CALL FUNCTION 'BAPI_PO_CREATE1' EXPORTING purchaseorderheader = ls_purchaseorder-header IMPORTING purCHASEORDER = ls_purchaseorder-number TABLES return = lv_return. ``` 如果返回表 `lv_return` 中有条目,则表示存在某些问题;应仔细检查这些消息并修正相应字段的内容。 #### 数据一致性校验 确认采购订单中的物料编号、供应商信息以及其他相关数据的一致性和准确性。例如,在创建采购合同时使用的材料编码应该存在于系统内,并且与指定工厂相兼容。 #### 权限配置审查 有时权限不足也会引发此接口调用失败。因此建议核查当前用户的授权对象设置是否允许执行该操作以及访问所需资源。 #### 日志记录分析 启用详细的调试模式可以更深入地了解具体哪个环节出现了状况。通过查看后台日志文件或者利用 SAP GUI 内置工具(如 ST22),能够获取更多关于程序运行期间发生的事件的信息,从而帮助定位根本原因所在。 #### 测试环境模拟 在一个受控环境中重现相同的业务场景有助于排除外部因素干扰的可能性。这可能涉及到搭建专门用于测试目的的小型实例或是借助其他开发人员的帮助来进行跨部门协作诊断工作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值