Code: Alles auswählen.
FORM aenderungname.
DATA: pa_file1 like sapb-sappfad.
DATA: pa_filen like sapb-sappfad.
IF pa_file IS NOT INITIAL.
pa_file1 = pa_file.
ELSE.
pa_file1 = regut-dwnam.
ENDIF.
CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER'
EXPORTING
sourcepath = pa_file1
targetpath = pa_filen
EXCEPTIONS
error_file = 1
no_authorization = 2
others = 3.
if sy-subrc eq 0.
ENDIF.
ENDFORM.Code: Alles auswählen.
***
EXPORTING
sourcepath = 'daten/***/test'
targetpath = 'daten/***/test_new'
***Code: Alles auswählen.
pa_file = '/daten/FSE/out/4800_01'.
pa_filen = '/daten/FSE/out/1234800_01'.
CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER'
EXPORTING
sourcepath = pa_file
targetpath = pa_filenCode: Alles auswählen.
FORM aenderungname using iv_source type sapb-sappfad iv_target type sapd-sappfad.
call function 'ARCHIVFILE_SERVER_TO_SERVER'
exporting
sourcepath = lv_source
targetpath = lv_target
exceptions
error_file = 1
no_authorization = 2
others = 99.
if sy-subrc <> 0.
* &1: Unexpected failure &2! Inform the IT department!
message e907 with 'ARCHIVFILE_SERVER_TO_SERVER' sy-subrc.
raise exception type /escher/cx_cancel_log.