Symptom
Error: 'XXX' is restricted and cannot be added to the query happens when trying to add an object from C4C or ByD query in SAP Analytics Cloud (SAC)
Environment
- SAP Analytics Cloud 2020.8
- SAP Cloud for Customer
- SAP Business ByDesign
Reproducing the Issue
- Log in to SAP Analytics Cloud tenant.
- Create a model based on SAP Cloud for Customer or SAP Business ByDesign connection.
- Select a query to continue.
- Select the problematic object from the left Available Data panel, drag & drop to Selected Data area.
- Error occurs as 'XXX' is restricted and cannot be added to the query.
- Add the same object to Filter area, it works without error.
Cause
In a C4C or ByD report, you have 2 types of fields: Characteristics and key figures which can be displayed in the report view, and variables (also called parameters) which are used in the selection only.
The error message occurs because the selected field is a Selection Parameter, which should be only used as filter.
Checking the metadata about the ODATA for the SAP Cloud for Customer data service, it is confirmed for the problematic object, it has the attributes below which proved this is a Selection Parameter.
sap:selection-type="xxx" sap:selection="true"
Resolution
Only use this Report Selection Parameter in Filter area when building up the query in SAP Analytics Cloud. To check if a field is a variable or a characteristic, you can make use of the tools icon to display the description and ID of a field. If the ID of a field starts with "PAR" or "PARA", the field is a parameter (variable).
The tools icon is available in the "Available Data" section while you create the query in SAC.
Please also note:
If you have a characteristic and a variable with the same label in your ByD or C4C report, the SAC system will only display 1 of those fields. For this reason, it is strongly recommended to rename your variable if you intend to use it in SAC. To rename a variable, please proceed as follows:
- Log on to your ByD or C4C system.
- Go to the work center Business Analytics and the view Design Reports.
- Search for your report and click Edit with > Report Wizard.
- Go to step 5 ("Define Variables").
- Search for your field in this list.
- In the column "Rename Variable To", enter a unique label for your variable.
- Click Finish.
See Also
- KBA 2913312 - How to Consume C4C / ByD Data Sources in SAC Using OData
- KBA 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- KBA 2487011 - What information do I need to provide when opening a case for SAP Analytics Cloud?
- KBA 2511489 - Troubleshooting performance issues in SAP Analytics Cloud
- SAP Analytics Cloud Connection Guide
- SAP Analytics Cloud Get More Help and SAP Support
- Need More Help? Contact Support
Your feedback is important to help us improve our knowledge base.
Keywords
SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, is restricted and cannot be added to the query, business analytics, reporting, report, data source, bydesign, odata, ap-rc-ana , KBA , LOD-ANA-DES , Story Design & Visualizations , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , LOD-ANA-ML , SAC Modelling , How To
SAP Knowledge Base Article - Public