Skip to Content
0
Feb 17, 2011 at 11:14 AM

Using FTPS in ABAP without SAP PI

671 Views

Hello,

I have a requirement to create a file in an external server using FTPS and ABAP but we don't use SAP PI. My question is simple, is it possible?

If it's possible, do the following FM work?

call function 'HTTP_SCRAMBLE'
  exporting
    source      = lv_pwd
    sourcelen   = lv_pwd_len
    key         = lv_key
  importing
    destination = lv_pwd.


call function 'FTP_CONNECT'
  exporting
    user            = lv_user
    password        = lv_pwd
    host            = lv_host
    rfc_destination = lv_rfc_dest
  importing
    handle          = lv_handle
  exceptions
    not_connected   = 1
    others          = 2.
if sy-subrc ne 0.
  message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  exit.
endif.


call function 'FTP_R3_TO_SERVER'
  exporting
    handle         = lv_handle
    fname          = lv_filename
    character_mode = 'X'
  tables
    text           = lt_text
  exceptions
    tcpip_error    = 1
    command_error  = 2
    data_error     = 3
    others         = 4.
if sy-subrc ne 0.
  message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  exit.
endif.


call function 'FTP_DISCONNECT'
  exporting
    handle = lv_handle.

Regards,

Mário Espinheira