SAP VALUE CONSTRUCTOR PARAMS INIT SAP Info
ARTICLE ( Version: 0015)
Syntax
Effect
If no parameters are specified, the return value is set to its
type-specific initial value. This is possible for any non-generic data types
Note
complex values (date/time values, structures, internal tables).
Example
Creates a suitable initial structure for a non-optional input parameter
of a method. CLASS c1 DEFINITION.
PUBLIC SECTION.
TYPES: BEGIN OF t_struct,
col1 TYPE i,
col2 TYPE i,
END OF t_struct.
CLASS-METHODS m1 IMPORTING p TYPE t_struct.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD m1.
...
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
c1=>m1( VALUE #( ) ).
ARTICLE ( Version: 0019)
Syntax
Effect
If no parameters are specified, the return value is set to its
type-specific initial value. This is possible for any non-generic data types
Note
complex values (structures, internal tables).
Example
Creates a suitable initial structure for a non-optional input parameter
of a method. CLASS c1 DEFINITION.
PUBLIC SECTION.
TYPES: BEGIN OF t_struct,
col1 TYPE i,
col2 TYPE i,
END OF t_struct.
CLASS-METHODS m1 IMPORTING p TYPE t_struct.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD m1.
...
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
c1=>m1( VALUE #( ) ).
Message text extract from SAP system. Copyright SAP SE.
Search for further information about these or an SAP related objects