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:
' TestHTML '
INTO lf_html SEPARATED BY cl_abap_char_utilities=>cr_lf.
perform SPLIT_text USING lf_html CHANGING html.
glob_ContainerName = 'HTMLCONT'.
CREATE OBJECT gr_cont
container_name = glob_ContainerName.
CREATE OBJECT gr_html
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
events = events.
SET HANDLER gr_handler->handle_event FOR gr_html.
CALL METHOD gr_html->load_data
assigned_url = lv_url
data_table = html
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4
CALL METHOD gr_html->show_url
url = lv_url
* FRAME =
* IN_PLACE = ' X'
cntl_error = 1
cnht_error_not_allowed = 2
cnht_error_parameter = 3
dp_error_general = 4
OTHERS = 5
And in "Classes" we have theese:
CLASS lcl_handler DEFINITION.
handle_event FOR EVENT sapevent of cl_gui_html_viewer IMPORTING action frame POSTDATA.
class lcl_handler IMPLEMENTATION.
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.
SEARCH lv_data FOR 'Submit1=yes'.
IF sy-subrc = 0.
...here I wanna change the html-code to:
Thanks for your TEST !!!!!
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 Daha Fazla
4 freelancers are bidding on average $100 for this job
I am an SAP ABAP Consultant and I have worked on this class named 'CL_GUI_HTML_VIEWER'.
I am highly experienced guy to deal with this stuff.i have worked before on such things.