Application Development and Automation 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: 
Read only

I_OI_SPREADSHEET

Former Member
0 Likes
478

HI

I have declared following variable:

data o type ref to I_OI_SPREADSHEET.

How to instantiate it?

1 ACCEPTED SOLUTION
Read only

karsten_korte
Participant
0 Likes
414

I_OI_SPREADSHEET is an interface and you can't instantiate interfaces.

You can only create an instance of a class that implements this interface and assign this instance to your variable. Or you ask another class for an instance, e.g.:


CL_GUI_ALV_GRID_BASE->CREATE_VIEW_OI
...
      CALL METHOD m_oi_proxy->get_spreadsheet_interface
                  IMPORTING sheet_interface = m_oi_spreadsheet.
...

regards, Karsten

1 REPLY 1
Read only

karsten_korte
Participant
0 Likes
415

I_OI_SPREADSHEET is an interface and you can't instantiate interfaces.

You can only create an instance of a class that implements this interface and assign this instance to your variable. Or you ask another class for an instance, e.g.:


CL_GUI_ALV_GRID_BASE->CREATE_VIEW_OI
...
      CALL METHOD m_oi_proxy->get_spreadsheet_interface
                  IMPORTING sheet_interface = m_oi_spreadsheet.
...

regards, Karsten