08-20-2007 3:53 PM
Hi,
Does anybody knows if it is possible to save a file (I am using a BSP application) in the MIME directory of a BW server (the directory where Web Application Designer images are stored)?
I had sucess saving the file in the root directory (.) and in a tmp directory (/usr/sap/tmp). But I don't know the path of the MIME directory, and if it is possible saving there.
Thanks,
Paulo
Petrobras
08-20-2007 4:11 PM
08-20-2007 4:03 PM
Hi,
Please check transcation AL11.
i think it will solve your problm
Regards,
Niyaz
08-20-2007 4:11 PM
08-20-2007 6:10 PM
I wanna write in the same directory that this program do, but with
OPEN DATASET comand cause i need do this inside my BSP application.
08-21-2007 8:40 AM
data: lo_mr_api type ref to if_mr_api.
data: i_url type string.
i_url = '/SAP/BW/MIME........' . " this is the path where you want to put the mime object in MIME repository
instantiate MIME API class
call method cl_mime_repository_api=>if_mr_api~get_api
receiving
r_mr_api = lo_mr_api.
use put method to write to it.
call method lo_mr_api->put
08-21-2007 2:55 PM
I'm trying to execute the program, but i always get the exception 1, parameter_missing. Does anybody know what is happen?
<%
data: lo_mr_api type ref to if_mr_api.
data: i_url type string.
DATA: l_content TYPE xstring.
data: erro type i.
DATA: BEGIN OF wa_file_loio,
name(256) TYPE c,
loio TYPE skwf_io,
is_folder(1),
END OF wa_file_loio.
i_url = '/SAP/BC/BSP/SAP/BSP_TRESITEM/MIMES/logon.txt'.
instantiate MIME API class
call method cl_mime_repository_api=>if_mr_api~get_api
receiving
r_mr_api = lo_mr_api.
CLEAR: l_content.
l_content = 'lll'.
use put method to write to it.
CALL METHOD lo_mr_api->put
EXPORTING
i_url = i_url
i_content = l_content
i_suppress_package_dialog = 'X'
i_new_loio = wa_file_loio-loio
EXCEPTIONS
parameter_missing = 1
error_occured = 2
cancelled = 3
permission_failure = 4
data_inconsistency = 5
OTHERS = 6.
erro = sy-subrc.
%>
<%=erro%>