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

OLE error during upgrade

Former Member
0 Likes
1,236

Hello,

Our SAP system is upgraded from 4.6C to ECC6.0. OLE output in word is coming perfectly in 4.6C but not in ECC6.0. we get the word file in ECC6.0 but the table formats are missing. How should we handle this?.

Thanks.

Hello,

Our SAP system is upgraded from 4.6C to ECC6.0. OLE output in word is coming perfectly in 4.6C but not in ECC6.0. we get the word file in ECC6.0 but the table formats are missing. How should we handle this?.

Thanks.

7 REPLIES 7
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,127

Hi Jk,

you didn't give enough details. OLE is on the frontend side so I don't understand why a SAP upgrade would make it fail. Did you check SAP notes?

Sandra

Read only

0 Likes
1,127

Hi Sandra,

OLE is in the front end side, but we are not getting the correct output . I was not able to get any OSS notes too. Even in 4.6C we get the proper word output with table structure in WindowsXP but when the same is executed in Windows7 we get the word output but the table macros are not executed correctly. The same happens in ECC6.0. Is it the problem with SOLE application or Windows application or Microsoft Word? Please guide with some solution..

Regards,

Jk

Read only

0 Likes
1,127

Hi Jk,

So it's clear the issue is from the OLE commands, which seem to be not compatible with Word. Which version of Word is it in XP and 7?

You can debug the CALL METHOD, SET PROPERTY, etc., to see which one returns an error, i.e. SY-SUBRC is different from zero (note: sy-subrc can be tested only if there is not NO FLUSH in the OLE statements). There is also an OLE trace that you can activate on the SAPGUI (Alt+F12, Options, Trace, Automation).

Sandra

Read only

0 Likes
1,127

Hi Sandra,

In both WindowsXP and Windows 7, we are using Word 2007.

The below call methods return sy-subrc as 2.

CALL METHOD OF wordobj 'FontSize'

CALL METHOD OF wordobj 'InsertPara'.

CALL METHOD OF wordobj 'ToolsMacro'

CALL METHOD OF wordobj 'NextCell'.

Jk

Read only

0 Likes
1,127

Hi Jk,

So these methods do not work for "wordobj", how is it instantiated?

Sandra

Read only

0 Likes
1,127

Hi Sandra,

OLE application WORD.BASIC is used.

CREATE OBJECT wordobj 'WORD.BASIC' .

Jk

Read only

0 Likes
1,127

I don't understand how it can work on any Word version, "fontsize" is not a method of Word application! I think you should record a Word macro to simulate what you want to achieve, and compare the generated VBA code with what is in your program.