Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS view - currency_conversion function parameters

former_member652212
Discoverer
0 Likes
624
  • SAP Managed Tags

Hi -

We've created a CDS view that uses the currency_conversion function. The problem that we are running into is that we cannot call the function with parameters that are modified in the call. For example, we want to do something like this:

currency_conversion( amount => acdoca.tsl, source_currency => acdoca.rtcur, target_currency => t.waers, exchange_rate_date => dats_add_days(acdoca.budat,1,'NULL'), exchange_rate_type => 'M', error_handling => 'KEEP_UNCONVERTED' )

However, as I'm sure you know, we get the message "In function CURRENCY_CONVERSION, only columns, literals and parameters allowed".

Is there any way to call functions of these types using complex parameters WITHOUT having to create another view 'underneath' this one with the date calculation done in the underlying view?

Thanks,
Mark Chappell

0 REPLIES 0