09-09-2008 6:37 AM
How to move a single field from database table to internal table? Specify the command.
09-09-2008 6:38 AM
09-09-2008 6:38 AM
09-09-2008 6:39 AM
hi,
select single <field> from <dbtable> into <itab>
where <condition>
Regards,
Sathish reddy
09-09-2008 6:43 AM
Hi,
just declare one internal table containing only the field which you want to move.
let the internal table is i-tab anf field is f1,
types : begin of t_tab,
f1 type <dataelement of the field>,
end of t_tab.
Data : i_tab type standard table of t_tab.
select f1 from <database table name>
into table i_tab.
Then the table will contain only the intended fields.
09-09-2008 6:47 AM
hiii
you can use query like
SELECT matnr " Material Number
FROM mara
INTO TABLE i_mara
WHERE matnr IN s_matnr.
regards
twinkal
09-09-2008 6:49 AM
09-09-2008 6:50 AM
Hi,
If you want to fetch only one value of one field then
Select single <fieldname> into corresponding fields of <internal table name> from
<database table> where <condition>.
if you want to select all the possible values of a field based on some criteria then dont use single keyword.
Select <fieldname> into corresponding fields of table <internal table name> from
<database table> where <condition>.
note one thing here we cannot use table keyword with single keyword.
it will give you an error.
Thanks
Rajesh