Ansicht
Dokumentation

BAL_TP_CB_TOOLBAR -

BAL_TP_CB_TOOLBAR -

CL_GUI_FRONTEND_SERVICES - Frontend Services   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

BAL_CALLBACK_TOOLBAR
======================================================================

Purpose and time
If you display with ALV Grid Control (parameter USE_GRID = 'X' in display profil), you can modify the toolbar above the ALV grid with this routine.
You can put additional application-specific elements in the log display.
This routine is called when:

  • the toolbar is created
  • a button with sub-items is selected in the toolbar.

Definition
In display profile, field CLBK_TOOLB.

Parameterization
FORM bal_callback_toolbar
       USING
         c_s_toolbar_info TYPE bal_s_tbi

* when toolbar is filled, the whole toolbar can be modified:
  IF NOT c_t_toolbar_info-toolbar IS INITIAL.
*   add a simple button
    CLEAR l_s_toolbar.
    l_s_toolbar-butn_type = 0.         "normal button
    l_s_toolbar-function  = 'MY_BUTTON'.
    l_s_toolbar-icon      = icon_ws_rail.
    l_s_toolbar-quickinfo = 'New button'(nbt).
    INSERT l_s_toolbar INTO c_t_toolbar_info-toolbar->mt_toolbar
                       INDEX 2.
*   add a button with submenu
    CLEAR l_s_toolbar.
    l_s_toolbar-butn_type = 1.         "button with submenu
    l_s_toolbar-function  = 'MY_MENU'.
    l_s_toolbar-icon      = icon_ws_ship.
    l_s_toolbar-quickinfo = 'New menu'(nmn).
    INSERT l_s_toolbar INTO c_t_toolbar_info-toolbar->mt_toolbar
                       INDEX 3.
  ENDIF.

* when menu is filled, we can add entries to submenu:
  IF NOT c_t_toolbar_info-menu IS INITIAL.
    IF c_t_toolbar_info-ucomm = 'MY_MENU'.
      CALL METHOD c_t_toolbar_info-menu->add_function
                  EXPORTING fcode   = 'MY_SUBMENU_1'
                            text    = text-ms1.
      CALL METHOD c_t_toolbar_info-menu->add_function
                  EXPORTING fcode   = 'MY_SUBMENU_2'
                            text    = text-ms2.
    ENDIF.
  ENDIF.

ENDFORM.






CL_GUI_FRONTEND_SERVICES - Frontend Services   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 3693 Date: 20240520 Time: 144652     sap01-206 ( 21 ms )