cancel
Showing results for 
Search instead for 
Did you mean: 

upload PDF to DMS using FTP server in WD abap

Former Member
0 Kudos

Hi Friends,

I want to upload PDF file from presentation server to DMS. As I dont want application server in this regards , so am using FTP server instead. But the problem am facing is in WD abap the filepath is in XSTRING format. So how to upload Xstring pdf file in FTP server and how can i pull the same data to DMS server.

My problem is just how to upload PDF in FTP server using web dynpro abap. The FM 'BAPI_DOCUMENT_CREATE2' will upload the same PDF file from FTP to DMS server.

Regards,

Santosh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Santosh,

Are you using FILE UPLOAD UI Element or not?

Please go through this.. it might helps

/people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view

Cheers,

Kris.

Edited by: kissnas on May 3, 2011 7:15 AM

Former Member
0 Kudos

Hi kissnas ,

Thanks for your reply .Yes am using FILE UPLOAD UI ,but either of the link wont work as I am using FTP server and i dont want to use application server here.

I just want to know how can i transfer XSTRING data from File Upload UI to my FTP server.I dont want to use DATASET here in this case.

Regards,

Santosh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I just want to know how can i transfer XSTRING data from File Upload UI to my FTP server.I dont want to use DATASET here in this case.

Not really a web dynpro related question, but why not use the SAPFTP function modules - SFTP function group. Just be sure to use the SFTPA destination as you want the FTP to happen relative to the application server and not the SAPGUI.

Former Member
0 Kudos

Hi Thomas,

Thanks for the reply.My requirement is very simple I want to transfer PDF file from desktop to DMS server . I know this can be done by using application server.But client doesn't want to give authorisation to application server.So the only option left is FTP server.

Can you provide with a sample code on how to convert Xstring data that comes from FILEUPLOAD UI element so that PDF gets uploaded in FTP server and also how to fetch the same PDF file into DMS server.Here i dont want to use application server at all.

Regards,

Santosh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Here i dont want to use application server at all.

Did you study the above mentioned SFTP function modules (and sample programs in the same package)? That allow you to transfer data in ABAP memory to a remote FTP site. It doesn't require that your users have access to the application server file system at all.

Former Member
0 Kudos

Yes I have been with these Function Modules but couldnt find any FM that Converts Xstring PDF file to FTP server .

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes I have been with these Function Modules but couldnt find any FM that Converts Xstring PDF file to FTP server .

Use function module FTP_R3_TO_SERVER. The tables parameter BLOB is how you pass in the PDF content. It doesn't take an XSTRING, but instead a binary table. You can convert this pretty easily. For instance you might use the class CL_BCS_CONVERT and method XSTRING_TO_SOLIX.

For an example of how to use FTP_R3_TO_SERVER, see program RSFTP004.

Former Member
0 Kudos

Thanks Thomas I will try coding as you said. But can you explain how to take PDF file from FTP server to DMS server.

This will be very useful to me.

Regards,

Santosh