In Progress

ABAP: Reload HTML-Viewer-Control - SAP

I have a module-pool and a Dynpro(Screen), no WebDynpro.

At the Dynpro we have a CustomContainer with the HTML-Viewer-Control (CL_GUI_HTML_VIEWER).

I have some HTML-Code which is displayed within the HTML-viewer. After pressing the button within this HTML-page, the SAPEVENT is

processed. After that processing I wanna reload the HTML-Viewer-Control with another HTML-sourcecode.

At the following line you find the ABAP-Code I have until now. Displaying the HTML-Code works fine.

But I don't know how to reload the HTML-Viewer with new HTML-sourcecode.

Please make your bid only if you have already had experiences with the HTML-Viewer-Control AND if you know how to

solve the problem.

This is my ABAP-sourcecode working until now:

In Top-Include I have:

DATA: html TYPE w3htmltab.

DATA: lf_html TYPE string.

DATA: lv_url TYPE char255.

DATA: gt_html TYPE w3htmltab.

DATA gr_html TYPE REF TO cl_gui_html_viewer.

DATA gr_cont TYPE REF TO cl_gui_custom_container.

DATA lv_data TYPE string.

In PBO we have:

module fillhtml

concatenate

''

''

' TestHTML '

' '

''

''

INTO lf_html SEPARATED BY cl_abap_char_utilities=>cr_lf.

CLEAR html.

perform SPLIT_text USING lf_html CHANGING html.

glob_ContainerName = 'HTMLCONT'.

CREATE OBJECT gr_cont

EXPORTING

container_name = glob_ContainerName.

CREATE OBJECT gr_html

EXPORTING

parent = gr_cont.

***

CREATE OBJECT gr_handler.

DATA events TYPE cntl_simple_events.

DATA event TYPE cntl_simple_event.

event-eventid = gr_html->m_id_sapevent.

event-appl_event = 'X'.

APPEND event TO events.

CALL METHOD gr_html->set_registered_events

EXPORTING

events = events.

SET HANDLER gr_handler->handle_event FOR gr_html.

***

CALL METHOD gr_html->load_data

IMPORTING

assigned_url = lv_url

CHANGING

data_table = html

EXCEPTIONS

dp_invalid_parameter = 1

dp_error_general = 2

cntl_error = 3

OTHERS = 4

.

CALL METHOD gr_html->show_url

EXPORTING

url = lv_url

* FRAME =

* IN_PLACE = ' X'

EXCEPTIONS

cntl_error = 1

cnht_error_not_allowed = 2

cnht_error_parameter = 3

dp_error_general = 4

OTHERS = 5

.

Endmodule.

And in "Classes" we have theese:

CLASS lcl_handler DEFINITION.

PUBLIC SECTION.

METHODs:

handle_event FOR EVENT sapevent of cl_gui_html_viewer IMPORTING action frame POSTDATA.

ENDCLASS.

class lcl_handler IMPLEMENTATION.

METHOD handle_event.

DATA: ls_postdata LIKE LINE OF postdata,

lt_pairs TYPE TABLE OF string,

ls_pairs LIKE LINE OF lt_pairs,

lv_key TYPE string,

lv_value TYPE string.

lv_data = ''.

LOOP AT postdata INTO ls_postdata.

CONCATENATE lv_data ls_postdata INTO lv_data.

ENDLOOP.

SEARCH lv_data FOR 'Submit1=yes'.

IF sy-subrc = 0.

...here I wanna change the html-code to:

Thanks for your TEST !!!!!

Endif.

Skills: SAP

See more: sap html viewer abap, cl_gui_html_viewer data, abap html viewer, sap html viewer control, reload page webdynpro, show_url in_place, reload html viewer, sap html control, cl_gui_html_viewer, sap cl_gui_html_viewer show_url frame, displaying html sap abap, data html viewer sap abap, sap abap html viewer code, abap cl_gui_html_viewer, cl_gui_html_viewer reload, sap abap html control, reload html control, sap control html, m_id_sapevent, abap cl_gui_html_viewer url string, abap html, sap html control sapevent, sap cl_gui_html_viewer, abap html viewer reload, reload html abap

About the Employer:
( 47 reviews ) Dresden, Germany

Project ID: #4401494

Awarded to:

mara0011

Hi, I did the same in one of my developments. I have been working in SAP development for almost 10 years and afterwards 5 years in ABAP training (all jobs directly with SAP as employer). And I want to try out this port More

$100 USD in 3 days
(0 Reviews)
0.0

4 freelancers are bidding on average $100 for this job

maulik1parekh

I am an SAP ABAP Consultant and I have worked on this class named 'CL_GUI_HTML_VIEWER'.

$110 USD in 3 days
(0 Reviews)
0.0
sappassion

I am highly experienced guy to deal with this stuff.i have worked before on such things.

$107 USD in 8 days
(0 Reviews)
0.0
ravigrover1982

I have experience in the same.

$84 USD in 5 days
(0 Reviews)
0.0