Skip to Content
avatar image
Former Member

Saving a file (using ABAP) in BW server directory

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 20, 2007 at 03:11 PM

    Hi,

    Try use the program BSP_UPDATE_MIMEREPOS

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Durairaj Athavan Raja

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

  • avatar image
    Former Member
    Aug 20, 2007 at 03:03 PM

    Hi,

    Please check transcation AL11.

    i think it will solve your problm

    Regards,

    Niyaz

    Add comment
    10|10000 characters needed characters exceeded