Application Development 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: 

Does cl_gui_html_viewer not release file handles ?

former_member182550
Active Contributor
0 Kudos

Hi,

I'm working an an application whereby the user can specify a PDF file which is then subsequently loaded into the DMS. If it is loaded into the DMS it is then deleted from the users hard disc.

I thought that using the Close_Document method of the HTML viewer would enable me to delete the source document but it doesn't. In the majority of cases the following works:

Me->_Pdf->Close_Document( ).
 Me->_Pdf->Free( ).
 Free: Me->_Pdf.
 cl_Gui_Cfw=>Flush( ).

However, at odd times (and I can't seem to figure out what is different), the cl_gui_FrontEnd_Services=>File_Delete() method raises an access denied exception. (which was what it was doing initially).

If you then attempt to rename or move the directory in which the PDF resides in Windows using File Explorer you get a file in use error.

If you exit your abap application, and try again you get the same error and in fact you can only move the directory when you close the Sap Logon Pad.

Has any one else encountered this ? Is there a problem with the SAP Gui releasing file handles ? How did you get round it ?

Thanks and regards,

Rich

0 REPLIES 0