Completed

ABAP: Reload HTML-Viewer-Control - SAP

This project was successfully completed by mara0011 for $100 USD in 3 days.

Get free quotes for a project like this
Employer working
Completed by:
Skills Required
Project Budget
N/A
Completed In
3 days
Total Bids
4
Project Description

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.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online