Ansicht
Dokumentation

ABAPDATA_REF_TO_INCLUDE - DATA REF TO INCLUDE

ABAPDATA_REF_TO_INCLUDE - DATA REF TO INCLUDE

Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Effect

Data object f is declared as reference variable within ABAP objects. cif is a class or an interface. Reference variables contain references (pointers) to objects.

Reference variables whose types are defined with reference to a class can contain references to objects of this class. Reference variables whose types are defined with reference to an intterface can contain references to objects whose class implements the interface.

Note

Objects, i.e.instances of classes, are only addressed with their reference variables. To create objects see CREATE OBJECT.

Example

INTERFACE i1.
  METHODS m1.
ENDINTERFACE.

CLASS c1 DEFINITION.
  PUBLIC SECTION.
    INTERFACES i1.
ENDCLASS.

CLASS c1 IMPLEMENTATION.
  METHOD i1~m1.
    ...
  ENDMETHOD.
ENDCLASS.

DATA: o1 TYPE REF TO c1,
      o2 TYPE REF TO c1,
      ir TYPE REF TO i1.

START-OF-SELECTION.

CREATE OBJECT o1.

o2 = o1.
ir = o1.

Additional help

Handling of Objects






General Material Data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 1907 Date: 20240616 Time: 115839     sap01-206 ( 30 ms )