cancel
Showing results for 
Search instead for 
Did you mean: 

File cannot be opened

abhinav795
Member
0 Kudos

Hi, I am getting an error File cannot be opened when trying to attach a document to DMS Doc ID.

Function module: CVAPI_DOC_CHECKIN

Error msg ID: 26

wa_file-appnr = '1'.
  wa_file-updateflag = 'I'.
  wa_file-langu = sy-langu.
  wa_file-dappl = l_dappl.
  wa_file-storage_cat = 'ZF0125'.
  wa_file-filename = l_file.
  wa_file-description = l_file.
  wa_file-checked_in = 'X'.
  wa_file-active_version = 'X'.
  APPEND wa_file TO it_file.

* Fill DMS API control data
  wa_api_cntl-tcode = 'CV01N'.
  wa_api_cntl-commit_flag = 'X'.
  wa_api_cntl-no_update_task = 'X'.
  wa_api_cntl-save_flag = 'X'.

* Attach and checkin the original document to DMS document
  CALL FUNCTION 'CVAPI_DOC_CHECKIN'
    EXPORTING
      pf_dokar           = l_docty
      pf_doknr           = l_docnr
      pf_dokvr           = l_docvr
      pf_doktl           = '000'
      pf_hostname        = 'DEFAULT'
      ps_api_control     = wa_api_cntl
      pf_replace         = 'X'
      pf_content_provide = 'TBL'
      pf_ftp_dest        = 'SAPFTPA'
      pf_http_dest       = 'SAPHTTPA'
    IMPORTING
      psx_message        = wa_msg
    TABLES
      pt_files_x         = it_file
      pt_content         = it_drao. <br>
Sandra_Rossi
Active Contributor
0 Kudos

Better use the corresponding BAPI. It's the same behavior, but it's permitted by SAP to call BAPI and you can get support.

If you have an error, please indicate both the message ID + number + other information (not just "26", whatever it means).

Accepted Solutions (0)

Answers (0)