Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

MIME object (excel file) to String

Hello all,

I would like to convert a mime object which is an excel file that i created in a bsp application to a string/xstring.

Let's say i named this mime-object "test.xls".

Does anyone has example code on how to retreive the object from the database and to convert it?

Kind regards,

Martijn de Jong.

<removed by moderator>

Edited by: Durairaj Athavan Raja on Sep 5, 2008 1:40 PM

Former Member

data: lo_mr_api type ref to if_mr_api.
data: i_url type string.

i_url = '/SAP/BC/BSP/SAP/<your BSP app name>/test.xls' .

call method cl_mime_repository_api=>if_mr_api~get_api
    r_mr_api = lo_mr_api.

call method lo_mr_api->get
   i_url             = i_url
*       e_is_folder      =
    e_content         = l_xstring
    e_mime_type       = l_mimetype
*      E_LOIO             =
*      C_LANGUAGE         =
    parameter_missing  = 1
    error_occured      = 2
    not_found          = 3
    permission_failure = 4
    others             = 5.
0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question