SAP Knowledge Base Article - Public

3343854 - No data retrieved in application created through a Custom Analytical Query even though you have the authorization defined in Custom Catalog Extensions.

Symptom

  • You are trying to preview the data in the application that you created through a Custom Analytical Query but the data is not retrieved
  • You are assigned to the Business Catalog defined in Custom Catalog Extensions app for this application
  • You're getting the error message "The result set for query XXX is empty" in the application

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Open the application you've created
  2. Click on "Go"
  3. No data 

Cause

When you create a Custom Analytical Query you use a CDS View as a datasource. This way, all the data shown in your query comes from this CDS View that is being used as the basis. Each CDS View has a different purpose and shows different data and fields, for this reason each CDS View has different authorization objects. 

When you create a Custom Analytical Query, your user needs to have the authorization object of the CDS View that you are using as a basis in order to be allowed to view the data being shown. 

Thus, the authorization concept of an application created through a Custom Analytical Query looks like this:

  1. Authorization in Custom Catalog Extensions: This is the authorization you choose for users to be able to view the APPLICATION. Without this authorization, the application will not be shown to the user.
  2. Authorization to view CDS View data: This is the standard authorization that comes with each CDS View, it is responsible for defining who is authorized to view data from the CDS View used as the basis. Without this authorization, the application will be shown to the user, but he will not be able to view the data. Which is exactly your issue. 

You're getting this issue because you don't have the Business Catalog responsible for the CDS View assigned to your user. 

Resolution

Assign to your user the authorization object responsible for the CDS View that you're using as a basis for the Custom Analytical Query in order to retrieve the data in the application. If you want to restrict the user authorization, you can use the restriction fields in the Business Role.

See Also

For more information about restrictions, please check SAP Help Portal | How to Define Authorizations Based on Restrictions

Keywords

preview, data, application, Custom Analytical Query, assigned, Business Catalog, Custom Catalog Extensions, error message, The result set for query XXX is empty, no data, business role, authorization, object, retrieve, CAQ , KBA , BC-SRV-APS-IAM , Identity and Access Management , BC-SRV-APS-GKE , Generic CDS Key User Editor , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem

Product

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