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

Delete a file on PC from ABAP program

Former Member
0 Likes
2,668

Hello guys

I want to know if there is any FM for deleting a file on PC.

thank you

vj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,441

You can use Function Module "GUI_DELETE_FILE". There is one issue with this function module, whether successful or not the function module raises the error condition.

Thanks

Jerrod

Hello guys

I want to know if there is any FM for deleting a file on PC.

thank you

vj

4 REPLIES 4
Read only

Former Member
0 Likes
1,442

You can use Function Module "GUI_DELETE_FILE". There is one issue with this function module, whether successful or not the function module raises the error condition.

Thanks

Jerrod

Read only

0 Likes
1,441

Hi,

You can also use the FILE_DELETE method of the class CL_GUI_FRONTEND_SERVICES.

Regards,

Suresh Datti

Read only

0 Likes
1,441

Thank you guys

vj

Read only

Former Member
0 Likes
1,441

Hi,

If you are in ECC 5.0, please try this FM <b>UBC_FILE_DELETE</b>.

or you can use


CALL METHOD cl_gui_frontend_services=>file_delete
    EXPORTING
      filename           = l_filename
    CHANGING
      rc                 = l_rc
    EXCEPTIONS
      file_delete_failed = 1
      cntl_error         = 2
      OTHERS             = 3.

Hope this will help.

Regards,

Ferry Lianto