You need to read the Mime object, and convert it from xstring into a SOLI table. The following code makes that easy and quick.
REPORT zzzzzzz.
DATA:
mime_repository TYPE REF TO if_mr_api,
mime_xstring TYPE xstring,
mime_length TYPE i,
mime_soli TYPE soli_tab,
url TYPE string VALUE '/SAP/PUBLIC/BC/mymime.doc'.
mime_repository ?= cl_mime_repository_api=>get_api( ).
CALL METHOD mime_repository->get
EXPORTING
i_url = url
IMPORTING
e_content = mime_xstring.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = mime_xstring
IMPORTING
output_length = mime_length
TABLES
binary_tab = mime_soli.
* The MIME object is now in mime_soli ready for SAP Office processing.
1 comment:
Good...it was useful for me...
Post a Comment