Skip to Content
0
Apr 27, 2014 at 11:37 PM

Extract HTML content which is passed to class cl_gui_html_viewer

344 Views

Hi,


There is a standard screen which uses a cl_gui_html_viewer to display data in HTML format. The data inside "lt_data_table_hex" is a hex table and the function module generates a URL (with the name HTM001.htm) and assigns it to "lv_url". The control displays the HTML content. I would like to know how I can get the HTML source code which is passed to the control. I need the tags for other reasons.

* container for the HTML control

DATA: gr_survey_container TYPE REF TO cl_gui_custom_container.

* HTML control

DATA: gr_survey_html TYPE REF TO cl_gui_html_viewer.

* type for the x string

TYPES: t_xml_line(510) TYPE x.

* HEX table

DATA: lt_data_table_hex TYPE TABLE OF t_xml_line.

CALL METHOD gr_survey_html->load_data

EXPORTING

subtype = 'html'

size = lv_string_length

IMPORTING

assigned_url = lv_url

CHANGING

data_table = lt_data_table_hex

EXCEPTIONS

dp_invalid_parameter = 1

dp_error_general = 2

cntl_error = 3

OTHERS = 4.



* show HTML data

CALL METHOD gr_survey_html->show_url

EXPORTING

url = lv_url

EXCEPTIONS

cntl_error = 1

cnht_error_not_allowed = 2

cnht_error_parameter = 3

dp_error_general = 4

OTHERS = 5.


Thanks,

Murali.