cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to download documents from DMS in webdynpro

Former Member
0 Kudos

Hi Experts,

I am using Bapi ''BAPI_DOCUMENT_CHECKOUTVIEW2' to download the documents from DMS and display it through webdynpro, Bapi is giving below error

"No temprorary current directory for your frontend available"

Please help me.

I have used below code to download the document.



DATA: ls_docfiles TYPE bapi_doc_files2,
        ls_dms TYPE dms_doc_files,
        lt_docfiles TYPE STANDARD TABLE OF bapi_doc_files2,
*        i_info type SCMS_ACINF,
*        i_bin type SDOKCNTBIN,
        documentnumber type BAPI_DOC_AUX-DOCNUMBER,
        documentpart type  BAPI_DOC_AUX-DOCPART,
        documentversion type  BAPI_DOC_AUX-DOCVERSION,
        documenttype  type  BAPI_DOC_AUX-DOCTYPE,
        return  type BAPIRET2.
* select single * from dms_doc_files
* into ls_dms
* where "Retrieve file

  MOVE '0000000000000010000000050' TO documentnumber .
  MOVE '000' TO documentpart .
  MOVE '00' TO documentversion .

* if sy-subrc = 0.
  ls_docfiles-documenttype = 'DMO'.
  ls_docfiles-documentnumber = documentnumber .
  ls_docfiles-documentpart = documentpart .
  ls_docfiles-documentversion = documentversion.
* endif.
  CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
    EXPORTING
      documenttype    = ls_docfiles-documenttype
      documentnumber  = ls_docfiles-documentnumber
      documentpart    = ls_docfiles-documentpart
      documentversion = ls_docfiles-documentversion
      documentfile    = ls_docfiles
      getstructure    = '1'
      getcomponents   = 'X'
      getheader       = 'X'
      pf_http_dest         = 'SAPHTTPA'
      pf_ftp_dest          = 'SAPFTPA'
    IMPORTING
      return          = return
    TABLES
      documentfiles   = lt_docfiles.
  MOVE return TO return.

Thanks & Regards,

Venkat.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

But when I pass 'ORIGINALPATH' attribute value as 'C:\temp\' to the FM its not giving any error, but I am not able to read the file content using FM 'SCMS_DOC_READ' .

If possible please provide me the steps to be done for Front end directory settings.

Thanks & Regards,

Venkat.

Former Member
0 Kudos

hi

check your configuration for the front end directory setting