SAP Knowledge Base Article - Public

3753433 - Api purchase order creation via api_purchaseorder_2 adds new pmp0 instead of updating automatic price condition (s/4hana cloud public edition)

Symptom

  • When creating a purchase order via the purchase order API, providing a PMP0 pricing condition in the payload does not update the automatically determined PMP0; instead, the system adds a new PMP0 condition and one of the PMP0 conditions becomes inactive.
  • The behavior is observed when item pricing is sent with ConditionType = PMP0 and related rate/quantity fields in the payload.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Use API_PURCHASEORDER_2 to create a purchase order with at least one item.
  2. In the item payload, include _PurOrdPricingElement with ConditionType = PMP0 and values such as ConditionRateAmount, ConditionCurrency, ConditionQuantity, and ConditionQuantityUnit.
  3. Create the purchase order and open the pricing conditions for the item.
  4. Observe that an additional PMP0 condition is created and one of the PMP0 conditions is set to inactive instead of updating a single automatic PMP0.

Cause

Expected behavior: default price conditions are determined automatically during PO creation. If a default condition type (for example, PMP0) is sent again in the API payload, the system treats it as an additional condition; therefore, one condition remains active and the other becomes inactive instead of “updating” the automatic one.

Resolution

  1. Do not send default/automatic price conditions (for example, PMP0) in the API payload.
  2. Instead, provide NetPriceAmount (and DocumentCurrency) at item level; allow the system to determine and apply automatic price conditions according to the pricing setup.
  3. If specific pricing is required, maintain the relevant pricing master data (for example, purchasing info records or condition records) so the correct automatic conditions are determined.
  4. Recreate a test purchase order without PMP0 in the payload and verify that only the automatically determined PMP0 condition is present and active.

Keywords

API_PURCHASEORDER_2, purchase order API, PMP0, duplicate condition, automatic pricing, pricing condition inactive, NetPriceAmount, purchase order creation, operational procurement, pricing procedure, modular pricing, PO pricing, public cloud , KBA , MM-FIO-PUR-PO-2CL , Fiori UI for Purchase Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions