2007 Jul 19 5:50 AM
hi
in select query i am using where condition.
in my selection i would want to display data that start with Z and Y.
i have used like this.. where NAME IN (Z%,Y%).
but it's not working..
give me some other solution to overcome this...
plz reply me..
2007 Jul 19 5:59 AM
Hi,
use select command like this :
SELECT ernam
FROM ekko
INTO corresponding fields of table it_test
WHERE ernam like 'Y%'
or ernam like 'Z%'.
Entry in Capital letters only.
Reward points, if helpful,
Sandeep Kaushik
Hi,
use select command like this :
SELECT ernam
FROM ekko
INTO corresponding fields of table it_test
WHERE ernam like 'Y%'
or ernam like 'Z%'.
Entry in Capital letters only.
Reward points, if helpful,
Sandeep Kaushik
2007 Jul 19 5:53 AM
2007 Jul 19 5:56 AM
Hi
Try with Z% and Y% in where clause
<b>select matnr into v_matnr from mara where matnr LIKE 'Z%' or matnr LIKE 'Y%'.</b>
Other wise fetch the data completely into itab then loop it
loop at itab.
if ( itab-field0(1) ne 'Z' or itab-field0(1) ne 'Y' )
delete Itab index sy-tabix.
endif.
Endloop.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 19 5:59 AM
HI,
see this code
tables:mara.
select * from mara where matnr in ('z%','y%').
write:/ mara-matnr.
ENDSELECT.
rgds,
bharat.
2007 Jul 19 5:59 AM
Hi,
use select command like this :
SELECT ernam
FROM ekko
INTO corresponding fields of table it_test
WHERE ernam like 'Y%'
or ernam like 'Z%'.
Entry in Capital letters only.
Reward points, if helpful,
Sandeep Kaushik
2007 Jul 19 6:07 AM
2007 Jul 19 6:17 AM
hi,
give them in single quotations as
where NAME IN ('Z%','Y%')
or
name like 'Z%' or like 'Y%'.
if helpful reward some points.
with regards,
Suresh.A
2007 Jul 19 6:18 AM
Hi Limat,
view this code and use like instead of IN.
DATA: T_SFLIGHT LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.
SELECT * FROM SFLIGHT INTO TABLE T_SFLIGHT WHERE CARRID = 'AZ' AND
CONNID IN ('0555', '0790') AND FLDATE LIKE '2004%'.
LOOP AT T_SFLIGHT.
WRITE: /,T_SFLIGHT-CARRID,T_SFLIGHT-CONNID.
ENDLOOP.
If useful rewrad me with points.
Thanks.
Sanket.
2007 Jul 19 6:41 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |