SAP NEW CONSTRUCTOR PARAMS INITIAL



Get Example source ABAP code based on a different SAP table
  



NEW, Initial Value for All Types

ABAP_SYNTAX
... NEW dtype$|class$|#( ) ...

What does it do?
If no parameter is specified,
an anonymous data object retains its type-specific initial value,
no values are passed to the instance constructor of an object.
This is possible for every non-generic data type dtype. The instance constructor of a class class can either have only optional input parameters or no input parameters at all. The # symbol can stand for corresponding types.



Latest notes:

If dtype or # stand for an enumerated type, its initial value is created according to its base type.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
After the following program section is executed, dref points to an empty internal table with the line type T100. Both constructor expressions have the same function.
ABEXA 01162
ABAP_EXAMPLE_END