ABAPDATA_REFERRING - DATA REFERRING

ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

DATA - TYPE, LIKE

Short Reference



Syntax

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

Effect

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

  • For DATA, a table type can be specified after TYPE that is generic with regard to itssecondarytable key (through the WITH FURTHER SECONDARY KEYS addition explicitly). This type attribute is not relevant for the data object declared.

Note

For internal tables, the declaration of the primary table key as astandard keymay be critical for a variety of reasons and the key fields should, therefore, be defined explicitlyinstead. When executing the statement mentioned above, therefore, you should make sure that you have not accidentally generated a table with standard keys if a generic standard table type is used.

Example


These statements define two data objects, both of which have the same data type as database table spfli.

DATA: spfli_wa1 TYPE spfli,
      spfli_wa2 LIKE spfli_wa1.




ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.


Length: 2953 Date: 20120522 Time: 044519     triton ( 125 ms )