Declares variables with a
previously-declared data type
Syntax
DATA <f>� [TYPE
<type>|LIKE <obj>]� [VALUE <val>].
Declares a variable <f>
with the fully-defined data type <type> or the same data type as another data
object <obj>. The data type <type> can be D, F, I, T, a type defined locally in
the program using the TYPES statement, or a type from the ABAP Dictionary. The
data object <obj> is a data object or line of an internal table that has already
been defined. The VALUE addition specifies a starting value.
DATA with Reference to
Generic Data Types
Declares variables by
completing the description of a generic type
Syntax
DATA <f>[(<length>)] TYPE
<type> [DECIMALS <d>]� [VALUE <val>].
DATA <f> TYPE <itab>.
The data type <type> can
be C, N, P, X, STRING or XSTRING. The <length> option sets the field length. If
you omit it, the field length is set to the appropriate initial value. If <type>
is P, you can specify the number of decimal places using the DECIMALS <d>
addition. If you omit this, the number of decimal places is set to 0. If you do
not use the TYPE addition, the system uses the default predefined generic type
C.
Syntax
DATA <f> TYPE <itab>.
The data type <itab> is a
standard internal table with generic key. The default key is automatically used
in the DATA statement.
DATA, Creating an
Associated Data Type
Declares variables with
data types that only exist as an attribute of the variable.
Syntax
DATA <f> TYPE REF TO
<class>|<interface>.
The variable <f> is
defined as an object reference variable for the class <class> or interface
<interface>.
Syntax
DATA <f> TYPE REF TO
DATA|<type>.
Declares the variable <f>
as a data reference variable for a data object.
Syntax
DATA: BEGIN OF
<structure>,
�
<fi>�,
�
END OF <structure>.
Combines the variables <fi>
to form the structure <structure>. The individual variables within a structure
are addressed in the program with a hyphen between the structure name and
component name as follows: <structure>-<f i>.
Syntax
DATA <f> TYPE|LIKE
<tabkind> OF <linetype> WITH <key>.
The variable <f> is
declared as an internal table with the table kind <tabkind>, line type
<linetype>, and key <key>.
Syntax
DATA <f> TYPE|LIKE RANGE
OF <type>|<obj>.
Declares the variable <f>
as a RANGES table. A RANGES table has the same data type as a selection table,
but is not linked to input fields on a selection screen.
DATA statement for
Shared Data Areas
Declares shared data areas
in a program.
Syntax
DATA: BEGIN OF COMMON PART <c>, <f i>.
..
END OF COMMON PART.
The variables <fi>
are assigned to a data area <c>, which can be defined in more than one program.
These data areas use the same memory addresses for all programs that are loaded
into the same internal session.
DEFINE
Defines a macro.
Syntax
DEFINE <macro>.
Introduces the definition
of the macro <macro>. Each macro must consist of complete ABAP statement and be
concluded with the END-OF-DEFINITION statement.
DELETE for Files
Deletes files on the
application server
Syntax
DELETE DATASET <dsn>.
Deletes the file <dsn>
from the file system of the application server.
DELETE for Database
Table Entries
Deletes entries from
database tables.
Syntax
DELETE FROM <dbtab> WHERE <cond>.
All of the lines in the
database table that satisfy the conditions in the WHERE clause are deleted.
Syntax
DELETE <dbtab> FROM <wa>.
DELETE <dbtab> FROM TABLE
<itab>.
This deletes the line that
has the same primary key as the work area <wa>, or deletes all the lines in the
database that have the same primary key as a line in the internal table <itab>.
The work area <wa> or the lines of the internal table <itab> must have at least
the same length as the work area of the database table.