User Tools

Site Tools


abap:web_client

Web client

Utiliser la classe CL_GUI_HTML_VIEWER.

  DATA wgo_dockingbottom TYPE REF TO cl_gui_docking_container.
  DATA : gr_browser TYPE REF TO cl_gui_html_viewer.
  DATA : gv_url(1024)  TYPE c.
  DATA : gt_html TYPE TABLE OF char255 WITH HEADER LINE.
  DATA : gs_html LIKE LINE OF gt_html.
 
  CREATE OBJECT wgo_dockingbottom
    EXPORTING
      repid     = sy-repid
      dynnr     = sy-dynnr
      side      = wgo_dockingbottom->dock_at_bottom
      extension = 300.
 
  CREATE OBJECT gr_browser
    EXPORTING
      parent = wgo_dockingbottom.
 
*** Create Your HTML Content
  gv_url = 'test.htm'.
 
  CALL METHOD gr_browser->load_data
    EXPORTING
      url          = gv_url
    IMPORTING
      assigned_url = gv_url
    CHANGING
      data_table   = tstr2[].
 
*** Show Url
  CALL METHOD gr_browser->show_url
    EXPORTING
      url = gv_url.
 
  CALL METHOD cl_gui_html_viewer=>set_focus
    EXPORTING
      control           = gr_browser
    EXCEPTIONS
      cntl_error        = 1
      cntl_system_error = 2
      OTHERS            = 3.
abap/web_client.txt · Last modified: 2016/07/27 10:33 by ginko