Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Extract HTML content which is passed to class cl_gui_html_viewer

$
0
0

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 <HTML> 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.



Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>