Declarative Statements in Release 3.0
1 Defining types
2 Type groups
3 Defining constants
4 Defining static variables
5 Multiple nesting of structures
6 Internal tables without header line
7 Specifying the types of parameters and field symbols
ABAP_MODIFICATION_1 Defining Types
The TYPES statement has been
introduced, allowing you to define your own types. It has a similar
syntax to the DATA statement.
ABAP_MODIFICATION_2 Type Groups
Type groups (see TYPE-POOL ) allow you to
build groups of global types and their associated constants.
ABAP_MODIFICATION_3 Defining Constants
The CONSTANTS statement allows you to
define constants. The syntax of the CONSTANTS statement is
similar to that of the DATA statement. You can define both simple
fields and structures as constants. You cannot define constant tables.
ABAP_MODIFICATION_4 Defining Static Variables
Fields within FORM s and FUNCTION s that are defined with
DATA are re-created and re-initialized each time the routine is
called. The new STATICS statement, which you
can use within FORM s and FUNCTION s, allows you to define
fields that retain their values beyond the routine call. This statement
supports nearly all of the additions used with the DATA
statement.
ABAP_MODIFICATION_5 Multiple Nesting of Structures
Previously, it was only possible to define simple nested structures
using the DATA statement. You could not nest DATA BEGIN OF,
.... END OF . This restriction has now been lifted, allowing you to
define structures as components of another structure. This is now
posssible in the DATA ,
STATICS , CONSTANTS , and
TYPES statements.
ABAP_MODIFICATION_6 Internal Tables without Header Line
Previously, each interanl table automatically had a
header line , which
served as a table work area. A table with header line is therefore a
mixture of two data objects (the table and the header line) under a
single name. You can now define tables and table types without header
lines in the DATA ,
STATICS , and TYPES statements,
using the following syntax:
DATA TAB TYPE STRUC OCCURS 0.
You can use these tables without header lines as components in
structures. If you need a work area for a table, you must define it
under another name.
With the DATA and STATICS statements, you can use the
... WITH HEADER LINE addition to create a table with header
line. You may only do this at the top nesting level, that is, not
within a structure. Since the property of having a header line or not
is not a type property, but a property of a data object, you cannot use
this addition in the TYPES statement.
ABAP_MODIFICATION_7 Specifying the Types of Parameters and Field
Symbols
You can now specify the types of the parameters of
FORMs and FIELD-SYMBOLS
using the LIKE fld and TYPE typ additions. For the
parameters of function modules, you can now use references to
predefined ABAP types and global types as well as referring to
ABAP
Dictionary fields.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved