cancel
Showing results for 
Search instead for 
Did you mean: 

Search annotation not working when using built-in function CURRENCY_CONVERSION

manoj_achar
Discoverer
0 Kudos
91

Using 'Search' annotation we have exposed some fields data to be searched. 

@search.searchable: true

@search.defaultSearchElement: true
@search.fuzzinessThreshold: 0.9
@search.ranking: #HIGH

In the CDS, 2 levels down we have used built-in function CURRENCY_CONVERSION to convert the price value depending on the currency type. Because of this, the search functionality is dumping. We have not used 'Search' annotation on this field (and subsequent fields using this field), but still it is producing error. 

Appreciate any help on this.

cast( currency_conversion ( 
amount => final_margin,
source_currency => currency,
target_currency => cast('US$' as abap.cuky( 5 )),
exchange_rate_date => valid_from,
round => '',
error_handling => 'SET_TO_NULL'
) as zrpd_final_margin ) as Final_MarginUSD,

Accepted Solutions (0)

Answers (1)

Answers (1)

manoj_achar
Discoverer
0 Kudos

No. In the backend, it generates Native HANA sql for the search and we get a dump. There is no useful information in the termination result on why it happened.

If we comment the built-in function currency_conversion and then search, we get the search results back.