Methods and Properties of UI Elements

Use

One Get method and one Set method exists for the property of a user interface element:

Set and Get Methods

  • The Set methods set the value of a property or an element. If a property is readOnly, then this method is not implemented.

    The name of the method is created according to the following schema: SET_<runtime name of property>

  • The Get methods return the value of a property or an element.

    The name of the method is created according to the following schema: GET_<runtime name of property>

Data Binding Methods

If a property can, or must be bound to the context, the respective Bind and Bound methods are available.

  • The Bind methods bind the value of a property to the context element specified by the path.

    The name of the method is created according to the following schema: BIND_<runtime name of property>

  • The Bound methods return the path of the context element to which a property is bound and return NULL if no binding exists.

    The name of the method is created according to the following schema: BOUND_<runtime name of property>

More information:Data Binding Concepts

Methods for Event Handling

  • The Get methods return the value of an event. The name of the method is created according to the following schema: GET_<runtime name of event>

  • The Set methods set the value of an event. The name of the method is created according to the following schema: SET_<runtime name of event>

  • The Map methods return the parameter mapping for an event. The name of the method is created according to the following schema: MAP_<runtime name of event>

Methods for Aggregations

If an interface element using aggregations can contain other elements, the following methods are available:

  • Two Add methods that add an element.

    • If only the element is transferred as parameter, then the element is added at the and of a list

    • If an index is transferred as well, then this element is transferred at the specified index position.

    The name of both methods is created according to the following pattern: ADD_<runtime name of element>

  • The Get methods are used to determine the allocation to the superordinate or subordinate elements. The name of the method is created according to the following schema: GET_<runtime name of elements>

  • The Has methods test whether aggregated elements exist within this element. The name of the method is created according to the following schema: HAS_<runtime name of elements>

  • The Remove methods remove the respective aggregated elements. These are retained, and can later be added to the current element again.

    You can delete individual or all elements.

    • On individual elements, you can either transfer the index or the ID, the method is created according to the following scheme: REMOVE_<runtime name of element>.

    • If you want to remove all the elements, use a method created according to the following scheme: REMOVE_ALL_<runtime name of elements>

IDs of View Elements

Use the following characters for the IDs of view elements:

  • Uppercase letters

  • Digits

  • Special characters _ and /

    Use / only in connection with namespaces, that is, an ID can have the following format /<namespace>/<name>, whereby neither <namespace> nor <name> are allowed to contain any / characters.

Standard Parameters

  • ID

    ID of the UI element to be triggered (that is, the element belonging to the event)

  • CONTEXT_ELEMENT

    CONTEXT_ELEMENT is of type IF_WD_CONTEXT_ELEMENT, which directly contains the pointer to the context element in question. This is the context element of the dataSource of a Table or MultiPane, for which the event has been triggered:

    • If the element is located in a Table, the context element is the element from the row in which the action was triggered (vertical coordinate).

    • If the element is located in a MultiPane, the context element is the element from the pane (cell) in which the action was triggered (vertical coordinate).

    • If the element is neither in a Table nor in a MultiPane, it is set to initial.

UI Element Properties and Their Binding

The Boolean values of Web Dynpro ABAP can be found in domain WDY_BOOLEAN. This domain is used as a substitute for real Boolean types. X stands for true. No entry stands for false.

Forms

You can use a TextView with design=GroupTitle for a form header. To do this you set the surrounding TransparentContainer to isLayout = false, and assign the same text to its accessibilityDescription as for the groupTitle. You have to do this because a TextView with design=GroupTitle cannot be read by the screen reader programs.

Note the following:

Object

Used for

TextView UI element

Sighted users

Property accessibilityDescription

Screen readers

Primary Property

See Primary Property

Properties that do not have to be bound and that can be changed by clients

See Properties Used in MultiPane or TablePopin

Predefining Values of Specific UI Elements in Context of Personalization

As part of personalization end users and administrators can predefine values for certain UI elements. This means, for example, that for a given InputField, the end user or administrator can define a value, then call the context menu, and select the menu option Use Current Value as Default Value. When the system is next started, this value is accepted as if the user had just keyed it in.

This function is available for the following UI elements and their properties:

UI Element

Property

InputField

value

CheckBox

checked

TextEdit

value

DropDownByKey

SelectedKey

DropDownListBox

SelectedKey

ToolBarDropDownByKey

SelectedKey

ToolBarDropDownListBox

SelectedKey

Data Segments in the Context

See Data Segments in the Context

Numeric Specifications for CSS Sizes

For the frequently used properties, width and height, the specifications in CSS sizes can be made in em, ex, pixel or percentages. You can choose between absolute specifications (for instance, millimeters) and relative specifications (for instance percentage compared to normal). The following abbreviations are available:

Key

Description

em

Reference to the size of the font

ex

Reference to the height of the lower-case letter x in this element

px

Pixel value This value depends on the pixel density of the output device

%

Percentage value

Depending on the CSS property, this can be in relation to:

  • The size of the inherent element

  • The size of the parent element

  • A general context

More information about numeric specifications for CSS sizes can be found in the Internet, for instance, http://de.selfhtml.org/Information published on non-SAP site.

Recommendations for Absolute and Relative Values for Sizes (Height, Width)

  • %

    You can specify percentages for the frequently-used width and height properties to assign your screen a horizontal structure or to use the full available width of the browser window. Keep in mind that the percentage for the width or height of an embedded UI element relates to the width or height of the surrounding container and not to the width or height of the browser window. The width or height percentage for LayoutData of an embedded UI element relates to the layout of the surrounding container.

    For more information, see SAP Note 1266588 Information published on SAP site.

  • px (Pixel)

    Note that problems may occur if the user changes the size of the font.

  • ex (height of character x)

    Value that is relative to the font size. We recommend this unit of measure. You can use it for the width, for example, of a TableColumn.

Recommendations for Table s:

  • Specify a width for the table, for instance, 40ex or 100%.

  • Use tableLayoutFixed to prevent the Table becoming narrower or wider, depending on the content.

  • If the width is known, or you want to truncate long text, use ex specifications for TextView s, DropDown lists, and InputFields.

Deprecated Objects

Certain functions, UI elements, properties, events and the like are flagged as deprecated in the system. This means the following:

  • The function in question still exists, but should no longer be used

  • As of SAP NetWeaver 7.10 and SAP NetWeaver 7.11, View Designer issues a warning if deprecated properties are used.

  • In most cases, there is a suitable replacement with the same values for the functionality in question. For more information, see the long text for the warning in View Designer (as of SAP NetWeaver 7.10 and SAP NetWeaver 7.11).

We reserve the right to remove deprecated functionalities in later releases.

More information:

Deprecated Objects