‎2007 Jun 13 5:48 PM
Hi!
I have field-symbol table with some components. And i have another internal table with other fields. Example:
itab (field1, field2, field3)
fs (component1, component2) " like zstruct
I have a table with
field1
field2
field3
struct (zstrcut with 2 fields)
How i can insert into database table?
Regards
pd: really it is not 2 internal tables. It is 2 work areas.
Message was edited by:
Manel Casadesus
‎2007 Jun 13 5:50 PM
First copy the values of itab & fs into workarea whcih is type of database table.
To move from itab- Use MOVE
To move from fs - Use ASSIGN COMPONENT
then using INSERT statement u insert the record into DB table.
Regards,
Sail
Message was edited by:
Aarun Sailyendran Murugesan
‎2007 Jun 13 5:50 PM
loop at itab into wa.
insert into dbtab values wa.
endloop.
~Suresh
‎2007 Jun 13 5:50 PM
First copy the values of itab & fs into workarea whcih is type of database table.
To move from itab- Use MOVE
To move from fs - Use ASSIGN COMPONENT
then using INSERT statement u insert the record into DB table.
Regards,
Sail
Message was edited by:
Aarun Sailyendran Murugesan
‎2007 Jun 13 5:51 PM
Create one more work area which has the same structure as the Z table.
And move values from those 2 work areas to the new work area.
wa_ztable-field1 = itab-field1.
..
and insert this work area into z table.
INSERT INTO ztable VALUES wa_ztable.