Reuse of Calculated Columns in CDS-View

2 months ago 17

Hi Experts,

In thread Reuse of Calculated Columns successful CDS View, a solution was posted:

select vbeln, netwr, mwsbk, netwr + mwsbk arsenic total, ( netwr + mwsbk ) * 1000 arsenic total1000 from vbrk

Note that determination is redundancy here: the look "netwr + mwsbk" occurs twice. This is OK for specified a elemental case. However, my calculated fields are overmuch much analyzable and I would similar to reuse existing expressions (already created calculated fields), as:

select vbeln, netwr, mwsbk, netwr + mwsbk arsenic total, full * 1000 arsenic total1000 from vbrk

I tried:

  1. Exactly arsenic above: I got mistake connection "The file 'total' is unknown"
  2. With prefix $projection.total: error message "Reuse of $projection look not possible"
  3. I created a 2nd CDS View which reads from the archetypal one, and past I reused the 2nd arsenic relation successful the archetypal one. I got mistake connection "Recursive definitions are not supported" (which makes sense)

Are determination immoderate ideas?
Thanks!
Igor

Read Entire Article