‎2009 Jul 08 3:05 PM
Hi,
I want to update a standard DB table, but the structure of my internal table is different from the structure of the DB table.
ex: DB Table structure:
field1
field2
field3
IT structure is
field1
field3.
When we try to update the DB Table using this ITAB its giving error "The Work area 'ITAB' is not long enough'.
Help and suggestions will be much appreciated.
Thanks & Regards.
Ramesh.
‎2009 Jul 08 3:09 PM
Hi Ramesh,
The Internal Table must of the same type of Standard Table.
Hence, create an ITAB of Standard Table type. And try with the syntax "MODIFY".
Rgds,
Ramani N
‎2009 Jul 08 3:09 PM
Hi Ramesh,
The Internal Table must of the same type of Standard Table.
Hence, create an ITAB of Standard Table type. And try with the syntax "MODIFY".
Rgds,
Ramani N
‎2009 Jul 08 3:15 PM
Hi,
The requirement is to update only those 3 fields in the DB table not the entire table.
Thanks & Regards.
Ramesh
‎2009 Jul 08 3:23 PM
Try with the structure of same tyoe as of the Database Table, and fill only those fields of the strcuture that you are looking to update.
‎2009 Jul 08 3:51 PM
Hi,
Try with the structure of same tyoe as of the Database Table, and fill only those fields of the strcuture that you are looking to update
When we tried with the same structure if DB table the field values are mispalced in 1st three fields and not in the correcponding fields.
ex: wa like <DB Table>
loop at itab into wa
update <DB Table> from wa.
endloop.
Thanks & Regards.
Ramesh
‎2009 Jul 08 3:56 PM
Hi,
Sorry there was some typing mistake.
The exact scenario is when we tried with the same structure like DB table, the field values are mispalced in the work area (i.e)fields values and not in the correcponding fields.
Here is the syntax which we used
data: wa like <DB Table>
loop at itab into wa
update <DB Table> from wa.
endloop.
Thanks & Regards.
Ramesh
‎2009 Jul 08 4:02 PM
Hi Ramesh,
Make use of other alternative of UPDATE command.
Update dbtable
SET field1 = itab1-field1
field2 = itab1-field2
where (conditions if you have any).
Using the above alternative of UPDATE stament you can set values for particular fields of the database table.
Hope this helps.
Thanks & Regards,
Anand Patil
‎2009 Jul 08 3:26 PM
hi
you can use transporting
try this
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb35eb358411d1829f0000e829fbfe/content.htm
‎2009 Jul 17 4:41 PM