Skip to end of metadata
Go to start of metadata

GUI_DELETE_FILE

Give the path of the file to be deleted as the value of FILE_PATH. The file path can also be obtained using the file browser using the function module 'KD_GET_FILENAME_ON_F4 '.

DATA : file type RLGRAP-FILENAME value 'C:\test.txt'.
CALL FUNCTION 'GUI_DELETE_FILE'
  EXPORTING
    FILE_NAME       = file
 EXCEPTIONS
   FAILED          = 1
   OTHERS          = 2
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

  • No labels