SAP Knowledge Base Article - Public

3305255 - The Error "The request URI contains an invalid key predicate" is Raised by an OData Request in SAP S/4HANA Cloud

Symptom

The Error "The request URI contains an invalid key predicate" is Raised by an OData Request in SAP S/4HANA Cloud

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Perform an OData call using an S/4HANA Cloud OData Service e.g. a GET call
  2. The Error "The request URI contains an invalid key predicate" is Raised 

Cause

Keys are missing in the URI

Resolution

  1. Send a $metadata request to the given service.
  2. Search for the <Key>...</Key> tag under the given EntityType (<EntityType Name="<name>">
  3. The entries between the Key tags are the key properties and those all have to be defined in a GET Entity request.

See Also

Keywords

SAP S/4HANA Cloud, S4_PC, S4_1C, X4BC, S4HC, S/4HC, The request URI contains an invalid key predicate, URI, Key, $metadata  , KBA , OPU-GW-COR , Framework , Problem

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions