SAP Knowledge Base Article - Public

2916309 - Error: 'Unknown error. Please check the metadata and try again!' When Executing a Payload in OData Console

Symptom

When executing a Payload in OData Console, you get the below error:

Unknown error. Please check the metadata and try again!

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Go to Administrator work center
  2. Go to OData Service Explorer
  3. Select the OData service 'c4codataapi'
  4. Select Test
  5. Select the RegisteredProductCollection
  6. Go to the Test tab
  7. Select the 'Post' method
  8. Add the attached xml file to the payload
  9. Select 'Execute'

You get the mentioned error.

Cause

Creation of complete BO (Registered product) with multiple nodes is not allowed in the console.

"Registered Product" OData service is based on multiple nodes. For creation "Customer" party is mandatory, which is present in a different node.

Since data in OData console is regarding only the Root, whenever you try to create the data, it results in an error.

You need to provide all mandatory information which might be present in a node different than Root, which is not possible through Odata Console.

Resolution

In order to create/test Registered Product using OData, use Postman or any other REST based API testing software.

For sample payload for Postman refer the below:

{

"ID":"yyy",

"SerialID":"zzz",

 "ProductID":"abc",

 "Status":"4",

 "ReferenceDate":"20181023000000",

 "RegisteredProductPartyInformation":[

 {

 "PartyID":"xxx",

 "RoleCode":"60"

 }

 ],

"RegisteredProductDescription":[

{

"Description":"Reg prod TEST SAP",

"languageCode":"EN"

}

]

}

Where yyy, zzz, abc, xxx represents the ID, Serial ID, Product ID and Party ID respectively.

Keywords

metadata, OData, RegisteredProduct, c4codataapi , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications 1911 ; SAP Cloud for Customer core applications 2002 ; SAP Cloud for Customer core applications 2005 ; SAP Cloud for Customer core applications 2008