2010 May 07 12:01 PM
Hi
Is it possible to create/import objects in the MIME repository in a production server programmatically or manually?
Pushpraj
2010 May 07 10:51 PM
- programmatically, yes: CL_MIME_REPOSITORY_API; check SDN for more information
- manually, yes: as in any system; I probably didn't understand your question
2010 May 07 12:47 PM
Hi,
MIME images are user in SAP application in the form of .png, .gif or .jpeg, usually they are contained in components which are BSP applications designed using MVC paradigm, images can be uploaded in to MIME.
regards,
Muralidhar Prasad.C
2010 May 07 1:13 PM
Hi
Please read the question carefully.
We can create/import objects into the MIME repository in a development system, we know that.
But is it possible in a production system where we can not create any transports ?
Pushpraj
2010 May 07 10:51 PM
- programmatically, yes: CL_MIME_REPOSITORY_API; check SDN for more information
- manually, yes: as in any system; I probably didn't understand your question
2010 May 10 7:56 AM
Hi Sandra
Thanks for the reply
My doubt is this,
Right now we are using the interface method cl_mime_repository_api=>if_mr_api~put( ) for creating a MIME object in the development server. There I am supplying the package and the transport number besides other things.
Now if I transport this code to the production server where there are no trasport numbers, would it be able to create MIME objects there as well? Should we remove the TR and package parameters from the method call?
Thanks
Pushpraj
2010 May 10 9:14 AM
When you execute the program In production, you don't need to transport the MIME object, so use $TMP package. Moreover, you should take care of workbench authorizations (S_DEVELOP...), you may not test them as probably the authorizations are performed at an upper level:
REPORT z_demo_mime_put.
* this will create a PNG file in SE80 MIME Repository
* (shortcut: SO2_MIME_REPOSITORY)
DATA : mime_repository type ref to if_mr_api,
content type xstring,
url type string value '/SAP/PUBLIC/BC/infoicon.png'.
perFORM get_info_icon_png CHANGING content.
mime_repository = cl_mime_repository_api=>get_api( ).
call method mime_repository->put
exporting
i_url = url
i_content = content
i_check_authority = space
i_dev_package = '$TMP'.
assert 1 = 1.
FORM get_info_icon_png CHANGING e_xstring type xstring.
* This icon is the same as ICON_INFORMATION (run SHOWICON program)
DATA l_temp_xstring TYPE XSTRING.
CLEAR e_xstring.
l_temp_xstring = '89504E470D0A1A0A0000000D49484452000000120000001108020000005F386BAE000000'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
l_temp_xstring = '097048597300000EC400000EC401952B0E1B000000864944415478DA63BC79FD1803E980'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
l_temp_xstring = '89812CC002A1D435AD88D773F3FA311638A7EFEC0762F414190B206C8309F1C3D9FFFEBD'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
l_temp_xstring = '877A834910494927F17EEB243B4856630F122CE6310962B5079F3698C7D21818189898F6'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
l_temp_xstring = '10EB48D460B847B5E81E0CDAE071CDC0C0F0EF5F1A03C33DB43860C11AB34C584CBB871C'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
l_temp_xstring = '1F2C68898D48C0485E7E03007A9E1FADA3FE1BE00000000049454E44AE426082'.
CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
ENDFORM.
2010 May 10 10:34 AM
Thanks Sandra
So I guess if someone holds the authorization to create MIME objects manually in production he/she shouldn't get any error with this code either.
Pushpraj
2010 May 10 11:07 AM
> So I guess if someone holds the authorization to create MIME objects manually in production he/she shouldn't get any error with this code either.
yes you're right, that's better that the user has MIME authorizations, because I just saw that in SAPKB70012, this authorization is always checked: S_CTS_ADMI field CTS_ADMFCT = 'TABL' even if i_check_authority = space (it just means not check S_DEVELOP authorization object)
2010 May 10 11:36 AM
2020 Dec 11 2:11 PM
Ciao!
Did you solved this issue?
I have the same problem: create mime image via PUT method in production system.
thanks!