Ansicht
Dokumentation

ABENCONVERSION_ITAB - CONVERSION ITAB

ABENCONVERSION_ITAB - CONVERSION ITAB

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Conversion Rules for Internal Tables

Internal tables can only be assigned to internal tables. Whether or not assignment is possible depends exclusively on the line type, and it is independent of table type, table key, and number of lines. Internal tables can be assigned to each other if their line types are compatible or convertible.

When assigning an internal table to another, the lines of the target table are deleted. A new line is created in the target table for each line in the source table and then filled with the line content of the source table. The lines are stored according to the table category. For assignments to a sorted table, the content is automatically sorted, and hashed tables are stored according to the hash algorithm.

The content of the individual lines in the source table is assigned to the lines of the target table according to the same rules as between individual data objects of the corresponding line types. The same basic rule as for all conversions applies: The converted content of the single lines in the source table must be within the value range of the line type in the target table.

Notes

  • In internal tables with compatible or convertible line types, an uncatchable exception can be raised during assignment if, for example, in the target table a duplicate of a unique primary table key or secondary table key would be created.
  • Internal tables with elementary line types can raise the same catchable exceptions as assignments between the associated elementary data types. After an exception of this type, the target table contains all lines assigned until this point.
  • In assignments of an initial internal table to a filled internal table, the target table is initialized in the same way as with the statement CLEAR. This releases the memory space required for the table, except for the initial memory requirement (see INITIAL SIZE).

Avoid unexpected conversion results

Example

A standard table text_tab with line type c of length 20 is converted to a sorted table of type string.






CL_GUI_FRONTEND_SERVICES - Frontend Services   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 3198 Date: 20240425 Time: 091039     sap01-206 ( 55 ms )