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

FTP pdf data unix server using SAPFTP

Former Member
0 Likes
946

Hi, I am struggling to ftp a pdf file to a unix server. The pdf has been created via smarforms and fm CONVERT_OTF_2_PDF. This gives me the file in TLINE type table. I have tried following things:

- Ftp the internal table to unix as i get from the above fm. Result: Empty file received on the other end

- Coverted the internal table to xstring and then into binary before ftp'ing. Result: pdf file received but corrupt.

- Converted internal table data to binary using "SCMS_TEXT_TO_BINARY" and then ftp. Result: Unknow data format received on the other end.

I'll appreciate any suggestions, answers or advise.

Thanks.

Hi, I am struggling to ftp a pdf file to a unix server. The pdf has been created via smarforms and fm CONVERT_OTF_2_PDF. This gives me the file in TLINE type table. I have tried following things:

- Ftp the internal table to unix as i get from the above fm. Result: Empty file received on the other end

- Coverted the internal table to xstring and then into binary before ftp'ing. Result: pdf file received but corrupt.

- Converted internal table data to binary using "SCMS_TEXT_TO_BINARY" and then ftp. Result: Unknow data format received on the other end.

I'll appreciate any suggestions, answers or advise.

Thanks.

5 REPLIES 5
Read only

Former Member
0 Likes
881

Hi ,

use the FM FTP_SERVER_TO_R3.

for this purpose.

go through this link

http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPsolutiontoimplementFTP+transactions

cheers

S.Janagar

Read only

0 Likes
881

Yes, this is what I am using to ftp. My problem is that data from internal table is not getting to its destination in correct pdf format. FM CONVERT_OTF_2_PDF provides the pdf data in a TLINE type internal table. I am trying to get this internal table to a unix server using the fm FTP_R3_TO_SERVER. But in what format should i covert this data to be able to send it as pdf on the other end.

Thanks for your reply, though.

Read only

0 Likes
881

Answer is: Use fm convert_otf instead of covert_otf_2_pdf. Convert xstring to binary, ftp and you are flying!

Cheers.

Read only

0 Likes
881

Are you transfering in binary or in text mode? In textmode the data will be corrupted because the date is interpreted as control characters oder unicode translations are taking into account. Check the export parameter character_mode.

Read only

0 Likes
881

Hi

  I have done the same.

  CONVERT_OTF -> SCMS_XSTRING_TO_BINARY

And passing the binary table to FTP_R3_TO_SERVER.

But still i am getting the content in pdf file as scrambled characters.

Am I missing any step?

Regards

Neelima