带where子句的CDS VIEW Select语句

2020-09-09 14:23发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)尊敬的专家, 我想在CDS视图...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


尊敬的专家,

我想在CDS视图中实现以下目标。

按ABAP

SELECT *从edidc到表it_data的对应字段中
(<(mestyp ='ORDERS'AND direct ='2')OR
(mestyp ='ORDCHG'AND direct ='2')OR < br>(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视图

定义视图Ztest_assotiation

从edidc中选择

将$ projection.docnum = b.docnum上的[1]与edid4关联为b

{a.docnum,a.mestyp,a.sndprn,a.direct,a.credat,b.counter,b.segnum,b.segnam,b.dtint2,b.sdata}

我想针对同一字段ex实现多个where条件。 (mestyp ='ORDERS'AND direct ='2')或

(mestyp ='ORDCHG'AND direct ='2')或
(mestyp ='INVOIC'AND direct ='1')OR
(mestyp ='WMMBXY'AND direct ='2') OR
(mestyp ='PORDCH'AND direct ='2')OR

请帮助。