Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Saving a file (using ABAP) in BW server directory

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Hi,

Try use the program BSP_UPDATE_MIMEREPOS

5 REPLIES 5

former_member200338
Active Contributor
0 Kudos

Hi,

Please check transcation AL11.

i think it will solve your problm

Regards,

Niyaz

former_member194669
Active Contributor
0 Kudos

Hi,

Try use the program BSP_UPDATE_MIMEREPOS

0 Kudos

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.

0 Kudos

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

0 Kudos

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%>