SAP Knowledge Base Article - Public

3795933 - 'GoodsReceiptIsExpected' specified value is ignored when creating Purchase Requisition item via API

Symptom

When a Purchase Requisition item is created via API, the Goods Receipt (GR) indicator provided by the user is not taken into account. Instead, the system determines the GR value based on the configuration of the account assignment category.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

For example, the Goods Receipt (GR) indicator is configured as true for the Cost Center (K) account assignment category.

Create a Purchase Requisition item via the API, where the value of 'GoodsReceiptIsExpected' is false:

POST Call <Host URL>/sap/opu/odata4/sap/api_purchaserequisition_2/srvd_a2x/sap/purchaserequisition/0001/PurchaseReqn 

{
  "PurchaseRequisitionType" : "NB",
  "PurReqnDescription" : "Example PR",
  "PurReqnHeaderNote" : "Test Header Note",
  "_PurchaseRequisitionItem" : [
    {
      "AccountAssignmentCategory" : "K",
      "PurchaseRequisitionItemText" : "test API PR",
      "MaterialGroup" : "YBMM00",
      "RequestedQuantity" : 10,
      "BaseUnitISOCode" : "C62",
      "PurchasingGroup" : "001",
      "PerformancePeriodStartDate" : "2026-08-19",
      "PerformancePeriodEndDate" : "2027-08-19",
      "GoodsReceiptIsExpected" : false,
      "PurchaseRequisitionPrice" : 1.00,
      "PurReqnItemCurrency" : "EUR",
      "Plant" : "1010",
      "CompanyCode" : "1010",
      "_PurchaseReqnAcctAssgmt" : [
        {
          "GLAccount" : "51100000",
          "CostCenter" : "10101101"
        }
      ]
    }
  ]

The newly created Purchase Requisition item still has the Goods Receipt indicator set to true, as determined by the account assignment category configuration.

Resolution

To ensure that the Goods Receipt (GR) indicator is set according to business requirements, implement the BAdI MM_PUR_S4_PR_MODIFY_ITEM. This enhancement allows you to override the default configuration-based determination and programmatically set the GR indicator during Purchase Requisition processing based on your specific business logic.

See Also

Keywords

GoodsReceiptIsExpected, goods receipt indicator, PR API, purchase requisition OData V4, GR-based invoice verification, indicator forced to true, payload ignored, Manage Purchase Requisitions, MM_PUR_S4_PR_MODIFY_ITEM, mass changes, regression, update, PR creation, API behavior, V4 API, API_PURCHASEREQUISITION_2, API_PURCHASEREQPROCESS_SRV  , KBA , MM-PUR-REQ-BAPI-2CL , BAPIs - Purchase requisition (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions