cancel
Showing results for 
Search instead for 
Did you mean: 

File cannot be opened

05-10-2023 5:43 PM
abhinav795 Member
873 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

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>
0 Likes

Accepted Solutions (0)

Answers (0)