Using operator 'OR' in WHERE condition
I have a doubt in using the relational operator 'OR'.
Consider the below case:
To fetch data where FLTYP is equal to A or B or G.
1) SELECT TPLNR
FROM IFLO INTO TABLE T_IFLO
FOR ALL ENTRIES IN T_ILOA
WHERE TPLNR = T_ILOA-TPLNR AND SPRAS = 'E' AND
( FLTYP = 'B' OR FLTYP = 'A' OR FLTYP = 'G' ).
It is not working if i give it like this
2) WHERE TPLNR = T_ILOA-TPLNR AND
( FLTYP = 'B' ) OR ( FLTYP = 'A' ) OR ( FLTYP = 'G' ) AND SPRAS = 'E' .
If i give it as above , its not fetching data where FLTYP = B, but its fetching for 'A' and 'G'.
3) WHERE ( FLTYP = 'B' OR FLTYP = 'A' OR FLTYP = 'G' ) AND
( SPRAS = 'E' AND TPLNR = T_ILOA-TPLNR ).
This is also not working.
How do i check this condition with 'OR' operator.
Help me on this issue.