2010 Dec 14 12:27 PM
Hi,
as in transaction 'CV04N', I have in my report programmed functionality to open an arhcived document directly from the selected alv row.
This is done by calling FM DOCUMENT_SHOW_DIRECT' and works almost as i want it.
Apart from when a file is opened, it already has concatenated SY-UNAME + a number from 1-20 assigned to the opened file. So this name is displayed in the topframe of the opened document.
Anyone know if its possible to just retrieve the actual filename, instead of the FM generating this temporary name?
I also tried the FM CVAPI_DOC_VIEW.
Regards
Jakob
2010 Dec 14 2:49 PM
Hi,
you can use the FM CVAPI_DOC_VIEW with the following parameters
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
pf_dokar = ls_draw-dokar
pf_doknr = ls_draw-doknr
pf_dokvr = ls_draw-dokvr
pf_doktl = ls_draw-doktl
pf_filename = lv_url "this is the path and filename you want
"to save the document
pf_appl_start = space
EXCEPTIONS
error = 1
not_found = 2
no_auth = 3
no_original = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.Kostas
Hi,
as in transaction 'CV04N', I have in my report programmed functionality to open an arhcived document directly from the selected alv row.
This is done by calling FM DOCUMENT_SHOW_DIRECT' and works almost as i want it.
Apart from when a file is opened, it already has concatenated SY-UNAME + a number from 1-20 assigned to the opened file. So this name is displayed in the topframe of the opened document.
Anyone know if its possible to just retrieve the actual filename, instead of the FM generating this temporary name?
I also tried the FM CVAPI_DOC_VIEW.
Regards
Jakob
2010 Dec 14 2:49 PM
Hi,
you can use the FM CVAPI_DOC_VIEW with the following parameters
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
pf_dokar = ls_draw-dokar
pf_doknr = ls_draw-doknr
pf_dokvr = ls_draw-dokvr
pf_doktl = ls_draw-doktl
pf_filename = lv_url "this is the path and filename you want
"to save the document
pf_appl_start = space
EXCEPTIONS
error = 1
not_found = 2
no_auth = 3
no_original = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.Kostas
2010 Dec 16 1:37 PM
2014 Jan 13 10:42 PM
I was having the same issue and learned that this is controlled in 'Workstation Application' configuration using the 'You cannot rename temporary files' checkbox. Tick the checkbox and the file will launch with the actual name on the original. Just wanted to provide this info in case others come across the same problem.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |