09-30-2015 7:25 AM
Hello,
Please give me some suggestion for Downloading Attached file from DMS Server(cv03n) to local system in R/3.
Thanks.
10-01-2015 3:47 AM
Code Snippet:
CALL FUNCTION '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 is NOT INITIAL.
CALL METHOD 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 EQ 0.
READ TABLE it_file INTO wa_file INDEX 1.
IF sy-subrc = 0.
p_lfile = wa_file-filename.
ENDIF.
ENDIF.
ENDIF.
IF p_lfile is NOT INITIAL.
CALL METHOD 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
.
09-30-2015 10:26 AM
Hello Sachin,
We have our attached files in a Content Server. In CV03N, when you display the file you have the possibility to save the file.
If you have access to R/3, you can save your file there.
Teresa
09-30-2015 10:31 AM
Hello Teresa,
I want to download files through ABAP Program.
Thanks
Sachin
09-30-2015 10:43 AM
We are using FM CV120_KPRO_CHECKOUT in a loop for all the files.
Teresa
09-30-2015 10:40 AM
09-30-2015 12:08 PM
Hi Sachin,
I am facing the same issue ,Can u suggest the logic you used..?
10-01-2015 3:48 AM
10-01-2015 5:35 AM
Thank You Sachin Hulmani.
My requirement is to change the existing Word document data in DMS ,But I got initial thing of how to Download that for my local System.from you.
Thanks Again.
Manju
.
10-01-2015 5:46 AM
10-01-2015 3:47 AM
Code Snippet:
CALL FUNCTION '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 is NOT INITIAL.
CALL METHOD 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 EQ 0.
READ TABLE it_file INTO wa_file INDEX 1.
IF sy-subrc = 0.
p_lfile = wa_file-filename.
ENDIF.
ENDIF.
ENDIF.
IF p_lfile is NOT INITIAL.
CALL METHOD 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
.