10-19-2007 5:38 AM
hi all,
I have got one query very i need to check for an field condition based,that is for field1 eq ='ABC' and field1 eq 'dcf' with other conditions as well.
So please tell me how to do it in only one sql statement.
code is as follows:
SELECT RBUKRS RACCT RZZSLOB RZZBSA RBLART RMVCT FROM ZDLC2T INTO TABLE it_fndtab
WHERE RYEAR EQ p_year AND RBUKRS IN s_comp and ( RBLART EQ 'ZS' and RBLART EQ 'ZQ' ).
Thanks in Advance.
Reward points given
10-19-2007 5:45 AM
Hi,
Check out this code.
SELECT RBUKRS RACCT RZZSLOB RZZBSA RBLART RMVCT FROM ZDLC2T INTO TABLE it_fndtab
WHERE RYEAR EQ p_year AND RBUKRS IN s_comp and RBLART in ( 'ZS' , 'ZQ' ).
regards,
Santosh Thorat
10-19-2007 5:46 AM
Hi Aruna,
Please use the or statement.
RBLART EQ 'ZS'
or
RBLART EQ 'ZQ'
Hope this helps.
Benedict