Get Example source ABAP code based on a different SAP table
ARTICLE
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.