07-02-2007 10:13 AM
How to copy data from transparent table to our own ceated z table?
Plz tell me different methods and which one is best?
Is get data from sflight into table z* is correct?
07-02-2007 10:18 AM
Hi
use following commands:
select * from sflight into table itab.
insert zsflight from table itab.
Jogdand M B
07-02-2007 10:21 AM
Hi,
Try to select data from database table into an internal table. Then insert the values in Ztable. commit work.
select * from mara into it_mara.
insert into zmara values it_mara.
ex:
INSERT INTO dbtab [CLIENT SPECIFIED] VALUES wa.
INSERT INTO (dbtabname) [CLIENT SPECIFIED] VALUES wa.
- INSERT dbtab [CLIENT SPECIFIED].
INSERT *dbtab [CLIENT SPECIFIED].
INSERT (dbtabname) [CLIENT SPECIFIED] ... .
- INSERT dbtab [CLIENT SPECIFIED] FROM TABLE itab.
INSERT (dbtabname) [CLIENT SPECIFIED] FROM TABLE itab.
Regards,
Priyanka.
07-02-2007 10:54 AM
Hi Ajay,
let us consider you have to copy EKKO table to ZEKKO table
1. In ABAP program define internal table based on EKKO
<b> eg: i_ekko</b>
2. Select the data from EKKO to i_ekko
<b> eg: select * from ekko into table i_ekko.</b>
3. insert into Z-TABLE from the internal table
<b> eg: INSERT EKKO FROM TABLE I_EKKO.
COMMIT WORK.</b>
<u>To insert in internal table you can use the following:</u>
1. INSERT [wa INTO|INITIAL LINE INTO] itab [INDEX idx].
2. INSERT [wa INTO|INITIAL LINE INTO] TABLE itab.
3. INSERT LINES OF itab1 [FROM idx1] [TO idx2] INTO itab2 [INDEX idx3].
4. INSERT LINES OF itab1 [FROM idx1] [TO idx2] INTO TABLE itab2.
<u>To inert in database table, use the following:</u>
1. INSERT INTO <dbtabname> [CLIENT SPECIFIED] VALUES wa.
2. INSERT <dbtabname> [CLIENT SPECIFIED] FROM TABLE itab.
3. INSERT <dbtab> [CLIENT SPECIFIED]. oder
4. INSERT <dbtabname> [CLIENT SPECIFIED] ... .
<b>Reward points.. if helpful.
Cheers !
Moqeeth.</b>