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
- Call the custom OData V4 RAP service using the communication user and perform a READ request.
- Observe that the service responds with no data.
- 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
- Open the relevant communication scenario used by the communication arrangement for the service.
- 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.
- Save and, if applicable, refresh or reassign the communication arrangement so the updated role is applied to the communication user.
- Retest the READ request with the communication user and confirm that data is returned.
See Also
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
SAP Knowledge Base Article - Public