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 free object error

Former Member
0 Likes
1,090

Hello together,

I read an excel-file with OLE-automation. At the end of my method I release all OLE-objects with  free object, but if I want to release the excel-application object the method returns a error, sy-subrc = 2.

I found this document FREE OBJECT - Application Development on AS ABAP - SAP Library but I can´t see why I get this error.

Has somebody else this problem? or solved it already?

My Code is in the txt-file.

Sincere regards,

Christian

Hello together,

I read an excel-file with OLE-automation. At the end of my method I release all OLE-objects with  free object, but if I want to release the excel-application object the method returns a error, sy-subrc = 2.

I found this document FREE OBJECT - Application Development on AS ABAP - SAP Library but I can´t see why I get this error.

Has somebody else this problem? or solved it already?

My Code is in the txt-file.

Sincere regards,

Christian

3 REPLIES 3
Read only

former_member205488
Active Participant
0 Likes
744

Hello!

I suppose there is a collision because you call method QUIT before FREE OBJECT and the application object is already clear. Try not to call EXCEL.QUIT.

Read only

0 Likes
744

Hello Vadim,

thank you very much for your reply.

I tried your solution, but I still get the same error.

Sincere regards,

Christian

Read only

Former Member
0 Likes
744

This problem has existed for a few weeks , before the code has worked well.


I have no ideas where the error could be.