Do you have any question about this error?
Message type: E = Error
Message class: RSRTS_CDS - Messages Transient CDS Queries
Message number: 146
Message text: Annotated formula for &1: &2 cannot be used (only measures allowed)
Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.
To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.
Unfortunately, there isn't any extra information in this error notice.
First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).
Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.
You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.
RSRTS_CDS146
- Annotated formula for &1: &2 cannot be used (only measures allowed) ?The SAP error message RSRTS_CDS146 indicates that there is an issue with the use of an annotated formula in a Core Data Services (CDS) view or a query. Specifically, the error states that the annotated formula you are trying to use is not valid because it is not a measure. In SAP BW/4HANA or SAP S/4HANA, measures are typically numeric values that can be aggregated, while dimensions are attributes that provide context to those measures.
Cause:
The error occurs when:
- You are trying to use a calculated or annotated formula that is not defined as a measure in the context where only measures are allowed.
- The formula may be incorrectly defined or not properly annotated in the CDS view.
- The context of the query or the data model expects a measure but receives a dimension or an incompatible data type instead.
Solution:
To resolve the RSRTS_CDS146 error, you can take the following steps:
Check the Formula Definition:
- Ensure that the formula you are using is defined as a measure in the CDS view. You can do this by checking the annotations in the CDS view definition.
- If the formula is intended to be a measure, make sure it is annotated correctly with
@Analytics.dataCategory: #MEASURE
.Review the Query Context:
- Verify that the query or the context where you are using the formula is appropriate for measures. If the context expects a measure, ensure that you are not inadvertently passing a dimension.
Modify the Query:
- If the formula is indeed a dimension and not a measure, consider modifying your query to use a valid measure instead. You may need to adjust your data model or the way you are aggregating data.
Test with Simple Measures:
- As a troubleshooting step, try replacing the annotated formula with a simple measure to see if the query runs successfully. This can help isolate the issue.
Consult Documentation:
- Refer to the SAP documentation for Core Data Services and the specific annotations related to measures and dimensions. This can provide additional insights into how to properly define and use measures in your CDS views.
Check for Updates:
- Ensure that your SAP system is up to date, as there may be patches or updates that address known issues related to CDS views and measures.
Related Information:
By following these steps, you should be able to identify the cause of the error and implement a solution to resolve it.
Get instant SAP help. Start your 7-day free trial now.
RSRTS_CDS145
Annotated formula for &1: &2 cannot be used (must be based on measure)
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
RSRTS_CDS144
Entry &1: planning properties ignored (not supported for formulas)
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
RSRTS_CDS147
Field &1 is not available as an Infoobject in InfoProvider &2
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
RSRTS_CDS148
Annotations of &1 use hierarchies, but &1 does not have any
What causes this issue? Annotations (for filters or display hierarchy) of the field refer to hierarchies<(>,<)> but the field does not ha...
Click on this link to search all SAP messages.