on 07-27-2011 8:20 AM
Hello all,
i have a requierement to open the document when user click in filename i am using this function module but it is giving me error
'Screen output without connection to user.'
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
pf_dokar = ls_final-dokar
pf_doknr = ls_final-doknr
pf_dokvr = ls_final-dokvr
pf_doktl = ls_final-doktl
PF_HOSTNAME = '10.141.104.40'
pf_appl_start = 'X'
PF_GET_URL = 'X'
pf_apptp = '1'
PF_ASK_FILENAME = ' '
pf_filename = lv_filep
PS_FILE =
PF_PARENT =
PF_USE_DYNP = 'X'
PS_DRAP_AUDIT =
IMPORTING
PFX_FILE =
PFX_URL =
PFX_VIEW_INPLACE =
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.
Hi Shilpi,
I had the same error. I got round them by pulling parts of the FM out as below
call function 'CV120_DOC_GET_APPLICATION'
exporting
pf_dokar = ls_drad-dokar
pf_doknr = ls_drad-doknr
pf_dokvr = ls_drad-dokvr
pf_doktl = ls_drad-doktl
importing
psx_file = lv_file
exceptions
not_found = 1
no_auth = 2
error = 3
others = 4.
concatenate 'file://' lv_file-filename into lv_url.
lv_url2 = lv_url.
call method lo_window_manager->create_external_window
exporting
url = lv_url2
modal = abap_false
has_menubar = abap_true
is_resizable = abap_true
has_scrollbars = abap_true
has_statusbar = abap_true
has_toolbar = abap_true
has_location = abap_true
receiving
window = lo_window.
lo_window->open( ).
Regards
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am getting dump while dispaying the file as external window.
Is there no way to solve the problem.
I have created the webdynpro and using the function module below. But i am getting error like GUI is not supported for that and failing on class cl_gui_frontend
Please let me know how can we do this :
This logic program below is used to open the file name when the user clicks the file name
In background, program should look for DOKAR, DOKNR, DOKVR and DOKTL from DRAD table where
DOKOB = u2018MARAu2018 (Hard code)
OBJKY = material from initial selection screen
Then these values are used for FM CVAPI_DOC_VIEW
Import Parameter:
PF_DOKAR = DRAD-DOKAR
PF_DOKNR = DRAD-DOKNR
PF_DOKVR = DRAD-DOKVR
Then get PFX file from export table
(Refer to test data u201CTest DMSu201D of function module CVAPI_DOC_VIEW).
if i get the contents of file then i will bind the propert with data but i am not getting the any function module for that .
Hi Shilp,
Did you break the code down into the 2 function modules as expressed above?
CVAPI_DOC_VIEW will dump with the error as you expressed.
So firstly try the code snippet above.
Also make sure you have the correct DRAD to pass in by doing a select on DRAD first. this is probably nothing to do with your issue. Just to make sure you have the correct data.
ls_link-dokob = gc_equi.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = lv_matnr
importing
output = lv_matnr. "as you might require correct number of zeros.
select * from drad into table gt_drad
for all entries in lt_link
where dokob = lt_link-dokob
Regards
Bruce
and objky = lt_link-objky.
Hi Shilpi,
In that FM somewhere using some GUI Related statements like CALL SCREEN, CALL TRANSACTION like statements.
So that the error. You can't use that FM. Go to ST22 and find where you are getting this error. if that is GUI error
you can't use that FM.
Try to search for any another FM to meet your requirements or try to remove that stement by converting to ZFM and make changes according to your requirement.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.