Skip to Content
0
Dec 01, 2020 at 01:00 PM

Error while using association for Good Receipts (BAPI_GOODSMVT_CREATE) in ODATA service

26 Views Last edit Dec 01, 2020 at 01:05 PM 3 rev

Hello Gurus,

I'm trying to write a odata service for Good Receipts using BAPI: BAPI_GOODSMVT_CREATE
I have imported entity sets and types of this service for the properties.
and when i include "GoodsmvtitemSet" as shown in below code which is the association / item part connected to Goodsmvtheader I get the error:

  • No instance of object type PurchaseOrder has been created. External
  • PO header data still faulty
  • Enter Purchasing Org
  • Please enter items first

I have tried with different PO, all sorts of ways to use this BAPI.
When i do not use the association "GoodsmvtitemSet" the code executes perfectly without any error.

Can anyone please help to understand where am I going wrong?

I've attached the screenshot of GW Gateway
P.S. the data used below is fake.
screenshot-143.png

{
  "Goodsmvtheader" : {
    "PstngDate" : "2020-09-01T00:00:00",
    "DocDate" : "2020-09-01T00:00:00",
    "RefDocNo" : "20200901"
  },
  "GmCode" : "01",
  "GoodsmvtitemSet" : [
    {
      "Material" : "000000000050065561",
      "Plant" : "0001",
      "StgeLoc" : "0001",
      "MoveType" : "101",
      "SpecStock" : "Q",
      "EntryQnt" : "2",
      "EntryUom" : "ST",
      "PoNumber" : "4500022561",
      "PoItem" : "00010"
    }
  ]
}

Attachments

screenshot-143.png (114.3 kB)