SAP VALUE CONSTRUCTOR PARAMS INIT SAP Info












ARTICLE ( Version: 0015)

VALUE - Initial Value for All Types

Syntax
... VALUE dtype|#( ) ...


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 dtype. The # symbol can stand for appropriate types.

Note
VALUE with pass by value is used only to construct certain
complex values (date/time values, structures, internal tables). VALUE without pass by value, on the other hand, is a general method for creating type-compliant initial values in any operand positions.

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)

VALUE - Initial Value for All Types

Syntax
... VALUE dtype|#( ) ...


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 dtype. The # symbol can stand for appropriate types.

Note
VALUE with pass by value is used only to construct certain
complex values (structures, internal tables). VALUE without pass by value, on the other hand, is a general method for creating type-compliant initial values in any operand positions.

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



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!