SAP Knowledge Base Article - Public

2807323 - Different Results Produced From Identical Custom OData Services

Symptom

You create two identical custom OData services. One as the primary (main) OData service and one for testing.

However, different results are produced for each OData service when using the $count query.

Environment

SAP Cloud for Customer

Reproducing the Issue

  1. Navigate to the Administrator work center.
  2. Go to the OData Service Explorer view.
  3. From the drop-down menu, select Custom OData Services.

For example purposes:

  • Test OData service = 'customtest'.
  • Primary OData service = 'customprimary'.
  1. Open 'customtest'.
  2. Run queries:
  1. Open 'customprimary'.
  2. Run queries:

Cause

The behavior is different for both OData services because one service has been created in a different tenant version.

For example, 'customprimary' was created in 1811, whereas 'customtest' has been created in 1902.

Resolution

If the default value provided for the particular property should be treated as constant, then the corresponding property should be marked as 'Hide in Metadata' from OData Editor.

In 'customprimary', under Employee, BPKINDcontent has a default value, unlike 'customtest'.

As a result the BPKINDcontent must be selected as Hide in Metadata for 'customprimary'.

This is the same case for Business Partner.

Keywords

OData, query, custom , KBA , AP-RC-ODF , OData framework (C4C Only) , Problem

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions