Skip to Content
author's profile photo Former Member
Former Member

solution to upload images by creating mime repository


We need to implement a solution in retail where and enduser will upload the images of different retail items which needs to be accessed by buyers.

We need to understand the best possible way on following

1. How do we create repository where an image can be uploaded without creating transport requests.

2. How can webdynpro application access the image if the archiving is done.

Thank you


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 14, 2009 at 10:56 AM


    I am just putting one of my posted replies to you.

    1)You can use the program BSP_UPDATE_MIMEREPOS to upload the photos in the mime repository.

    2)Use the following code to get the content from your mime and set the content to your interactive UI element as Xstring format.


    mime_repository type ref to if_mr_api,

    content type xstring,

    url type string value '/SAP/BC/BSP/SAP/myBSPapplication/rajkumar.jpg' .

    mime_repository = cl_mime_repository_api=>get_api( ).

    call method mime_repository->get


    i_url = url


    e_content = content.

    wd_context->set_attribute( name = 'DATAS' value = content ).



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 14, 2009 at 01:03 PM

    Actually I would just suggest storing the images in a normal database table like any other piece of data. Images can be stored in a table that has a column of data type XSTRING (RAW STRING). You just use normal SQL commands to read and write the data. This is generally easier than interacting with the MIME repository - although the MIME Repository does have APIs if you absolutely must go that route.

    To me MIME repository is good for objects directly part of a development object, but if you have images that are part of your application data, they should be treated as such and stored in the database.

    If you want an example of this, we created such a thing for the mentors' hands on workshop:

    We created a custom table to hold images and created a custom ICM handler to make it easy to access them via URL. We could then use these images in our Web Dynpro and Flex coding.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.