cancel
Showing results for 
Search instead for 
Did you mean: 

Upload Mime and Doc

Former Member
0 Kudos

Hello All,

I have 3 requirements.

1. I want to upload a Document (doc/xls/pdf) through a Web Dynpro Interface. I understand there is a UI named FileUpload, which returns the file data as xstring. What are the possible ways, I can store this in SAP for later retrieval?

2. How can I provide this data back to the user for the user to view? Can I provide a preview of the document in the Web Dynpro interface itself?

3. I want to upload an image using Web Dynpro Interface (not through SE80 into Mimes folder of the Component at design time, but at runtime, using the WDA application) and store it somewhere and then display it in another view. How to achieve this?

Regards

Gladson Jacob

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

>

> Hello All,

>

> I have 3 requirements.

> 1. I want to upload a Document (doc/xls/pdf) through a Web Dynpro Interface. I understand there is a UI named FileUpload, which returns the file data as xstring. What are the possible ways, I can store this in SAP for later retrieval?

> 2. How can I provide this data back to the user for the user to view? Can I provide a preview of the document in the Web Dynpro interface itself?

> 3. I want to upload an image using Web Dynpro Interface (not through SE80 into Mimes folder of the Component at design time, but at runtime, using the WDA application) and store it somewhere and then display it in another view. How to achieve this?

>

> Regards

> Gladson Jacob

1. Using the fileupload you have the content in the memory from client to server, it is up to you to use BDS or any other repository to store.

2.You get the data as XSTRING from FileUpload, store it in a context attribute of type XSTRING. Using Office control UI you can bind the property dataSource to this attribute. For PDF you have to use interactive forms.

3. Again same procedure.. you have CL_MIME_REPOSITORY_API.However If the image is on a remote URL, then you would have to use the CL_HTTP_CLIENT class for ABAP to act as a web browser and request the content from the remote URL.

Former Member
0 Kudos

Thank you, Baskaran.

But,

1. Can you please throw some light on "BDS or any other repository to store"?

2. I do not have to immediately display the file, but at a later time, when it is required to be viewed. How to bring it to the context?

3. The image has to be uploaded to the same server and fetched back, to be shown in the same application. How?

Former Member
0 Kudos

Someone, please help...

Former Member
0 Kudos

Go to the package WDA from se80. There you shall get a package called WDA_DEMO or similar name. You shall get all the scenario what ever you required. 1 and 2 demo application you will get in SALV package SALV_DEMO package also.

-Pradip

Former Member
0 Kudos

>

> Thank you, Baskaran.

>

> But,

> 1. Can you please throw some light on "BDS or any other repository to store"?

> 2. I do not have to immediately display the file, but at a later time, when it is required to be viewed. How to bring it to the context?

> 3. The image has to be uploaded to the same server and fetched back, to be shown in the same application. How?

Hi Gladson,

1.What i know is that there are lots of information available SCN about this. Just do a search on BDS . see th link here [https://cw.sdn.sap.com/cw/docs/DOC-43894|https://cw.sdn.sap.com/cw/docs/DOC-43894]

Also search for WDA and BDS.

2.If you store your content in a context node attribute of type xstring, you can later you to integrate with Office UI or Interactive form.

3. See th mime repository api class, it provides methods for you to do.

For examples..see also SIOS package in your system.