cancel
Showing results for 
Search instead for 
Did you mean: 

Display file content in Web Dynpro ABAP

Former Member
0 Kudos

Hello,

we would like to be able to display any file after having uploaded files using FileUpload ui element in a web dynpro abap application.

for microsoft word excel files, the OfficeControl ui element can be used and for pdf documents the InteractiveForm ui element can be used.

for other formats such as '.tif', '.jpg', '.txt'..... we did not find out how to be able to display the file contents

Does anybody know if and how this could be achieved?

Cheers

Ana

Accepted Solutions (0)

Answers (3)

Answers (3)

ChrisPaine
Active Contributor
0 Kudos

The obvious solution is to use a image UI element for the images and a text edit ui element for the text files. Although you'd have to do some work to convert the text file from an xstring into a string (the ways of doing this have been so often documented here I'll not expand on this.)

Can your users upload any kind of file? or will you be restricting them to certain file types? If you are restricting - then I'd go with this solution - it's pretty simple really - certainly simpler than trying to convert image files into a format that could be stored in an RTF doc!

Former Member
0 Kudos

Try to use CL_BDS_DOCUMENT_SET and CL_BDS_DOCUMENT to open the documents directly using the desktop applications.

ChrisPaine
Active Contributor
0 Kudos

Try to use CL_BDS_DOCUMENT_SET and CL_BDS_DOCUMENT

I don't think there is a lot of point using these classes - as in the WDA context you can't run any of the SAP GUI specific functionality which it seems that these classes rely on. You certainly won't be opening the specific applications for the file types.

Former Member
0 Kudos

Chris,

You may be right. Also it requires some configuration in SAP KPro ( document class etc).

Please see SAP [Help |http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf]on Business Document Services.

At page 64 of this document under topic 'Display Documents' 'Feature it says. "If it is not possible to display the document in place, an appropriate viewer that is available on the

PC is started and the document is displayed u201Cout placeu201C

Joseph_BERTHE
Active Contributor
0 Kudos

Hi,

The better way should be to insert your uploaded files into global RTF file. Like that you will be able to watch all kind of document (excepted PDF) using only one control (OfficeControl).

Like this, you will deal with only two controls the Adobe one and Office one.

A workaround would be to use a Image control for pictures.

Regards