on 06-17-2009 8:43 PM
Hello gurus,
I have a SmartForm that was converted to xstring using CONVERT_OTF, I want to use the xstring now to display it as PDF inside a custom container.
I tried using class cl_gui_html_viewer together with cl_gui_custom_container but the form always turns up blank.
Convert xstring to binary table to pass to the LOAD_DATA method
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = lv_content
tables
binary_tab = lt_data.
call method pdf_html_control->load_data
exporting
url = l_myurl
size = l_pdf_size
type = 'application' "#EC NOTEXT
subtype = 'pdf' "#EC NOTEXT
importing
assigned_url = l_url
changing
data_table = l_pdf_data
exceptions
others = 1.
call method g_html_control->show_url( url = lv_url
in_place = 'X' ).
Need advice on how to accomplish this, or is there another way to do this?
Thanks in advance.
I've done this using FM CONVERT_OTF_2_PDF not CONVERT_OTF.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is some code I have that is used in an ESS application. But I think it wall also work in R3:
DATA: html_container TYPE REF TO cl_gui_custom_container,
html_viewer TYPE REF TO cl_gui_html_viewer,
url(80) TYPE c,
module display_pdf output.
CREATE OBJECT html_container
EXPORTING
container_name = 'PDF_VIEWER'.
CREATE OBJECT html_viewer
EXPORTING
parent = html_container.
url = 'PDF.pdf'.
CALL METHOD html_viewer->load_data
EXPORTING
url = url
size = size
type = 'text'
subtype = 'pdf'
IMPORTING
assigned_url = url
CHANGING
data_table = lines_pdf[].
CALL METHOD html_viewer->show_data
EXPORTING
url = url
in_place = 'X'.
ENDMODULE. " DISPLAY_PDF OUTPUT
Rob
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.