cancel
Showing results for 
Search instead for 
Did you mean: 

How to Upload and download the image

Former Member
0 Kudos

Hi all,

I am new to webdynpro for abap....

Can anyone tell me how to upload the image and how to down load the same image.

thanks,

viswa

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

You can use the FileUpload UI element in your view. The 'Data' property of the Fileupload UI element can be binded to a context attribute say 'Data' of type XSTRING. Once the user browses for a file you can use a button say 'Upload' in your view, on clicking the button in the view you can read the value of the attribute 'Data'(Which will contain the content of the file) and save it in your table or in the repository.

The filedownload UI element has a OnClick event. Onclick you should read the same file content in XSTRING format from your table/repository and then call the method cl_wd_runtime_services=>attach_file_to_response to save it to disk.

I hope this answers your question.

Best Regards,

Viqar.

Former Member
0 Kudos

hai powerstar,

please check this link it help u lot.

http://www.google.co.in/search?hl=en&q=howtouploadanddownloadpictureinwebdynproabap&meta=&rlz=1R2GGLT_enIN333&aq=f&oq=

Former Member
0 Kudos

HI,

[]

[]

[]

Former Member
0 Kudos

Hi all,

My Requirement is Like This...

*File Upload UI Element (Asks Path For Image)*

Upload(Link to Action)

**Image to be displayed here**

Download(LinktoAction)

***Image to be save in local hard disk ****

Can Anyone tell me how to acheive this......

thanks,

viswa

Former Member
0 Kudos

hi,

you need to first bring the image into your sap system.

that you can achieve by right clicking you application and then clicking on create mime object.

check out this link too:

then you have to insert an image ui element in your view.

check out the link:

http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm

according to you req i think you need to upload and download the image file in your system using a button. so for this you can follow the below link:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a...

hope this will surely help you!!!

thanks & regards,

punit raval.

Edited by: punit raval on Jun 24, 2009 9:56 AM

Former Member
0 Kudos

Hi Punit,

The document which u send is for web dynpro for java..

But I am working in Webdynpro for abap

can u tell me how to do this in web dynpro for abap..

thanks,

viswa

Former Member
0 Kudos

hi,

you can use the File upload UI Element in the same way as shown in that document.

the file upload and file download UI element allows you to upload and download several different format files.

check this link below:

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

hope this will surely help you!!!

Thanks & Regards,

Punit Raval.

Former Member
0 Kudos

Hi,

With the above steps i am trying to display the image by importing the image in mimes...

But how to store that image in the database...

thanks,

viswa

shaik_sajid
Active Contributor
0 Kudos

hi viswa,

mime_repository = cl_mime_repository_api=>get_api( ).

call method mime_repository->put( exporting i_url = 'SAP/BC/BSP/SAP/WEB_UTILITY' i_content = content ).

regards

Sajid

Former Member
0 Kudos

hi,

use the "file download" UI element.

Hope this will now surely help you!!!

Thanks & Regards,

Punit Raval.

Former Member
0 Kudos

hi,

where to give the code for mime...

can you explain me clearly...

thanks,

viswa

Former Member
0 Kudos

thanks,

viswa