Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue while creating Office 2010 documen using SRM_DOCUMENT_CHECKIN_VIA_TAB

Hi All,

I am using the below code to check in the content to a newly created document.

* Generate the Unique document id
  CALL FUNCTION 'ZPM1_GENERATE_SRM_DOC_ID'
    EXPORTING
      rms_id               = c_rms_id
      elem_name            = c_d_elem_name
      srule_name           = c_d_srule_name
      srule_type           = c_d_srule_type
      context_string       = ' '
    IMPORTING
      highestnum           = v_document_id
    EXCEPTIONS
      counter_id_not_found = 1
      record_id_not_found  = 2
      update_failed        = 3
      OTHERS               = 4.

  IF sy-subrc NE 0.


  ENDIF.

  v_doc_id = v_document_id.
  SHIFT v_doc_id LEFT DELETING LEADING space.

*Get the Internal ID and Storage Location for the new Document
  CALL FUNCTION 'BAPI_SRM_DOC_CREATE'
    EXPORTING
      rms_id        = c_rms_id
      sps_id        = v_docsps_id
      documentid    = v_doc_id
      description   = desc
      do_commit     = 'X'
    IMPORTING
      return        = wa_return
      objectid      = objectid
      documentclass = documentclass
*Begin of changes by DATLAS 06/24/2010

     TABLES
      required_properties = it_rprop.




  CALL FUNCTION 'SRM_DOCUMENT_CHECKIN_VIA_TAB'
     EXPORTING
       objectid                = objectid
       documentclass           = documentclass
      as_new_version           = space
      do_commit                = 'X'
*   DOC_CONTEXT              = wa_doc_context
    IMPORTING
*        x_new_doc_created       = f_new_doc_created
       return                  = wa_return
     TABLES
       components              = components
       bin_content             = bin_content
    EXCEPTIONS
       internal_error          = 1
       parameter_error         = 2
       not_authorized          = 3
       doc_not_found           = 4
       yet_locked              = 5
       OTHERS                  = 6
             .

The BAPI is not working for any of the Office 2010 documents as they are having new mime types.

Please point to any solution.

Regards,

Sumit

Former Member
Not what you were looking for? View more on this topic or Ask a question