Entering content frame

Generic Data Types for Typing Locate the document in its SAP Library structure

Typing means to specify the data type behind a TYPE addition when you define interface parameters for procedures, or when you define field symbols. The actual data type of interface parameters and fields symobls is only adopted at the runtime of the program when a data object is assigned. The effect of typing is that you can only assign specific data objects. If you specify a completely known data type for a typing which was defined, for example, using TYPES or in the ABAP Dictionary, you can only use data objects of exactly this type as transfer parameters for procedures or assign these to field symbols.

In many cases, however, you need to type interface parameters and field symbols generically. This means that the data type transferred at runtime is only checked in some cases or even not at all. This is the basis of dynamic programming where procedures can work with several types of transfer parameters, for example. On the other hand, partial typing is often necessary to ensure a certain degree of type security.

There is a set of predefined generic types in ABAP syntax that you can use to specify the types of interface parameters and field symbols. You can only use them after the TYPE addition in the FORM, METHODS, and FIELD-SYMBOLS statements.

You cannot use these types to define local data types in a program or data objects. They only allow you to check the data type of fields that you pass to procedures or of field symbols.

For more information, refer to the keyword documentation.


Leaving content frame