Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

File Transfer Through FTP

Former Member
0 Likes
999

Hi gurus,

I have created the pdf from the smartform output.

That I have to sent to remote system, for that i am using FTP.

I have done all the coding for FTP Connection, but i have the doubt of how to put the pdf data into the file that i am passing

through FTP. I am generating the file in the remote system, with some naming rule.

I am using function module FTP_R3_TO_SERVER

thanks,

man

4 REPLIES 4
Read only

andreas_mann3
Active Contributor
0 Likes
767

use sample program RSFTP004.

hope that helps

Andreas

Read only

Former Member
0 Likes
767

Hi ,

see the WIKI http://wiki.sdn.sap.com/wiki/display/ABAP/WorkingwithFTP+Server

after Getting the PDF data into internal table write into Application server..

then given the source path = application server.

and give Destiantion path = FTP path

and call the below commands in between the FTP_OPEN and FTP_CLOSE see the sample code as above blog.



w_command = "bin'.

* Navigate to source directory
  CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
  CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
      handle        = w_handle
      command       = w_command
    TABLES
      data          = ftp_session.

* Navigate to destination directory
  CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
  CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
      handle        = w_handle
      command       = w_command
    TABLES
      data          = ftp_session.

* Transfer file
  CONCATENATE 'put' file INTO w_command SEPARATED BY space.
  CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
      handle        = w_handle
      command       = w_command
    TABLES
      data          = ftp_session.


Prabhudas

Read only

0 Likes
767

Dear Guru,

I am able to send file through ftp to destination folder, but that file dont have any data...

What iam doing is convert the smartform output to pdf through FM Convert_otf.. and then using ftp

FTP_R3_TO_SERVER to transfer it to ftp server. but destination file has not got any data...

in fm

FTP_R3_TO_SERVER..

TABLES

BLOB = pdf_itab

In pdf_itab which internal table i have to pass, which i have defined in CONVERT_OTF.

Read only

0 Likes
767

Just debug and see whether, there is data after smartform conversion to PDF.