07-11-2007 12:08 PM
Hi all,
i have two internal tables.
one table have Mandt key extra comparing to other internal table.
and both have remaining all the fields same.
Now i want to insert all the fields from the internal table which dont have mandt key to another internal table which have mandt key.
i dont want to use loop.
how can i insert the fields.???
Regards,
CSR.
07-11-2007 1:53 PM
Hi CSR,
You can use following syntax,
1) ITAB1[] = ITAB2[].
or 2) move ITAB2[] to ITAB1[].
Please reward if helpful.
Regards.
Srikanta Gope.
07-11-2007 1:56 PM
see the below code which is inserting data from work area to internal table .
DATA: BEGIN OF connection,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
distid TYPE spfli-distid,
distance TYPE spfli-distance,
END OF connection.
DATA connection_tab LIKE SORTED TABLE OF connection
WITH UNIQUE KEY cityfrom cityto
distid distance.
SELECT cityfrom cityto distid distance
FROM spfli
INTO connection.
INSERT connection INTO TABLE connection_tab.
ENDSELECT.
reward points if it is usefull....
Girish
07-11-2007 2:00 PM
I don;t think you can do this without a LOOP statement as both tables have different structures.