Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
bjoern_panter
Product and Topic Expert
Product and Topic Expert

Hi community,

we all know that development guidelines are always in PDF format hidden on a fileshare or document management system. Updates are not really distributed. What if you would have a modification free possibility to show every developer of your company the latest version of guidelines located on an internal webserver.

Update: With SAP Netweaver 7.40 SP10 please use the standard behavior

ABAP Workbench Tools

     -> Initial page (SE80)

          -> Changing the Welcome Page

For all older releases please continue.......

What to do?

  1. Create a website with your own guidlines or use the official http://help.sap.com/abapdocu_740/en/index.htm?file=ABENABAP_PGL.htm
  2. Create an implicit enhancement to the class CL_WB_INITIAL->SHOW_CONTROLS at the end of the method and add the following code

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:
1) Klasse CL_WB_INITIAL, Methode SHOW_CONTROLS, Ende                                                                                                 A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT Z_WB_START.    "active version

DATA:  l_url          TYPE char200,
             l_url_sec      TYPE string,
             l_is_ok        TYPE abap_bool,
             l_wan_flag     TYPE as4flag.
  data:    l_event_tab      type cntl_simple_events,
              l_event          type cntl_simple_event,
             lv_ssm_cust      type ssm_cust.

* Get the URL for HTML control
  SELECT SINGLE * FROM ssm_cust into lv_ssm_cust WHERE id = 'SESS_WB_URL'.
  IF sy-subrc = 0 AND lv_ssm_cust-path IS NOT INITIAL.
     l_url     = LV_ssm_cust-path.
     l_url_sec = LV_ssm_cust-path.

* Check if this URL is valid/good
    CALL METHOD cl_http_utility=>if_http_utility~is_valid_url
      EXPORTING
        url   = l_url_sec
      RECEIVING
        is_ok = l_is_ok.

    IF NOT l_is_ok IS INITIAL.
      CALL FUNCTION 'SAPGUI_GET_WAN_FLAG'
        IMPORTING
          wan_flag = l_wan_flag.
      IF l_wan_flag IS INITIAL.
       IF NOT me->html_control IS INITIAL.
           SET HANDLER handle_evt_sapevent FOR me->html_control  ACTIVATION space.
       ENDIF.
       CLEAR:
        me->gui_container,
        me->html_control.
        CREATE OBJECT me->gui_container
             EXPORTING
                container_name  = 'IMAGE'.
         if me->html_control is initial.
         create object me->html_control
             exporting
                 parent   = me->gui_container.
    l_event-eventid    = me->html_control->m_id_sapevent.
    l_event-appl_event = ' '.
    append l_event to l_event_tab.
    call method me->html_control->set_registered_events
      exporting
        events = l_event_tab.
    set handler handle_evt_sapevent for me->html_control.

    call method me->html_control->show_data
      exporting
        url = l_url.

    endif.
  endif.
endif.
endif.

ENDENHANCEMENT.

*$*$-End:   (1)---------------------------------------------------------------------------------$*$*

ENDMETHOD.

3. An finally start SM30 for table SSM_CUST and maintain a valid URL for the entry SESS_WB_URL

Now in your ABAP workbench the website will be opened.

Regards

Björn

9 Comments