Для фона. Сначала нужно считать файл с ФТП. Потом его изменить(добавить данные). Потом удалить с ФТП. И записать новый.
Читаешь файл:
Code:
data l_length type i.
data lt_data type table of raw255.
call function 'FTP_SERVER_TO_R3'
exporting
handle = handle
fname = l_file
importing
blob_length = l_length
tables
blob = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3
others = 4.
Потом удаляешь файл:
Code:
data lt_data type table of text255.
call function 'FTP_COMMAND'
exporting
handle = handle
command = `delete ` && i_path
compress = 'N'
tables
data = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
Потом записываешь новый:
Code:
call function 'FTP_R3_TO_SERVER'
exporting
handle = handle
fname = l_file
blob_length = l_length
tables
blob = lt_data
exceptions
tcpip_error = 1
command_error = 2
data_error = 3
others = 4.