Quantcast
Channel: SCN : Popular Discussions - ABAP for SAP HANA
Viewing all articles
Browse latest Browse all 1246

comparing fields in dynamic way inside CDS views

$
0
0

Hi,

I am working on a prototype where i have to compare few fields of a DB table to see if there is any different value in any one of them. The fields to be compared comes from another table and could differ at times. How do i achieve this in CDS views ?

For e.g.

I get 2 fields named dispo and dispr from t130f DB table. After this i have to make a select on marc by comparing these 2 fields to see if the value differs. Something like this:

    SELECT A~*

     from MARC as A

     INNER JOIN MARC as B

         on A~matnr = B~matnr

     WHERE A~matnr = 'W10_000_0000000057'

       and ( A~dispo <> B~dispo

       OR  A~dispr <> B~dispr ).


The condition in brackets would be kind of dynamic. Thanks a lot in advance.


Regards,

Ashish


Viewing all articles
Browse latest Browse all 1246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>