cancel
Showing results for 
Search instead for 
Did you mean: 

Display MS word file in Office control

Former Member
0 Kudos

Hi all,

I am using the Office control UI element to display a MS word file in WD application. I have created a Mime object for the word file and get this file data into a Xstring attribute, and bind this attribute with the datasource property of the Office control.

But at the runtime I am not able to display the Word file, it displays only a White colour container with text SAP IOS. Can anyone suggest me how I can get the word file in WD component using office control.

I have also checked SOIS pakage, but didn't get any solution from the example given in this package.

For your reference I am using the below code to get the mime object in Xstring attribute.

DATA:

mime_repository TYPE REF TO if_mr_api,

content TYPE xstring,

url TYPE string VALUE '/SAP/BC/WEBDYNPRO/SAP/ZTEST_SAN5/TEST.docx'.

mime_repository = cl_mime_repository_api=>get_api( ).

CALL METHOD mime_repository->get

EXPORTING

i_url = url

IMPORTING

e_content = content.

DATA lo_nd_office TYPE REF TO if_wd_context_node.

DATA lo_el_office TYPE REF TO if_wd_context_element.

DATA ls_office TYPE wd_this->element_office.

DATA lv_test TYPE wd_this->element_office-test.

  • navigate from <CONTEXT> to <OFFICE> via lead selection

lo_nd_office = wd_context->get_child_node( name = wd_this->wdctx_office ).

  • get element via lead selection

lo_el_office = lo_nd_office->get_element( ).

lv_test = content.

  • Set single attribute

lo_el_office->set_attribute(

EXPORTING

name = `TEST`

value = lv_test ).

This lv_test having the Xstring data after execution but didn't set this data as word file at runtime.

Please suggest if anyone have any idea on this.

Thanks

Sanket

View Entire Topic
arne_husemann
Explorer
0 Kudos

Hi,

I am experiencing some strange behavior on my system as well. In SAP Note [846952|https://websmp230.sap-ag.de/sap%28bD1kZSZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=846952] the process to remove the underlying ACF-Components is decribed.

I gave it a try and the next call of a SIOS-Application works with the freshly installed ACF-Components. However a simple refresh of the page breaks the Office Control again.

Regards, Arne

Former Member
0 Kudos

I have also activaed the activeX controls plugins but problem still the same.

Former Member
0 Kudos

hi,

also pl check your office version is supported by sap or not ..

check this SAP NOTE :722513 , 1016683

Best Regards,

Kranthikumar Palle