‎2007 Dec 31 10:11 AM
Hi,
I need to selct particular fiels from a database table into an internal table where key_field = abc*.
How do I do it?
Eg.
consider i have a DB table 'XYZ' with the fields -
name date class
the entries are say:
name date class
welcome_a 12.12.1980 10
welcome_b 01.11.1980 10
welcome_c 23.03.1980 10
select date class from XYZ into itab where name = welcome*.
This didn't work.
Plese help.
Thankyou
‎2007 Dec 31 10:20 AM
Hi Joy,
You need to use it this way to get the data.
DATA: srch_str TYPE string.
CONCATENATE '%' 'welcome' '%' INTO srch_str.
select date class
from XYZ
into itab
where name LIKe srch_str.
Now you will get it.
Please award points if useful.
Thanks,
Ananth
‎2007 Dec 31 10:19 AM
Hi,
u can select data by:-
select * from dbtable into table itab where name LIKE 'WELCOME*'.
i think it will work.
‎2007 Dec 31 10:20 AM
Hi Joy,
You need to use it this way to get the data.
DATA: srch_str TYPE string.
CONCATENATE '%' 'welcome' '%' INTO srch_str.
select date class
from XYZ
into itab
where name LIKe srch_str.
Now you will get it.
Please award points if useful.
Thanks,
Ananth
‎2007 Dec 31 10:30 AM
Hi Joy,
One more correction.
DATA:
BEGIN OF itab OCCURS 0,
date LIKE xyz-date,
class LIKE xyz-class,
END OF itab.
DATA: srch_str TYPE string.
CONCATENATE ' 'welcome' '%' INTO srch_str.
select date class
from XYZ
into table itab
where name LIKE srch_str.
Now you will get it.
Please award points if useful.
‎2007 Dec 31 10:33 AM
‎2007 Dec 31 10:25 AM
Hi,
we cant put * in where condition of select statement.we have to give the correct values in where conditions.
try this,
select date class
from XYZ
into table itab
where name EQ 'WELCOME_A'
or name EQ 'WELCOME_B'.
reward point if it s useful
regards,
thasneem