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 Method ...?

Former Member
0 Likes
775

Hi,

We are in the process of upgrade from 4.6C to ECC 6.0. In one of our programs we are calling a method of OLE for Microsoft Word. It is working fine in 4.6C and whereas in ECC 6.0, it is going for a short dump stating that the 'Data objects in unicode programs cannot be converted'. Here i am giving the code.At the highlighted line it is going for a dump.

Please suggest me a good solution for this.

CALL FUNCTION 'REGISTRY_GET'

EXPORTING

key = 'CurVer'

section = 'Word.Basic'

IMPORTING

value = version_str.

SHIFT version_str LEFT BY 11 PLACES.

MOVE version_str TO word_version.

IF word_version < 8.

CREATE OBJECT wordobj 'Word.Basic'.

ELSE.

CREATE OBJECT worddoc 'Word.Document'.

GET PROPERTY OF worddoc 'Application' = wordapp.

SET PROPERTY OF wordapp 'Visible' = 1.

GET PROPERTY OF wordapp 'WordBasic' = wordobj.

<b> CALL METHOD OF wordobj 'FileClose'.</b>

ENDIF.

Hi,

We are in the process of upgrade from 4.6C to ECC 6.0. In one of our programs we are calling a method of OLE for Microsoft Word. It is working fine in 4.6C and whereas in ECC 6.0, it is going for a short dump stating that the 'Data objects in unicode programs cannot be converted'. Here i am giving the code.At the highlighted line it is going for a dump.

Please suggest me a good solution for this.

CALL FUNCTION 'REGISTRY_GET'

EXPORTING

key = 'CurVer'

section = 'Word.Basic'

IMPORTING

value = version_str.

SHIFT version_str LEFT BY 11 PLACES.

MOVE version_str TO word_version.

IF word_version < 8.

CREATE OBJECT wordobj 'Word.Basic'.

ELSE.

CREATE OBJECT worddoc 'Word.Document'.

GET PROPERTY OF worddoc 'Application' = wordapp.

SET PROPERTY OF wordapp 'Visible' = 1.

GET PROPERTY OF wordapp 'WordBasic' = wordobj.

<b> CALL METHOD OF wordobj 'FileClose'.</b>

ENDIF.

2 REPLIES 2
Read only

Former Member
0 Likes
621

Hi,

If you are converting an existing 4.6 program to ECC6.0,

first set the Unicode flag in your attributes.

then activate the program and remove the errors if any.

Then, run tcode: UCCHECK to remove other syntax errors.

If it does not give any error then your program is unicode compliant.

Regards,

Vinoth

Read only

Former Member
0 Likes
621

Hi,

If you are converting an existing 4.6 program to ECC6.0,

first set the Unicode flag in your attributes.

then activate the program and remove the errors if any.

Then, run tcode: UCCHECK to remove other syntax errors.

If it does not give any error then your program is unicode compliant