cancel
Showing results for 
Search instead for 
Did you mean: 

how to upload an image file(or any file) in mime using file upload ui eleme

Former Member
0 Kudos

hi Experts,

i want to upload an image in mime repository after selection of image from file upload ui element,

i got some threads in Forums.but i am not able to solve my problem.this may be due to i am new in

sap as well as WedDynpro ABAP.

So Please if any one has solution of this problem or Steps for solving this problem .

please Help me.

Regards,

Susheel Joshi

Edited by: SUSHEEL JOSHI on May 18, 2009 11:46 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Refer this :

mime_repository type ref to if_mr_api,

content type xstring.

    • Reading the Values From Context into variable Content type xstring.**

DATA lo_nd_cn_content TYPE REF TO if_wd_context_node.

DATA lo_el_cn_content TYPE REF TO if_wd_context_element.

DATA ls_cn_content TYPE wd_this->element_cn_content.

DATA lv_content TYPE wd_this->element_cn_content-content.

  • navigate from <CONTEXT> to <CN_CONTENT> via lead selection

lo_nd_cn_content = wd_context->get_child_node( name = wd_this->wdctx_cn_content ).

  • @TODO handle non existant child

  • IF lo_nd_cn_content IS INITIAL.

  • ENDIF.

  • get element via lead selection

lo_el_cn_content = lo_nd_cn_content->get_element( ).

  • @TODO handle not set lead selection

IF lo_el_cn_content IS INITIAL.

ENDIF.

  • get single attribute

lo_el_cn_content->get_attribute(

EXPORTING

name = `CONTENT`

IMPORTING

value = content ).

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 ).

I hope it helps you.

Thanks

Saurav.

Former Member
0 Kudos

Hi Susheel.

Has your problem solved.

Even I am facing the same problem.

Could You please help in uploading an image to MIME repository using upload UI element.

Regards,

SampathKumar.

Former Member
0 Kudos

Hi ,Upto Now i am looking for the solution of this problem.

So sorry i am not able to help you,

if i will get any sol i will inform you.

Regards,

Susheel joshi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't think you have exactly explained what your problem is. There is a nice bit of source code already posted in your thread that explains how to use the MIME APIs to store the uploaded object. Did this code not help you? What exactly are you stuck on?