SAP Knowledge Base Article - Public

3745730 - Custom service returns no data for communication user until '*' is set in communication scenario authorizations - SAP S/4HANA Cloud Public Edition

Symptom

  • A custom OData service called with a communication user returns an empty data set (no records).
  • The same data is visible in the corresponding UI app with a business user.
  • Requirement: business users must remain restricted by an authorization field (for example, company code), while the communication user needs unrestricted read access.
  • No explicit error message is shown; the response contains no data.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Call the custom OData V4 RAP service using the communication user and perform a READ request.
  2. Observe that the service responds with no data.
  3. Open the corresponding UI app with a business user and verify that data exists.

Cause

The authorization field (for example, company code) in the authorization object of the communication scenario role was not maintained, so the communication user did not receive the required read authorization.

Resolution

  1. Open the relevant communication scenario used by the communication arrangement for the service.
  2. In Authorizations, maintain the authorization object field (for example, company code) with the value “*” to grant access to all values for the communication scenario role.
  3. Save and, if applicable, refresh or reassign the communication arrangement so the updated role is applied to the communication user.
  4. Retest the READ request with the communication user and confirm that data is returned.

See Also

Defining a Communication Scenario Including Authorization Values

Keywords

odata, RAP, custom service, communication user, read returns no data, authorization object, authorization field, communication scenario, authorizations, unrestricted access, star value, service binding, developer extensibility, read authorization, asterisk , KBA , BC-SRV-APS-COM , Maintain Communication System and Arrangement , Problem

Product

SAP S/4HANA Cloud Public Edition all versions