title: How to attach files in MIRO
body: <p>I have to create report/FM for attachment (a image &amp; a file, both in .TIF format) in <code>MIRO</code> Transaction Code.</p>
  <p>In my code it is updating in table but not in <code>MIRO</code>. Can anybody check my code where I am doing a mistake.</p>
  <p>I have to pass Business object , business key.</p>
  <pre><code>SELECTION-SCREEN BEGIN OF BLOCK b12 WITH FRAME TITLE text-001.
  PARAMETERS: p_file   TYPE localfile,
              p_objid  TYPE swo_typeid,
              p_bo     TYPE swo_objtyp.
  SELECTION-SCREEN END OF BLOCK b1.
  DATA:
    li_content   TYPE  STANDARD TABLE OF soli,
    ls_content   TYPE soli,
    li_objhead   TYPE STANDARD TABLE OF soli,
    lwa_folmem_k TYPE sofmk,
    lwa_note     TYPE borident,
    lwa_object   TYPE borident,
    lwa_obj_id   TYPE soodk,
    lwa_content  TYPE soli,
    lwa_fol_id   TYPE soodk,
    lwa_obj_data TYPE sood1,
    lv_ep_note   TYPE borident-objkey,
    lv_lifnr     TYPE lifnr,
    lv_file      TYPE string,
    lv_filename  TYPE c LENGTH 100, &quot; file name and ext
    lv_extension TYPE c LENGTH 4. &quot; extension only
  
  REFRESH: li_content[], li_objhead[].
  
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                      = 'C:\Users\User\Desktop\123.TIF'
     filetype                       = 'BIN'
     TABLES
     data_tab                       = lt_data
  
  CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
      EXPORTING
        it_contents_bin = li_content[]
      IMPORTING
        et_contents_bin = li_content[].
  
    CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
      EXPORTING
        region                = 'B'
      IMPORTING
        folder_id             = lwa_fol_id
      EXCEPTIONS
        communication_failure = 1
        owner_not_exist       = 2
        system_failure        = 3
        x_error               = 4
        OTHERS                = 5.
  </code></pre>