2019 Aug 28 10:43 PM
Hello,
I am creating a CDS view and getting syntax error with NOT IN condition of WHERE clause.
My sample query in CDS looks like
SELECT FROM BKPF{
bukrs, belnr, gjahr, ,,, }
WHERE blart NOT IN ('KN','KR')
Please help how to fix this?
Thanks,
Prasad
2019 Aug 29 5:58 AM
Hi Prasad Ganta
I believe what you are trying is the ABAP opensql statement in ABAP CDS view. As both are different, what works in ABAP OpenSQL will not work in CDS view. You can check the documentation below:
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abencds_f1_conditional_expression.htm
You can use the where condition as below:
where ( blart <> 'KN' and blart <> 'KR' )Thanks,
Mahesh
Hello,
I am creating a CDS view and getting syntax error with NOT IN condition of WHERE clause.
My sample query in CDS looks like
SELECT FROM BKPF{
bukrs, belnr, gjahr, ,,, }
WHERE blart NOT IN ('KN','KR')
Please help how to fix this?
Thanks,
Prasad
2019 Aug 29 5:58 AM
Hi Prasad Ganta
I believe what you are trying is the ABAP opensql statement in ABAP CDS view. As both are different, what works in ABAP OpenSQL will not work in CDS view. You can check the documentation below:
https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abencds_f1_conditional_expression.htm
You can use the where condition as below:
where ( blart <> 'KN' and blart <> 'KR' )Thanks,
Mahesh
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |