Code: Alles auswählen.
<A href="SAPEVENT:CLICK_ON_ME?MYPARAMERS"> Click on me to send an event! </A>
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_HTML_CONTROL *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT z_html_control.
*&---------------------------------------------------------------------*
*& Global Declarations *
*&---------------------------------------------------------------------*
*Class Definitions
CLASS screen_handler DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
CLASS-DATA screen TYPE REF TO screen_handler.
CLASS-METHODS create_screen.
METHODS constructor.
PRIVATE SECTION.
DATA:
container_html TYPE REF TO cl_gui_custom_container,
html_viewer TYPE REF TO cl_gui_html_viewer.
METHODS: fill_html.
ENDCLASS. "application DEFINITION
*Class Definitions
CLASS screen_handler IMPLEMENTATION.
METHOD constructor.
* DATA:
* l_container_screen TYPE REF TO cl_gui_custom_container.
CREATE OBJECT container_html
EXPORTING
container_name = 'CUSTOM_CONTROL'.
CALL METHOD fill_html.
ENDMETHOD. "CONSTRUCTOR
METHOD fill_html.
DATA l_url(20) TYPE c.
DATA parameter(200) type c.
IF html_viewer IS INITIAL.
CREATE OBJECT html_viewer
EXPORTING parent = container_html.
endif.
l_url = 'P:\abap_seite.html'.
CALL method html_viewer->show_data
exporting
url = l_url.
* FRAME =
* IN_PLACE = 'X '
* EXCEPTIONS
* CNTL_ERROR = 1
* CNHT_ERROR_NOT_ALLOWED = 2
* CNHT_ERROR_PARAMETER = 3
* DP_ERROR_GENERAL = 4
* others = 5
ENDMETHOD.
METHOD create_screen.
IF screen IS INITIAL.
CREATE OBJECT screen.
ENDIF.
ENDMETHOD. "create_screen
ENDCLASS. "screen_handler IMPLEMENTATION
*&---------------------------------------------------------------------*
*& Processing Blocks called by the JRE *
*&---------------------------------------------------------------------*
LOAD-OF-PROGRAM.
CALL SCREEN 100.
*Dialog Module PBO
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
SET TITLEBAR 'TIT_100'.
CALL METHOD screen_handler=>create_screen.
ENDMODULE. "status_0100 OUTPUT
*Dialog Module PAI
MODULE user_command_0100 INPUT.
IF sy-ucomm = 'BACK' OR
sy-ucomm = 'EXIT' OR
sy-ucomm = 'CANCEL'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE. "user_command_0100 INPUT
Code: Alles auswählen.
****************************************************
* cl_myevent_handler implementation *
****************************************************
CLASS cl_myevent_handler IMPLEMENTATION.
METHOD on_sapevent.
CLEAR edaction.
CLEAR edframe.
CLEAR edgetdata.
CLEAR edpostdataline.
edaction = action.
edframe = frame.
edgetdata = getdata.
postdata_tab = postdata.
IF NOT postdata_tab IS INITIAL.
READ TABLE postdata_tab INDEX 1 INTO edpostdataline.
ENDIF.
edquery_table = query_table.
CASE action.
WHEN 'SHOW_FRAMESET'.
PERFORM load_frame_set.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
ENDCLASS.
Code: Alles auswählen.