0% found this document useful (0 votes)
119 views1 page

File Delete Operation

The document describes three method calls - CL_GUI_FRONTEND_SERVICES=>FILE_COPY, CL_CTS_LANGUAGE_FILE_IO=>COPY_FILES_LOCAL, and CL_GUI_FRONTEND_SERVICES=>FILE_DELETE. The first copies files from one location to another. The second copies files locally between directories. The third deletes files if the copy was successful.

Uploaded by

Vilas Chaudhari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views1 page

File Delete Operation

The document describes three method calls - CL_GUI_FRONTEND_SERVICES=>FILE_COPY, CL_CTS_LANGUAGE_FILE_IO=>COPY_FILES_LOCAL, and CL_GUI_FRONTEND_SERVICES=>FILE_DELETE. The first copies files from one location to another. The second copies files locally between directories. The third deletes files if the copy was successful.

Uploaded by

Vilas Chaudhari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

*

* CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_COPY


* EXPORTING
* SOURCE = '\\10.1.25.47\zphy_inv\OBD\ROBD*'
* DESTINATION = P_FNAME5
* OVERWRITE = 'X'
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* WRONG_PARAMETER = 3
* DISK_FULL = 4
* ACCESS_DENIED = 5
* FILE_NOT_FOUND = 6
* DESTINATION_EXISTS = 7
* UNKNOWN_ERROR = 8
* PATH_NOT_FOUND = 9
* DISK_WRITE_PROTECT = 10
* DRIVE_NOT_READY = 11
* NOT_SUPPORTED_BY_GUI = 12
* OTHERS = 13.
*
* CALL METHOD CL_CTS_LANGUAGE_FILE_IO=>COPY_FILES_LOCAL
* EXPORTING
* IM_SOURCE_FILE = '\\10.1.25.47\zphy_inv\OBD\ROBD*'
* IM_SOURCE_DIRECTORY = '\\10.1.25.47\zphy_inv\OBD\'
* IM_TARGET_FILE = '\\10.1.25.47\zphy_inv\OBD\EXECUTED_ROBD\'
* IM_TARGET_DIRECTORY = '\\10.1.25.47\zphy_inv\OBD\EXECUTED_ROBD\'
* IM_OVERWRITE_MODE = 'F'
* EXCEPTIONS
* OPEN_INPUT_FILE_FAILED = 1
* OPEN_OUTPUT_FILE_FAILED = 2
* WRITE_BLOCK_FAILED = 3
* READ_BLOCK_FAILED = 4
* CLOSE_OUTPUT_FILE_FAILED = 5
* OTHERS = 6.
*
* IF SY-SUBRC = 0.
* DATA: RC TYPE I.
* CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
* EXPORTING
* FILENAME = '\\10.1.25.47\zphy_inv\OBD\ROBD*'
* CHANGING
* RC = RC
* EXCEPTIONS
* FILE_DELETE_FAILED = 1
* CNTL_ERROR = 2
* ERROR_NO_GUI = 3
* FILE_NOT_FOUND = 4
* ACCESS_DENIED = 5
* UNKNOWN_ERROR = 6
* NOT_SUPPORTED_BY_GUI = 7
* WRONG_PARAMETER = 8
* OTHERS = 9.
* IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.
*
* ENDIF.

You might also like