A text field is a rectangular screen area where text is displayed. As a developer, you can assign labels or keywords to other elements in text fields. These keywords are only for display and cannot be changed at runtime. Additionally, text fields can contain lines, icons, and other static elements.
TEXT FIELDS: ATTRIBUTE
This slide illustrates four text field attributes:
General attribute consists of Name, Text, Icon Display, Start Position, Size, Modification groups, and Context menu.
The Dictionary attribute allows you to get information from the ABAP Dictionary, while the Program attribute contains Output options and manages the various output options.
The Display attribute allows you to display font as bright or invisible. It can be a label or a web display property.
CREATING TEXT FIELDS
To create a text field, you can
insert a text object in the work area and enter the text in the Text attribute in the Layout Editor directly; or
use the accompanying text of a data element from the ABAP Dictionary.
When you use fields from the ABAP Dictionary structures on the screen, the system by default exhibits the data element and the template for the Input and Output fields on the screen.
A status Icon is an output field that contains an icon. As shown here, either of the two icons will be relevant at run time.
Icons allow you to indicate a status in your application. They are predefined in the system and consist of two to four characters.
STATUS ICON: ATTRIBUTE
Status icons are special output fields that display icons. Attributes such as Visible length, Intensified, and Invisible can be changed dynamically.
CREATING STATUS ICON
You can create a status field only in the graphical Layout Editor. This is because a status field is defined as an output field with an icon.
Now let us go through the steps for creating a status field:
In the ABAP program, place a field with the same name as the screen field using the Text Field from the ICONS structure.
Use ICON_CREATE function module to assign the required icon to this field.
At runtime, this file contains the name of the icon you wish to display.
FILLING A STATUS ICON
The option for filling the Status Icons is also available in the ABAP program. You can select the icon you want to display from this program. It is important to first determine the technical name of the icon before the screen is displayed by calling a module in the PBO event. You can also recover the technical name of an icon using the ICON_CREATE function module in the PBO event. You must transfer the name of the icon along with a text to be displayed with the icon to the function module. It then returns the technical name of the icon.
Group boxes encircle a selection of elements that belong together including a group of fields or a radio button group. They only serve as display elements by which the user can associate elements on the screen. Group boxes contain a title.
GROUP BOX :ATTRIBUTE
The screen system table helps you change Visible length and Invisible attributes.
A group box may also possess other screen elements. If you set the screen attribute runtime compression, then the system does not display group box when it only contains invisible elements.
CREATING GROUP BOXES
You can define group box in the Layout Editor with a name and a heading. Its text can be changed dynamically by activating the output field attribute and creating a global data field in the ABAP program with the same name. Any changes to the field content will automatically reflect on the screens, as is the case with input or output fields.