‎2010 Sep 16 7:24 AM
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
‎2010 Sep 17 9:45 AM
‎2010 Sep 17 10:10 AM
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
‎2010 Sep 23 11:25 AM
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.
‎2010 Sep 23 11:29 AM
Just debug and see whether, there is data after smartform conversion to PDF.