‎2008 Jun 26 4:41 PM
hi there,
i have business documents in PDF-format.
i am opening it in ABAP with
CALL METHOD cl_bds_document=>display
this works perfect for SAP WINGUI, acrobat reader is opened with the document.
BUT: i have to use my abap in SAP WEBGUI.
there i only get the info 'xxxxxx bytes downloaded' and NO acrobat reader is opened. it seems
that the document is only downloades somewhere.
any ideas ? i need to open the document
reg, Martin
‎2008 Jun 26 4:59 PM
‎2008 Jun 26 5:04 PM
well, thank you, but:
how should i use class CL_GUI_HTML_VIEWER ? which method i should call ?
how can i handle this with my business document ?
reg, Martin
‎2008 Jun 26 5:11 PM
This takes pdf data and shows it in browser.
you have to use two methods one load data and other show_url.
i am not sure in your case how to capture that pdf data..
**-Load PDF Data
* call method cl_htmlviewer->load_data
* EXPORTING
* type = v_application
* subtype = v_pdf
* size = v_numbytes
* IMPORTING
* assigned_url = v_url
* CHANGING
* data_table = lt_pdf
* EXCEPTIONS
* dp_invalid_parameter = 1
* dp_error_general = 2
* cntl_error = 3
* others = 4.
*
*
* call method cl_htmlviewer->show_url "data
* EXPORTING
* url = v_url
* in_place = ' '
* EXCEPTIONS
* cntl_error = 1
* cnht_error_not_allowed = 2
* cnht_error_parameter = 3
* dp_error_general = 4
* others = 5.
‎2008 Jun 27 10:10 AM
hi,
i have tried out with the following code:
but at the end nothing is displayed in webgui, the abap runs trough 'empty'
IF cl_htmlviewer IS INITIAL.
CREATE OBJECT my_container
EXPORTING
container_name = 'HTML'.
CREATE OBJECT cl_htmlviewer
EXPORTING
parent = my_container.
ENDIF.
CALL METHOD cl_htmlviewer->load_data
EXPORTING
type = 'APPLICATION'
subtype = 'pdf'
IMPORTING
assigned_url = gf_url
CHANGING
data_table = gt_content
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4.
CALL METHOD cl_htmlviewer->show_url "data
EXPORTING
url = gf_url
in_place = 'X'
EXCEPTIONS
cntl_error = 1
cnht_error_not_allowed = 2
cnht_error_parameter = 3
dp_error_general = 4
OTHERS = 5.