Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 15, 2011 at 03:29 PM

    Hi Sumit Oberoi,

    - What does FUNCTION 'ZPM1_GENERATE_SRM_DOC_ID' do wns why do you ignore the SY-SUBRC?

    - what are the values of c_rms_id c_d_elem_name c_d_srule_name c_d_srule_type v_document_id at run time?

    - Which BAPI is not working for any of the Office 2010 documents?

    - Do you use mime type XLSX - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet or XLS - application/vnd.ms-excel

    Regards,

    Clemens

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Please find the answers to your questions.

      Thanks for you reply!

      Ques: What does FUNCTION 'ZPM1_GENERATE_SRM_DOC_ID' do wns why do you ignore the SY-SUBRC?

      Bapi SRM_DOCUMENT_CHECKIN_VIA_TAB has SY-SUBRC as 1.

      Ques: what are the values of c_rms_id c_d_elem_name c_d_srule_name c_d_srule_type v_document_id at run time?

      These are all constants based on the record structure of client.

      Ques: Which BAPI is not working for any of the Office 2010 documents?

      SRM_DOCUMENT_CHECKIN_VIA_TAB

      Ques: Do you use mime type XLSX - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet or XLS - application/vnd.ms-excel

      Yes.

      Regards,

      Sumit

      Edited by: Sumit Oberoi on May 16, 2011 11:12 PM