Entering content frame

Compatibility Locate the document in its SAP Library structure

Two non-generic data types or data objects are referred to as compatible if all of their technical attributes (field length, number of decimal places, type) are exactly the same.

Do not confuse the two terms compatible and convertible. When working with data objects, you will often make assignments between data objects that have different technical attributes. In this case, the data types are converted. In order for non-compatible data types to be converted, a conversion rule must exist. Only compatible data objects can be assigned to one another without a conversion being necessary.

Compatibility applies to fully-specified data types, since all data objects are fully typed at runtime. This compatibility is symmetrical. There is also an asymmetrical compatibility, which is used to test the types of interface parameters in procedures and of field symbols. In this case, generic types are compared with fully-specified data types.

Consequences of definition for the compatibility of data types:

Elementary Data Types

Elementary data types are compatible with other elementary data types if they are identical in type, field length, and the number of decimal places.

Elementary data types are not compatible with references or complex types.


References are compatible with other references when their construction rules (type constructor REF TO <class>|<interface>) are the same.

References are not compatible with elementary data types or complex types.

Complex Data Types

Complex data types are compatible with other complex data types if their construction rules are the same.

Complex data types are not compatible with elementary data types or references.


Structures are compatible with other structures if their constructions are identical and their components are compatible. This means that the way in which field strings are constructed from elementary fields to form the overall structure from sub-structures must be the same and their elementary components must be compatible with each other. If two structures consist of the same sequence of elementary fields, but these fields are combined differently to substructures, the structures are not compatible.

Structures are not compatible with internal tables.

Internal Tables

Internal tables are compatible with other internal tables if their line types are compatible and all other attributes are also the same for both tables. The compatibility of internal tables does not depend on the number of lines.

Internal tables are not compatible with structures.



Leaving content frame