
CLASS zfh_class DEFINITION
PUBLIC FINAL.
PUBLIC SECTION.
DATA: order type i,
value type string,
inner type ref to zfh_inner_class.
METHODS constructor
IMPORTING
order TYPE i
value type string.
ENDCLASS.
CLASS zfh_class IMPLEMENTATION.
METHOD constructor.
me->order = order.
me->value = value.
me->inner = NEW zfh_inner_class( order = order + 10 value = value && `DEF` ).
ENDMETHOD.
ENDCLASS.
CLASS zfh_inner_class DEFINITION
PUBLIC FINAL.
PUBLIC SECTION.
DATA: order type i,
value type string.
METHODS constructor
IMPORTING
order TYPE i
value type string.
ENDCLASS.
CLASS zfh_inner_class IMPLEMENTATION.
METHOD constructor.
me->order = order.
me->value = value.
ENDMETHOD.
ENDCLASS.
TYPES: tt_classes TYPE STANDARD TABLE OF REF TO zfh_class.
DATA: classes TYPE tt_classes.
DO 10 TIMES.
APPEND NEW #( order = sy-tabix value = `ABC` ) TO classes.
ENDDO.
It's in here somewhere...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |