Entering content frameProcess documentationUsing the SAP Toolbar Locate the document in its SAP Library structure

Purpose

This section explains the general process for using an SAP Toolbar control.

Prerequisites

You should already be familiar with the basic concepts of ABAP Objects and with Structure link SAP Container controls.

Process Flow

Note

This process contains only the steps that are specific to the SAP Toolbar. It does not, for example, cover how to create the necessary SAP Container.

The coding example shows the ABAP coding that you would write for the steps below.

  1. Create a reference variable for the toolbar instance (with reference to the class CL_GUI_TOOLBAR ) and any relevant data structures:

Data structure

Description

Used in

TTB_BUTTON

An internal table, each line of which describes a button in the toolbar

add_button_group

TTB_BTNMNU

An internal table, each line of which contains the name of a menu button and the name of the context menu assigned to it.

assign_static_ctxmenu_table

  1. Create an event handler class for the events of the toolbar.
  2. Create the toolbar instance, fill the button table with the buttons you want to use, and assign them to the toolbar.
  3. If you want to use static context menus for menu buttons, create and fill the context menus, then assign them to the relevant buttons.
  4. Register the events with the Control Framework and as ABAP Objects events.

 

 

Leaving content frame