Skip to end of metadata
Go to start of metadata

Introduction

The control framework was introduced in SAP 4.5b at the same time than ABAP Objects, to improve the rendering and conviviality of screens. For example, before that, hierarchical data was rendered using monospaced characters and spaces were used to indent child nodes, and text input was only possible using input fields limited to 128 characters maximum.

The application logic runs on the SAP application server (automation client), which drives the custom control (automation server) at the frontend.

A Control is the application running on the frontend, which is in charge to display data transmitted by the SAP system. For example, there are the following controls: ALV Grid, TextEdit, HTML Viewer, Tree, etc. (see list next chapter).

A control on the frontend side can be accessed by an ABAP program through a corresponding ABAP Object class on the server side.

Here are the steps to work with an X control:

  • A classic screen must be created with a special area named "custom container" at a given position and a given size
  • During the Process Before Output event (just before the screen is displayed), once:
    • A custom container control must be instantiated using ABAP Object and the name of the custom container in the screen must be transmitted to the custom container control
    • The X control must then be instantiated and assigned to the custom container, and data are sent to the control through method calls
    • It is also possible to ask the control to react to some events and trigger an ABAP Object Event in the ABAP program (without triggering the Process After Input event)
  • In the Process After Input event (just after a function key of the screen (or the control) is pressed), or during the ABAP Object Event processing, the data from the control may be read through method calls

Links:

Container controls

As briefly introduced above, SAP provides other container controls. They are used to contain and arrange other controls. They are:

Control name

Class

Description

SAP Custom Container

CL_GUI_CUSTOM_CONTAINER

The SAP Custom Container allows you to display controls in an area defined on a normal screen using the Screen Painter

SAP Dialog Box Container

CL_GUI_DIALOGBOX_CONTAINER

The SAP Dialog Box container allows you to display controls in an amodal dialog box or fullscreen

SAP Docking Container

CL_GUI_DOCKING_CONTAINER

The SAP Docking Container allows you to attach a control to any of the four edges of a screen as a resizable screen area. You can also detach it so that it becomes an independent amodal dialog box

SAP Splitter Container

CL_GUI_SPLITTER_CONTAINER
(or CL_GUI_EASY_SPLITTER_CONTAINER)

The SAP Splitter Container allows you to display more than one control in a given area by dividing it into cells. The Easy splitter is used to divide the area into two cells

List of controls to put inside containers

Control

Class

Description

ALV Grid Control

CL_GUI_ALV_GRID

 

SAP Calendar Control

CL_GUI_CALENDAR

 

SAP HTML Viewer

CL_GUI_HTML_VIEWER

If you want to create an HTML page, use Dynamic Document control below

SAP Picture

CL_GUI_PICTURE

 

SAP Textedit

CL_GUI_TEXTEDIT

 

SAP Toolbar

CL_GUI_TOOLBAR

 

SAP Tree (prefer to use SAP Tree Model)

CL_GUI_SIMPLE_TREE,
CL_GUI_COLUMN_TREE,
CL_GUI_LIST_TREE

 

SAP Tree Model

CL_SIMPLE_TREE_MODEL,
CL_COLUMN_TREE_MODEL,
CL_LIST_TREE_MODEL

 

Desktop Office Integration

Object is instantiated by C_OI_CONTAINER_CONTROL_CREATOR methods, it may be manipulated via the following interfaces:
I_OI_WORD_PROCESSOR_DOCUMENT,
I_OI_FORM,
I_OI_MAIL_MERGE,
I_OI_SCRIPT_COLLECTION,
I_OI_SPREADSHEET,
I_OI_PIVOT,
I_OI_DOCUMENT_VIEWER

inline display of excel, word, and other documents using OLE-enabled applications

Dynamic Documents

CL_DD_AREA,
CL_DD_DOCUMENT,
CL_DD_FORM_AREA,
CL_DD_TABLE_ELEMENT,
CL_DD_TABLE_AREA,
CL_DD_BUTTON_ELEMENT,
CL_DD_INPUT_ELEMENT,
CL_DD_SELECT_ELEMENT

Builds HTML pages, used to replace obsolete list processing. Uses the HTML viewer

 

CL_GUI_BARCHART

Wrapper for Barchart. Check demo program BARCBO01

 

CL_GUI_SELECTOR

Color Selector (as avaliable in Smartforms). Check demo program DEMO_COLORSEL

FAQ

Where are some good examples of using controls in ABAP?

Where are some good examples of using the CL_GUI_ALV_GRID?

Look at any program which starts with BCALV*. Also look at the Reuse Library (transaction SE83).

  • No labels