Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Re: Download Attached file from DMS Server(cv03n) to local system in R/3

$
0
0

Code Snippet:



CALLFUNCTION'CVAPI_DOC_VIEW'

   EXPORTING

     pf_dokar      =

     pf_doknr      =

     pf_dokvr      =

     pf_doktl      =

     pf_appl_start = ' '

   IMPORTING

     pfx_file      = lv_filename

   EXCEPTIONS

     error         = 1

     not_found     = 2

     no_auth       = 3

     no_original   = 4

     OTHERS        = 5.

 

lv_workdir = lv_filename.

 

IF lv_workdir isNOTINITIAL.

CALLMETHOD cl_gui_frontend_services=>file_open_dialog

   EXPORTING

     default_extension       = 'DOC'

     initial_directory       = 'C:\'

   CHANGING

     file_table              = it_file

     rc                      = v_rc

   EXCEPTIONS

     file_open_dialog_failed = 1

     cntl_error              = 2

     error_no_gui            = 3

     not_supported_by_gui    = 4

     OTHERS                  = 5.

 

IF sy-subrc EQ0.

   READTABLE it_file INTO wa_file INDEX1.

   IF sy-subrc = 0.

     p_lfile = wa_file-filename.

   ENDIF.

ENDIF.

ENDIF.

 

 

IF p_lfile isNOTINITIAL.

 

CALLMETHOD cl_gui_frontend_services=>file_copy

     EXPORTING

       source               = lv_workdir

       destination          = p_lfile

*     overwrite            = SPACE

*   EXCEPTIONS

*     cntl_error           = 1

*     error_no_gui         = 2

*     wrong_parameter      = 3

*     disk_full            = 4

*     access_denied        = 5

*     file_not_found       = 6

*     destination_exists   = 7

*     unknown_error        = 8

*     path_not_found       = 9

*     disk_write_protect   = 10

*     drive_not_ready      = 11

*     not_supported_by_gui = 12

*     others               = 13

           .


Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>