on 05-16-2009 10:36 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.