Syntax error Using combination of “AND” and “OR” in SELECT in ABAP

Using combination of “AND” and “OR” in SELECT in ABAP



You can use the following query:

SELECT * FROM my_table
WHERE condition 1
AND condition 2
AND ( id EQ '2' or id EQ ‘3’ ).

Note: There should be space after and before bracket.

Alternatively you can use IN statement as below:

SELECT * FROM my_table
WHERE condition 1
AND condition 2
AND EQ IN ('2', ‘3’ ).




Updated on: 2019-12-09T06:32:33+05:30

10K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements