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

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (1)

Answers (1)

arne_husemann
Explorer
0 Kudos

Hi,

have you made sure that the Office Control is working at all? Tere are some demo applications using Office Controll in Package SIOS. If you experience similar problems with the demo application there is something wrong at a lowel level. Possible error causing points are the security settings in Internet Explorer.

Regards, Arne

Former Member
0 Kudos

Hi Arne,

I am having the same problem with the demo applications as well. Do you suggest me what is wrong at lower level. Also suggest me what type of internet security setting will stop me to do this.

arne_husemann
Explorer
0 Kudos

Hi,

there is a SAP Note [766191|https://service.sap.com/sap/support/notes/766191] on this topic.

You find the required security settings along with some further information in there.

Regards, Arne

Former Member
0 Kudos

Hi Arne,

Can you advice me the SAP note number.

Former Member
0 Kudos

hi

have you activated the ACTIVE X in your browser..???

with out this Office control UI element wont work .

Using the OfficeControl UI Element

To use the OfficeControl, you need the following:

● Installation of Microsoft Office

For more information about the Office versions supported by SAP, see SAP Note 722513.

● ActiveX must be activated in the browser.*

Former Member
0 Kudos

Hi Kranthi,

How can we activate the activeX in the browser...

Former Member
0 Kudos

hi,

try this in browser..

tools->internet options->security->custom level

here you will find Active x controls and plugis..

enable all of them and try your applications..

if it is helpful pl give some points buddy:-)

regards,

Kranthi.