cancel
Showing results for 
Search instead for 
Did you mean: 

DMS Document not getting created thru Webdynpro ABAP Strange Problem

Former Member
0 Kudos

Dear all,

My requirement is that I have a Webdynpro ABAP application sitting on SAP Server1 and I am having a FileUploadUI Element in there for uploading files and we have SAP Server2 with the DMS configured. So, what we have done is we have an RFC in SAP Server2 and we are calling it from our webdynpro ABAP application sitting on SAP Server1. And we are calling BAPI_Create2 with all the necessary parameters in this RFC to create the DMS document with the file from webdynpro ABAP application. But its not working. I am passing the Presentation Server File Path of the File to the BAPI_create2.Even if I write the file to the application server of SAP Server2 and then pass this file path to the BAPI_Create2 then also it doesn't work but when I execute this RFC locally in the SAP Server2 with the presentation server file path It executes successfully.

I don't know what I am missing.

Please help.

Thanks and regards,

--Sonal

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can't pass the presentation server file path to the RFC. During RFC from within WDA there is of course no connection to a SAPGUI or the presenattion server. If the file is on the application server filesystem, then you should be able to use this RFC> However you will have to use the alternative destination parameter. Instead of SAPHTTP (the default value), set SAPHTTPA. This is an RFC destination (which should be setup in SM59) that will call the Application server instead of the presentation server.

Former Member
0 Kudos

Dear Thomas,

Suppose I have got the file copied to the application server in SAP Server2 using datasets from WDA in SAP server1.

Now I have an RFC say ZFILE_UPLOAD in SAP Server2 for which we have made an SAP ABAP RFC Connection from SAP Server1. In this RFC I am calling BAPI_create2 using the application server filepath(of SAP Server2) in docfile parameter along with ur suggested destination then also it doesn't work. Gives an error that "error in storing and checking file" i.e. Error 253.

One more query how to handle the file upload of different file types say I am uploading a pdf file from my webdynpro abap application in SAP server1. Then I get the xstring and pass it to ZFILE_UPLOAD and convert it into binary and write it there in SAP Server2 using datasets. Is it possible to upload any kind of file and then creating the DMS document out of it?

and how to call this RFC?

Thanksn and regards,

--Sonal

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't know how much further I can help you. We are outside of the area of WDA and into the way the particular DMS BAPIs work. I have some experience with the DMS BAPIs (like the knowledge of the SAPHTTPA desintation) that is somewhat related to WDA; but I really can't help you too much further into their usage.

Former Member
0 Kudos

Dear Thomas,

One more query how to handle the file upload of different file types say I am uploading a pdf file from my webdynpro abap application in SAP server1. Then I get the xstring and pass it to ZFILE_UPLOAD and convert it into binary and write it there in SAP Server2 using datasets. Is it possible to upload any kind of file and then creating the DMS document out of it?

and how to call this RFC?

Basically how to upload different files from webdynpro ABAP and store it into DMS?

Thanksn and regards,

--Sonal

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As long as you keep everything in binary format, the file type doesn't matter. With binary formats, you are just moving bytes around.

Former Member
0 Kudos

Thanks Thomas for our valuable inputs.

Got the problem solved by passing the IP Address in the BAPI.

Thanks a ton.

Former Member
0 Kudos

Hi Sonal,

I have the same requirement in my work and I would like to know how you solved this issue? Could you please explain the exact procedure that you followed?