*&---------------------------------------------------------------------*
*& Report YSAP_CLASS_FIELD_SYMBOLS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ysap_class_field_symbols.
FIELD-SYMBOLS: <fs> TYPE ANY.
*----------------------------------------------------------------------*
* CLASS class1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS class1 DEFINITION.
PUBLIC SECTION.
DATA: inum TYPE i VALUE 5.
CLASS-DATA: onum TYPE i VALUE 10.
ENDCLASS. "class1 DEFINITION
*----------------------------------------------------------------------*
* CLASS class1 IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS class1 IMPLEMENTATION.
ENDCLASS. "class1 IMPLEMENTATION
START-OF-SELECTION.
DATA: obj1 TYPE REF TO class1.
CREATE OBJECT obj1.
ASSIGN obj1->inum TO <fs>.
WRITE: <fs>.
ASSIGN obj1->onum TO <fs>.
WRITE: <fs>.
ASSIGN: class1=>onum TO <fs>.
WRITE: <fs>.
Output:
*& Report YSAP_CLASS_FIELD_SYMBOLS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ysap_class_field_symbols.
FIELD-SYMBOLS: <fs> TYPE ANY.
*----------------------------------------------------------------------*
* CLASS class1 DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS class1 DEFINITION.
PUBLIC SECTION.
DATA: inum TYPE i VALUE 5.
CLASS-DATA: onum TYPE i VALUE 10.
ENDCLASS. "class1 DEFINITION
*----------------------------------------------------------------------*
* CLASS class1 IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS class1 IMPLEMENTATION.
ENDCLASS. "class1 IMPLEMENTATION
START-OF-SELECTION.
DATA: obj1 TYPE REF TO class1.
CREATE OBJECT obj1.
ASSIGN obj1->inum TO <fs>.
WRITE: <fs>.
ASSIGN obj1->onum TO <fs>.
WRITE: <fs>.
ASSIGN: class1=>onum TO <fs>.
WRITE: <fs>.
Output:
No comments:
Post a Comment