cancel
Showing results for 
Search instead for 
Did you mean: 

PDF uploaded into webdynpro application successfully, but unable to open it

Former Member
0 Kudos

Dear colleagues,

We have developed a webdynpro appllication in which there is a functionality to add attachments from our local file to the WD applicaiton and save it. Now the error is that we are able to upload the attachmnets successfully and save it, but when we try to view the file which we upload from the WD application, it gives error message and we are unable to view it. For example, I have PDF form which was uploaded successfully into the WD application and save it. Later when I try to open the PDF form to view it(from the WD application), the adobe reader is opened, but gives error message 'There was an error opening this document. The file is damaged and could not be repaired' and we could not view the contents of the file. Please help me in this regard.

Note: The PDF file has no errors before uploading into the WD application. Similar kind of error is shown for other file formats also - like *.docx, *.xlsx, *.pdf, *.docm, *.ppt, *.pptx etc.

Please suggest us how to overcome this error.

Thanks in advance.

Regards,

Vijay

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Two things :

1. Where are you saving the file?

2. What is the datatype of the data field ?

This will really help us. Also,post the code which you used to view the file.

Warm regards,

Upendra Agrawal

Gowtham
Contributor
0 Kudos

Hi Vijay,

Check the standard web dynpro example for displaying a pdf. " WDR_TEST_ADOBE_PDF_ONLY "

Former Member
0 Kudos

Hi Vijay,

I too had a same requirement.I used FILE UPLOAD UI Element to upload PDF file and for Dowload FILE DOWNLOAD UI Element .If u want to view the PDF file in the Web Dynpro View you can use INTERACTIVE FORM UI Element.

Regards,

Naga

Lukas_Weigelt
Active Contributor
0 Kudos

In case you use the File Download UI-Element, make sure the MIME-Type is set to 'PDF'.

regards, Lukas

vishesh_malik
Participant
0 Kudos

Hi Vijay,

Can u post the code which you are using to upload and download file. Also, please make sure that 'Behaviour' property of file download UI element should be 'OpenIn Place' .

Thanks,

Vishesh

ChandraMahajan
Active Contributor
0 Kudos

Hi Vijay,

are you using business document service to upload the file? There are BAPIs available to save and read the business documents. we used the same concept in our WDA to save and read the attachements to equipment master ie use can see the attachment in IE03 created via WD application and from another WDA, user can read it.

provide more info about ur application.

Thanks,

Chandra