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: 

Standard document interface is not available

Former Member

Hi All,

I am using the method "get_spreadsheet_interface" from class "i_oi_document_proxy" to get the interface from an 2007 Excel File with multiple worksheets. I have successfully opened the file using "open_document" but when I execute the "get_spreadsheet_interface" I got the error "Standard Document Interface is not available". My gui is 710 and the patch level is 21. I would like to ask is there any additional plugin which I have to install?

Thanks.

4 REPLIES 4

madhu_vadlamani
Active Contributor
0 Kudos

Hi Jamison,

Can you paste the code.

Regards,

Madhu.

0 Kudos

Hi Madhu, I got stuck at the get_document_interface... thanks

DATA:

oref_container TYPE REF TO cl_gui_custom_container,

iref_control TYPE REF TO i_oi_container_control,

iref_document TYPE REF TO i_oi_document_proxy,

iref_spreadsheet TYPE REF TO i_oi_spreadsheet,

iref_error TYPE REF TO i_oi_error.

DATA:

v_document_url TYPE c LENGTH 256,

i_sheets TYPE soi_sheets_table,

wa_sheets TYPE soi_sheets,

i_data TYPE soi_generic_table,

wa_data TYPE soi_generic_item,

i_ranges TYPE soi_range_list,

AVAILABLE TYPE I.

PARAMETERS:

p_file TYPE localfile OBLIGATORY,

p_rows TYPE i DEFAULT 100 OBLIGATORY, "Rows (Maximum 65536)

p_cols TYPE i DEFAULT 10 OBLIGATORY. "Columns (Maximum 256)

INITIALIZATION.

CALL METHOD c_oi_container_control_creator=>get_container_control

IMPORTING

control = iref_control

error = iref_error

  • retcode =

.

IF iref_error->has_failed = 'X'.

CALL METHOD iref_error->raise_message

EXPORTING

type = 'E'.

ENDIF.

CREATE OBJECT oref_container

EXPORTING

  • parent =

container_name = 'CONT'

  • style =

  • lifetime = lifetime_default

  • repid =

  • dynnr =

  • no_autodef_progid_dynnr =

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

OTHERS = 6.

IF sy-subrc <> 0.

MESSAGE e001(00) WITH 'Error while creating container'.

ENDIF.

CALL METHOD iref_control->init_control

EXPORTING

  • dynpro_nr = SY-DYNNR

  • gui_container = ' '

inplace_enabled = 'X'

  • inplace_mode = 0

  • inplace_resize_documents = ' '

  • inplace_scroll_documents = ' '

  • inplace_show_toolbars = 'X'

  • no_flush = ' '

  • parent_id = cl_gui_cfw=>dynpro_0

r3_application_name = 'EXCEL CONTAINER'

  • register_on_close_event = ' '

  • register_on_custom_event = ' '

  • rep_id = SY-REPID

  • shell_style = 1384185856

parent = oref_container

  • name =

  • autoalign = 'x'

IMPORTING

error = iref_error

  • retcode =

EXCEPTIONS

javabeannotsupported = 1

OTHERS = 2

.

IF iref_error->has_failed = 'X'.

CALL METHOD iref_error->raise_message

EXPORTING

type = 'E'.

ENDIF.

CALL METHOD iref_control->get_document_proxy

EXPORTING

  • document_format = 'NATIVE'

document_type = soi_doctype_excel_sheet

  • no_flush = ' '

  • register_container = ' '

IMPORTING

document_proxy = iref_document

error = iref_error

  • retcode =

.

IF iref_error->has_failed = 'X'.

CALL METHOD iref_error->raise_message

EXPORTING

type = 'E'.

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  • To provide F4 help for the file

PERFORM sub_file_f4.

START-OF-SELECTION.

CONCATENATE 'FILE://' p_file INTO v_document_url.

CALL METHOD iref_document->open_document

EXPORTING

document_title = 'Excel'

document_url = v_document_url

  • no_flush = ' '

open_inplace = 'X'

  • open_readonly = ' '

  • protect_document = ' '

  • onsave_macro = ' '

  • startup_macro = ''

  • user_info =

IMPORTING

error = iref_error

  • retcode =

.

IF iref_error->has_failed = 'X'.

CALL METHOD iref_error->raise_message

EXPORTING

type = 'I'.

LEAVE LIST-PROCESSING.

ENDIF.

CALL METHOD iref_document->get_spreadsheet_interface

EXPORTING

no_flush = ' '

IMPORTING

error = iref_error

sheet_interface = iref_spreadsheet

  • retcode =

.

IF iref_error->has_failed = 'X'.

CALL METHOD iref_error->raise_message

EXPORTING

type = 'I'.

LEAVE LIST-PROCESSING.

ENDIF.

0 Kudos

Hi Jamison,

Where you called this sub routine PERFORM sub_file_f4..Get the ERROR,RETCODE and see.

Regards,

Madhu.

Edited by: madhurao123 on Jan 2, 2012 7:34 AM

former_member199670
Participant
0 Kudos

Hi Jamison,


Did you find the solution for this ?

If Yes can you please provide the answer.



Thanks

Manimaran K