cancel
Showing results for 
Search instead for 
Did you mean: 

CDS View annotation to make valuehelp (F4) of dimension show only posted values?

kashif_abbas1
Explorer
0 Kudos

Hi everyone,
I am having a CDS type Query based on CDS type Cube. I have put a WHERE condition in the Cube, to limit the transaction data only to SDDocumentCategory = 'C or G'. The filter is working fine, and i have provided customer with the variable filter through following annotation, as well as ability to select from available values rather than manually putting it.

@Consumption.filter: { selectionType: #SINGLE, multipleSelections: true, mandatory: false }

Problem: Since the data is only available for C and G, i ideally should be only getting to choose between these two. However i get multiple values to choose from (eventhough they dont have transaction data).
Is there an annotation to limit the values only to posted values?
I tried the following annotation from the following link, but it didnt work

@AnalyticsDetails.query.resultValuesSource: #CUBE
https://help.sap.com/docs/SUPPORT_CONTENT/bwplaolap/3361383109.html

JulianoRomanato
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello kashif.abbas.

How are you? I have excluded the Tag "SAP S/4HANA Cloud" and included the Tag "SAP S/4HANA Cloud for Sales" for this question, as Sales Documents are related to Sales Line of Business.

Regards.

Juliano Romanato.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member291966
Discoverer
0 Kudos

Dear Kashif Abbas,

In the context of variables used in CDS queries, only the master data mode is available for the F4 help. The annotation @AnalyticsDetails.query.resultValuesSource has no impact on variables but determines the value set in the query result and the value help at query runtime. See the following support content page for a detailed discussion:

https://help.sap.com/docs/SUPPORT_CONTENT/bwplaolap/3361385699.html?locale=en-US

-> search for chapters:
'Value Help for Variables/Parameters' & 'Value Help in Query Result and Access Type for Result Values'

with best regards,
Peter Stockinger