2017 Aug 11 12:02 PM
Dear Expert,
I want to achieve the below in the CDS view.
AS ABAP
SELECT * FROM edidc INTO CORRESPONDING FIELDS OF table it_data
WHERE ( ( mestyp = 'ORDERS' AND direct = '2' ) OR
( mestyp = 'ORDCHG' AND direct = '2' ) OR
( mestyp = 'INVOIC' AND direct = '1' ) OR
( mestyp = 'WMMBXY' AND direct = '2' ) OR
( mestyp = 'PORDCH' AND direct = '2' ) OR
( mestyp = 'DESADV' AND direct = '1' ) OR
( mestyp = 'DESADV' AND direct = '2' ) OR
( mestyp = 'INVOIC' AND direct = '2' ) OR
( mestyp = 'ORDERS' AND direct = '1' ) OR
( mestyp = 'ORDCHG' AND direct = '1' ) OR
( mestyp = 'Z_INV_STAT' AND direct = '1' ) ).
CDS VIew
define view Ztest_assotiation
as select from edidc as a
association [1] to edid4 as b on $projection.docnum = b.docnum
{ a.docnum, a.mestyp, a.sndprn, a.direct, a.credat, b.counter, b.segnum, b.segnam, b.dtint2 , b.sdata }
I want to achieve multiple where conditions for same field ex. ( mestyp = 'ORDERS' AND direct = '2' ) OR
( mestyp = 'ORDCHG' AND direct = '2' ) OR
( mestyp = 'INVOIC' AND direct = '1' ) OR
( mestyp = 'WMMBXY' AND direct = '2' ) OR
( mestyp = 'PORDCH' AND direct = '2' ) OR
Kindly help.
2019 Apr 27 10:18 AM
Dear
Please do let me know, if you have succeeded in getting the value in the CDS view from the EDID4 table.
Regards
Praveen G