Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

I_OI_SPREADSHEET

Former Member
0 Kudos

Hi

I have declared following variable:

data o type ref to I_OI_SPREADSHEET.

How to instantiate it?

1 ACCEPTED SOLUTION

Former Member
3 REPLIES 3

Former Member
0 Kudos

Hi,

Create object o.

Regards,

Darren

Former Member
0 Kudos

Hi,

You need to use CREATE OBJECT o.

Check the below simplest example to know how it works


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. 

Cheers,

Kothand

Former Member