Ansicht
Dokumentation

ABAPDATA_REFERRING - DATA REFERRING

ABAPDATA_REFERRING - DATA REFERRING

Vendor Master (General Section)   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

DATA, TYPE, LIKE

Short Reference



DATA var ${ ${TYPE $[LINE OF$] type$}
         $| ${LIKE $[LINE OF$] dobj$} $}
         $[VALUE  val$|${IS INITIAL$}$]
         $[READ-ONLY$].

Effect

When a type data type or a dobj data object is specified, the data type of variable var is already fully defined before the declaration. The syntax and meaning of the additions TYPE and LIKE are exactly the same as the definition of the data types with TYPES, with the following exceptions:

  • In the case of DATA, a table type can be specified after TYPE that is generic with respect to its secondary table key because of the explicit addition WITH FURTHER SECONDARY KEYS. This type property is not relevant for the declared data object.

If neither TYPE nor LIKE is specified, a data object with the bound data type c of length 1 is created.

Notes

  • For internal tables, the declaration of the primary table key as a standard key can be critical for various reasons. It is best to define the key fields explicitly instead. For this reason, in the case of the statement above, it must be ensured that a table with a standard key is not created by mistake if a generic standard table type is used.

Example

Use of the TYPE addition to declare a work area for a SELECT statement. Use of the LIKE addition to declare a further data objects of the same type.








RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3779 Date: 20240420 Time: 012138     sap01-206 ( 56 ms )