‎2008 Jul 23 5:10 AM
Hi,
I am using the FM GUI_DELETE_FILE for deleteing a file on Presentation Server. Although the FM successfully deletes a file, still it throws an Error always, i.e sy-subrc is never zero.
Can someone help me with the problem?
Thanks,
Sachin.
‎2008 Jul 23 5:16 AM
Hi,
Check your sy-subrc value and handel the exception explicitly.
regards,
Anirban
‎2008 Jul 23 5:16 AM
Hi,
Check your sy-subrc value and handel the exception explicitly.
regards,
Anirban
‎2008 Jul 23 5:20 AM
Please use class CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
as GUI_DELETE_FILE is obsolate
‎2008 Jul 23 5:24 AM
Hi Anirban,
I have already handled the exception explicitly. The sy-subrc is always 1 and though the program continues to execute properly, I am unable to find any explanation for why sy-subrc is 1.
Regards,
Sachin.
‎2008 Jul 23 5:50 AM
Hi,
did it using CL_GUI_FRONTEND_SERVICES=>FILE_DELETE and it is working fine.
Thanks.
‎2008 Jul 23 5:58 AM
Hi,
Before Delete the file check whether file is Exit or not.
Like Below Code
data : existing type c.
call method cl_gui_frontend_services=>file_exist
exporting
file = filename
receiving
result = existing.
if existing is not initial.
Call function 'GUI_DELETE_FILE'.
endif.
If file is not there in yur system 'GUI_DELETE_FILE' not
excute.
Now this not go to DUMP.
Thanks,
Durai.V
‎2008 Jul 23 5:21 AM
Check the value of sy-subrc and compare this value with that of the exception value. This way you should be able to know what the error is exactly.
Accordingly take the appropriate action.
Hope this helps!!!
Regards,
Lalit