A file on the application server can be renamed by ABAP
(check with AL11). For this and other file commands the class
CL_ISH_AT_EDI_FILETRANSFER is useful.
sample code:
DATA: lo_edi TYPE REF TO cl_ish_at_edi_filetransfer,
ls_exppath TYPE rnwat_edi_filcom.
ls_exppath-exppathtype = 'S'.
ls_exppath-exppath = '/ usr/sap/GLD/DVEBMGS00/work /'.
CREATE OBJECT lo_edi
EXPORTING
is_exppath = ls_exppath.
CALL METHOD lo_edi-> rename_file
EXPORTING
i_filename_src = 'altes_file.xml'
i_filename_dest = 'neues_file.doc'
EXCEPTIONS
error_renaming_file
= 1 OTHERS = 2
IF sy-subrc \u0026lt;> 0 MESSAGE ID sy-msgid
TYPE NUMBER sy-sy-msgty msgno
msgv1 WITH sy-sy-sy-msgv2 msgv3 sy-MSGV4.
ELSE.
WRITE: / 'File successfully renamed. "
ENDIF.