ARTICLE
Conversion Rules for Internal Tables
Internal tables can only be assigned to internal tables. Whether or not
assignment is possible depends exclusively on row type, and is
independent of table type, table key, and number of rows. Internal
tables can be assigned to each other if their row types are
compatible or
convertible . This applies to both
Unicode programs and non-Unicode programs.
When assigning an internal table to another, the rows of the target
table are deleted. A new row is created in the target table for each row
in the source table. They are then filled with the row contents in the
source table. The rows are stored according to the table category. For
assignments to a sorted table , the
content is automatically sorted and hash
tables are stored according to the hash algorithm.
The content of the individual rows in the source table is assigned to
the rows in the target table according to the same rules as for
assignments between individual data objects of corresponding row types.
The same basic rule as for all conversions applies: The converted
content of the single rows in the source table must lie within the
value range of the row type in the target
table.
ABAP_PGL Avoid unexpected
conversion results
Notes
In internal tables with compatible or convertible row types, a
non-handleable exception can be raised during assignment if, for exam
ple, in the target table a duplicate of
a unique primary table key or
secondary table key is created.
Internal tables with elementary row types can raise the same handleable
exceptions as when making assignments between the associated elementary
data types. After an exception of this type, all rows assigned until
this point are passed to the target table.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved