Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

SAP Screen Personas < >


 

Scripting API Documentation


SAP SCREEN PERSONAS KNOWLEDGE BASE - by Davis Voicescuks , Clemens Gantert , Regina Sheynblat , Sebastian Steinhauer , Kranthi Kumar Muppala

 For the latest API's documentation, please use SAP Screen Personas Scripting API Documentation Link:


Control Index

BasicComponent

Abstract root type for every defined object type.

Properties

Name

Type

Access

Style

Description

type

String

r

 

Type name of this component. This is identical with the type name used in this description.

FioriStatusBar extends GuiVContainer

Status bar used in main windows to display messages and status info with Fiori theme.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

messageId

String

r

 

Name of the message class used in the ABAP message call.

messageNumber

String

r

 

Name of the message number used in the ABAP message call. It will usually be a number, but this is not enforced by the system.

messageType

String

r

 

Message type. E Error, W Warning, S Success, I Information, Empty/NULL none

text

String

r

 

The current message's text. The property is read-only. Use method setMessage() to set this property indirectly.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

getMessageParameter(Number index)

String

Values of the parameters used to expand the placeholders in the message text definition in the data dictionary. The text property of the GuiStatusBar already contains the expanded text of the message. A maximum of 8 parameter values can be provided in the ABAP coding, so index should be in the range from 0 to 7. Returns null if parameter does not exist for current message.

setMessage(String messageText, String messageType) throws InvalidArgument

void

Sets the specified message text and type icon in the message bar. Supported message types are "S", "I", "W", "E", "X", and "A".
Exceptions:
InvalidArgument:

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

FioriTitleBar extends GuiVContainer

Title bar on a Fiori screen

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Background color of a group box header.

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiAtomicControl extends GuiVComponent

Base class for all atomic DYNPRO controls that cannot have children.

Properties

Name

Type

Access

Style

Description

associatedLabel

String

r

 

The value has to be a valid SID of a GuiLabel control. The association is supposed to be used for SAP Belize to align corresponding labels as well as for screen readers and drawing of a line in SAP GUI for Windows.

disabledBackgroundColor

String

rw

Yes

Background color for Disabled state

disabledFontColor

String

rw

Yes

Text color for Disabled state

enabled

Boolean

rw

 

Indicates whether or not a control is enabled. For DYNPRO controls that are disabled as per backend definition (enabled = false) the following applies: It is possible to set this property to "true" in scripting without raising an exception. However, subsequent reading of the property will yield the actual value of the property, namely "false". Also, the control will not react to the change, i.e. the control will still be displayed and behave like a disabled control. The scripting API does not check whether or not a control is enabled when other, logically dependent properties of the control are set. For example, in scripting it is possible to set the "text" property of a text field or the "selected" property of a check box even when the control is disabled. Backend-disabled DYNPRO controls are the exception to this rule, because an exception is thrown if one attempts to set a dependent property. Note that the type of exception depends on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

hoverBackgroundColor

String

rw

Yes

Background color for Hover state

hoverFontColor

String

rw

Yes

The text color applied when the mouse pointer hovers over the control.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiBox extends GuiVContainer

Group box (rectangle of lines used to group buttons etc). Note that this object is NOT a container (strange R/3 logic).

Properties

Name

Type

Access

Style

Description

backgroundHorizontalAlign

String

rw

Yes

background image horizontal alignment
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

backgroundImage

String

rw

Yes

Background image (URL of image).

backgroundRepeat

String

rw

Yes

Defines if background image is repeatable
Constants starting with session.constants.BG_REPEAT_ can be used for values.

backgroundStretch

String

rw

Yes

How to stretch background image
Constants starting with session.constants.STRETCH_ can be used for values.

backgroundVerticalAlign

String

rw

Yes

background image vertical alignment
Constants starting with session.constants.VERT_ALIGN_ can be used for values.

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not feet into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerBackgroundColor

String

rw

Yes

Background color of a group box's header. Note that both GuiBox.backgroundColor and GuiBox.backgroundImage affect the entire group box area (header and body). By setting GuiBox.headerBackgroundColor you can control the box's header color, superseding what was set by backgroundImage or backgroundColor.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

text

String

rw

 

Header text.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiButton extends GuiAtomicControl

A DYNPRO button.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBorderColor

String

rw

Yes

Defines the border-color for the content

hasIcon

Boolean

r

 

Indicates whether or not this control has an icon. The property is indirectly changed by assigning or removing an icon in the flavor editor or by manipulation of the properties iconId and iconUrl through scripting.

hoverBorderColor

String

rw

Yes

Defines the border-color for the content

hoverFontColor

String

rw

Yes

The text color applied when the mouse pointer hovers over the control.

iconId

String

rw

 

The id of the control's icon (or an empty string if there is no icon or an icon by virtue of property iconUrl). If this property is set, then the related property iconUrl is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconId" is not valid an error icon is displayed.

iconUrl

String

rw

 

SAPR3 URL for a customized icon (or an empty string if there is no icon or an icon by virtue of property iconId). If this property is set then the related property iconId is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconUrl" is not valid an error icon is displayed.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

press()

void

For standard GuiButton controls, this method triggers the standard click action in the ABAP backend. For custom buttons, this method executes the associated onClick script. Note that if a standard button has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onClick(GuiButton source)

This event is fired when someone clicks on the button control. Note: This event is also fired for custom controls, but not for standard controls when the press() method is called. For standard button controls with an onClick script, the script is executed first, before the standard onClick action is performed. The script can suppress the standard action by returning a Boolean true. Note: The default behavior is to perform the standard action when the script does not return any value. For the standard action to run without error, the script must ensure that the transaction, program, and screen are the same at the end of script execution as they were before script execution. If a script navigates to a different screen without returning to the originating screen, then it must return a Boolean true to prevent the execution of the standard action from causing an error.

GuiCTextField extends GuiTextField

Text field with combo button (used for F4 help etc). The combo button can either be permanent or visible only while the element has the focus.

Properties

Properties Inherited from GuiTextField:

borderColor, borderRadius, borderStyle, borderWidth, clickable ( Limitations:WIN:future, HTML:future.), disabledBorderColor, historyDisabled ( Limitations:WIN:future, HTML:future.), hoverBorderColor, maxLength, numerical ( Limitations:WIN:future.), outputField, readonlyBackgroundColor, readonlyBorderColor, readonlyFontColor, recommended, text

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign ( Limitations:WIN:future.), hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable ( Limitations:WIN:future, HTML:future.), contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiTextField:

pressF4(), showF4Help()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiTextField:

onChange()
,
onF4()

GuiCalendar extends GuiShell

Calendar control

Properties

Name

Type

Access

Style

Description

firstVisibleDate

String

r

 

First visible date in the calendar view. The date is given in the format 'YYYYMMDD'. Setting the property will an INFO_REQUEST(4) event if the new firstVisibleDate is outside the currently stored date interval.

focusDate

String

rw

 

Date that currently holds the focus. The date is given in the format 'YYYYMMDD'. Setting the property will trigger an INFO_REQUEST(4) event if the new focusDate is outside the currently stored date interval.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiCheckBox extends GuiToggleControl

Checkbox control.

Properties

Properties Inherited from GuiToggleControl:

flushing ( Limitations:WIN:future.), hasIcon ( Limitations:WIN:future.), iconId ( Limitations:WIN:future, HTML:future.), iconUrl ( Limitations:WIN:future, HTML:future.), inputElementFirst ( Limitations:WIN:future, HTML:future.), selected

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiToggleControl:

select()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiCollection extends BasicComponent

A scripting language independent collection. The collection is immutable and its index is 0-based.

Properties

Name

Type

Access

Style

Description

length

Number

r

 

Number of elements in Collection

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

elementAt(Number index)

BasicComponent

The element at the position "index" within the collection. Will return null if index is not valid.

GuiComboBox extends GuiAtomicControl

Dropdown listbox control. Allows to select entry from a predefined set of values or keys.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBackgroundColor

String

rw

Yes

Text color for Disabled state

disabledBorderColor

String

rw

Yes

Defines the border-color for the content

disabledFontColor

String

rw

Yes

Text color read-only fields

entries

GuiComboBoxEntryCollection

rw

 

Reading this property returns an instance of GuiComboBoxEntryCollection that contains a list of all possible values for this combo box. The returned collection is "detached" meaning that changing this collection does not have any direct effect on the combo box. However, it is possible to change a combo box's value set by assigning a changed collection to this property. When setting this property the following has to be considered: Setting this property for a custom (flavor-created) combo box: The provided GuiComboBoxEntryCollection defines the visible possible entries and their order. Setting this property for a standard (DYNPRO) combo box: As in the flavor editor the value set of standard combo box can only be reordered, their labels changed or entries can be removed. This means the provided GuiComboBoxEntryCollection must only contain entries whose keys already existed. Any entry with non-existent key will force a "KeyNotAllowed" exception. If the assigned object is not of type GuiComboBoxEntryCollection, then a "WrongCollectionType" exception will be thrown. If the assigned GuiComboBoxEntryCollection contains two or more instances of GuiComboBoxEntry with the same key, then a "DuplicateEntryKey" exception will be thrown. If the assigned GuiComboBoxEntryCollection does not contain the currently selected entry, then the combo box will revert to its unselected state ( The key property will be an empty string ).

flushing

Boolean

r

 

Flushing state: flushing components send an event to the application server when the user makes a choice.

hoverBorderColor

String

rw

Yes

Defines the border-color for the content

key

String

rw

 

The key value of the currently selected entry. An empty string signifies that no entry has been selected. Conversely, if an empty string is assigned to this property via script, the combo box will be reset to an unselected state.

readonlyBackgroundColor

String

rw

Yes

This property is deprecated with SAP Screen Personas 3.0 SP06.Text color for read-only fields |

readonlyBorderColor

String

rw

Yes

This property is deprecated with SAP Screen Personas 3.0 SP06.Border color for read-only fields |

readonlyFontColor

String

rw

Yes

This property is deprecated with SAP Screen Personas 3.0 SP06.Text color read-only fields |

recommended

Boolean

rw

 

Recommended state of this component. A recommended component must be filled in by the user before triggering the dialog step. If this property is "false", then an empty value option is displayed as selectable value at the bottom of the dropdown list.

showKeys

Boolean

r

 

If true show the keys for each entry. If explicitly set to false then do not. The default value is defined by the GUI settings for all GuiComboBoxes.

text

String

r

 

Overwritten from TextField. A GuiComboBox's selected value can only be read by the text property, but not set. For setting the selection use the key property.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onSelect(GuiComboBox source, String newKey)

This event is fired when the dropdown listbox's selected value is changed by the user. If the associated script returns a Boolean true value, then the event propagation is stopped and the backend is not informed that the selection event was raised on the client and the dropdown listbox's displayed, selected value reverts to its pre-selection value. If the script returns anything else ('undefined', 'null', an object, a string, etc.), then the event processing continues normally. Note: Within the handler script, "source.key" is the old key, the one that was selected before the selection was changed triggering the current onSelect event. "newKey" represents the key that was just selected.

GuiComboBoxEntry extends BasicComponent

Wrapper for a GuiComboBox key / value pair.

Properties

Name

Type

Access

Style

Description

key

String

r

 

Key of the combo box entry.

value

String

rw

 

Value of the combo box entry.

Properties Inherited from BasicComponent:

type

GuiComboBoxEntryCollection extends GuiMutableCollection

A mutable collection whose entry type is GuiComboBoxEntry.

Properties

Properties Inherited from GuiMutableCollection:

entryType

Properties Inherited from GuiCollection:

length

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

createComboBoxEntry(String key, String value)

GuiComboBoxEntry

Creates an instance of GuiComboBoxEntry that can be added this or another GuiComboBoxEntryCollection.

Methods Inherited from GuiMutableCollection:

add(), addAt(), removeAll(), removeAt()

Methods Inherited from GuiCollection:

elementAt()

GuiComponent extends BasicComponent

Generic GUI component. Just one more layer in UI hierarchy - specially for future Personas manipulation on all gui components.

Properties

Name

Type

Access

Style

Description

id

String

r

 

Control ID of the control.

parent

GuiComponent

r

 

The parent of an object is one level up in the runtime hierarchy. Note that a control within a group box (GuiBox) has this group box as parent. Proxy controls have their new embedding container as parent (and not their original parent).

parentID

String

r

 

This property is deprecated with SAP Screen Personas 3.0 SP03 and removed with SP05.This property contains the ID of the control's parent. The parent of an object is one level up in the runtime hierarchy. Note that a control within a group box (GuiBox) has this group box as parent. Proxy controls have their new embedding container as parent (and not their original parent). |

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

executeWebRequest(String requestMethod, String request, String requestArgs, String requestContent, String requestParams)

void

Creates and executes a generic RestGui request (command) with the provided parameters. This method is for internal use only, in particular for recorded scripts. This method is only relevant and functional in the SAP GUI for Html while in the SAP GUI for Windows and Java this method does nothing.

GuiConstants extends BasicComponent

A constants object that contains a collection of constants available in scripting. The only instance of this object can be accessed through 'session.constants'.

Name

Type

Value

Description

FONT_FAMILY_VERDANA

String

Verdana

 

FONT_FAMILY_CONSOLAS

String

Consolas

 

FONT_FAMILY_TIMESNEWROMAN

String

Times New Roman

 

FONT_FAMILY_IMPACT

String

Impact

 

FONT_FAMILY_ARIAL

String

Arial

 

FONT_FAMILY_LUCIDACONSOLE

String

Lucida Console

 

FONT_WEIGHT_NORMAL

String

normal

 

FONT_WEIGHT_BOLD

String

bold

 

FONT_STYLE_NORMAL

String

normal

 

FONT_STYLE_ITALIC

String

italic

 

FONT_SIZE_6

String

6px

 

FONT_SIZE_7

String

7px

 

FONT_SIZE_8

String

8px

 

FONT_SIZE_9

String

9px

 

FONT_SIZE_10

String

10px

 

FONT_SIZE_12

String

12px

 

FONT_SIZE_14

String

14px

 

FONT_SIZE_16

String

16px

 

FONT_SIZE_18

String

18px

 

FONT_SIZE_20

String

20px

 

FONT_SIZE_24

String

24px

 

FONT_SIZE_28

String

28px

 

FONT_SIZE_32

String

32px

 

FONT_SIZE_36

String

36px

 

DECORATION_OVERLINE

String

overline

 

DECORATION_LINETHROUGH

String

line-through

 

DECORATION_UNDERLINE

String

underline

 

BG_REPEAT_REPEAT

String

repeat

 

BG_REPEAT_NOREPEAT

String

no-repeat

 

HORIZ_ALIGN_LEFT

String

left

 

HORIZ_ALIGN_CENTER

String

center

 

HORIZ_ALIGN_RIGHT

String

right

 

VERT_ALIGN_TOP

String

top

 

VERT_ALIGN_MIDDLE

String

middle

 

VERT_ALIGN_BOTTOM

String

bottom

 

BORDER_STYLE_NONE

String

none

 

BORDER_STYLE_SOLID

String

solid

 

BORDER_STYLE_DOTTED

String

dotted

 

BORDER_WIDTH_0

String

0px

 

BORDER_WIDTH_1

String

1px

 

BORDER_WIDTH_2

String

2px

 

BORDER_WIDTH_3

String

3px

 

BORDER_WIDTH_4

String

4px

 

BORDER_WIDTH_5

String

5px

 

BORDER_WIDTH_6

String

6px

 

EVENT_VCOMP

Number

0

 

EVENT_VKEY

Number

1

 

EVENT_ENTER

Number

2

 

STRETCH_NONE

String

none

 

STRETCH_STRETCH

String

stretch

 

STRETCH_FIT

String

fit

 

STRETCH_FILL

String

fill

 

MESSAGE_OPTION_OK

Number

0

 

MESSAGE_OPTION_OKCANCEL

Number

1

 

MESSAGE_OPTION_YESNO

Number

2

 

MESSAGE_RESULT_CANCEL

Number

0

 

MESSAGE_RESULT_OK

Number

1

 

MESSAGE_RESULT_YES

Number

2

 

MESSAGE_RESULT_NO

Number

3

 

MESSAGE_TYPE_INFORMATION

Number

0

 

MESSAGE_TYPE_QUESTION

Number

1

 

MESSAGE_TYPE_WARNING

Number

2

 

MESSAGE_TYPE_ERROR

Number

3

 

MESSAGE_TYPE_NONE

Number

4

 

MODE_ONSELECT

Number

0

Tab was manually selected.

MODE_ONPROXY

Number

1

Tab is activated during proxy processing.

Properties

Properties Inherited from BasicComponent:

type

GuiContainerShell extends GuiShell

Generic container for control shells.

Properties

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

findById(String id)

GuiComponent

Retrieves a component in the component hierarchy tree below this container, using the unique ID of the component for the search. This method will iterate over child containers.

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiContextMenu extends GuiMenu

Context menu object. ContextMenu items are just normal Menu objects.

Properties

Properties Inherited from GuiMenu:

disabledBackgroundColor ( Limitations:JAVA:future, WIN:future, HTML:7.53.), enabled, fontColor ( Limitations:WIN:future.), headerBackgroundColor ( Limitations:JAVA:future, WIN:future, HTML:7.53.), hoverBackgroundColor ( Limitations:JAVA:future, WIN:future, HTML:7.53.), text

Properties Inherited from GuiVComponent:

backgroundColor ( Limitations:WIN:future, HTML:future.), clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiMenu:

select()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiControlToolBar extends GuiContainerShell

Toolbar, to be used in ALV grids or standalon OMRT toolbars as children of the user area.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

visible

Boolean

r

 

True if component is visible on client side, false else

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiCustomControl extends GuiVContainer

Dynpro element that can wrap external controls (beans). It serves as a boundary between the dynpro world and the control-enabling world.

Properties

Name

Type

Access

Style

Description

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiDialogShell extends GuiContainerShell

External dialog shell.

Properties

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiDockShell extends GuiContainerShell

Dockable shell container which lives around the user area.

Properties

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiDropDownButton extends GuiButton

Properties

Name

Type

Access

Style

Description

split

Boolean

r

 

If set to true then the button has a main action as well as a context menu that opens when being clicked on the triangle. The property cannot be changed.

Properties Inherited from GuiButton:

borderColor, borderRadius, borderStyle, borderWidth, disabledBorderColor, hasIcon, hoverBorderColor, hoverFontColor, iconId, iconUrl

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign ( Limitations:WIN:future, HTML:future.), hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

openMenu()

void

The execution of the method triggers the context/dropdown menu to be opened for the corresponding button. If property split=false, then press() and openMenu() have the very same effect.

Methods Inherited from GuiButton:

press()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiButton:

onClick()

GuiFrameWindow extends GuiComponent

Generic top level dynpro window.

Name

Type

Value

Description

EVENT_VCOMP

Number

0

 

EVENT_VKEY

Number

1

 

EVENT_ENTER

Number

2

 

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Background color of a visual control.

systemFocus

GuiVComponent

r

 

Specifies the component that the SAP system is currently seeing as being focused. This value is only valid for (standard) dynpro elements and might therefore differ from the focus as seen on the frontend.

title

String

r

 

Title of the window

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

findById(String id)

GuiComponent

Retrieves a component in the component hierarchy tree below this container, using the unique ID of the component for the search. This method will iterate over child containers.

findTemplatesById(String templateId)

GuiCollection

Finds all template instances for the given template ID. The returned collection (see GuiCollection ) contains objects of type GuiSimpleContainer ( which represent instances of the template). If no template instance can be found an empty collection is returned.

getProperty(String propertyName) throws IllegalAccess, InvalidArgument

String

This method returns the specified property's value. Both regular and style properties are supported. Only properties of JS types String, Boolean and Number are supported, whereas properties of complex types (e.g. GuiCollection) are not. Properties of type Number and Boolean will be converted to a string before they are returned. There are defined and undefined properties. Defined properties are all properties that are defined in this API documentation. Undefined properties, i.e. any property name that is not defined in this API documentation, can be used in conjunction with GuiVComponent.setProperty() to store meta information with a given control that can later be read with this method. If this method is used on an undefined property which was not previously set via GuiVComponent.setProperty(), then this method returns JS 'null'. If a defined property has not been set yet, neither by theme, flavor nor script, then this method returns JS 'null'. Note that this method exhibits special behavior for unsupported properties (see the documentation for GuiVComponent.setProperty() for more information on unsupported properties).
Exceptions:
IllegalAccess: The property to be read is marked as "write-only".InvalidArgument: The property to be be read is of complex type (e.g. GuiCollection).

sendVKey(Number vKey)

void

Sends a virtual key press on behalf of the user.

setProperty(String propertyName, String propertyValue) throws IllegalAccess, InvalidArgument

void

This method sets the specified property to the given value. Both regular and style properties are supported. Only properties of JS types String, Number, and Boolean can be set. If the property is of complex type (e.g. GuiCollection), or the property is marked as read-only, then this methods throws an exception. There are defined and undefined properties. Defined properties are all properties that are defined in this API documentation or are used by SAP Screen Personas internally. This method can be used with undefined properties, i.e. any property name that is not defined in this API documentation, to store additional, control-specific information with the specified control. This data can later be read with GuiVComponent.getProperty(). Such control specific data "lives" until the current flavor is changed. This contrasts with the session store (see GuiUtils.put() and GuiUtils.put()) whose data lives for the duration of the current session. For control-specific data storage it is strongly recommended to use an "Y_" or "Z_" as property name prefix to prevent collisions with internally used properties names and consequently caused side effects. The defined properties can be subdivided into supported and unsupported properties. A particular property can be supported in one GUI and be unsupported in another. In the majority of cases properties are supported in the SAP GUI for HTML and not supported in the SAP GUIs for Window and Java. Regarding defined, undefined, supported and unsupported properties, the following rules apply: If setProperty() is used on a defined, but unsupported property for the current GUI, then the GUI can ignore the call and the returned value of a subsequent getProperty() call is undefined. In this context, 'undefined' does not mean JavaScript 'undefined' but that the returned value may differ from a GUI that supports the property. If setProperty() is used on a defined property but the set value is unsupported by the current GUI, then the GUI can ignore the call and the returned value of a subsequent getProperty() call is undefined. Examples for unsupported values are: Use of an unsupported unit of measure: control.setProperty('fontSize', '20em') and use of any unit of measure in a nominally numeric property: control.setProperty('width','20%'). If setProperty() is used on an undefined property, then the set value is stored at the control level and can be accessed via the getProperty() method.
Exceptions:
IllegalAccess: The property to be set is defined as "read-only".InvalidArgument: The property to be set is of complex type (e.g. GuiCollection).

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onAfterRefresh(GuiFrameWindow source)

onAfterRefresh is called after every roundtrip with the ABAP backend, even on initial load of the page (after the onLoad script is executed). A roundtrip with the ABAP backend follows this lifecycle: onBeforeRefresh onLoad onAfterRefresh

onBeforeRefresh(GuiFrameWindow source, Number triggerType, GuiVComponent caller, String vkey, GuiVComponent focused)

The assigned script is executed after a dynpro control on the client has triggered an event which requires the ABAP backend to process the associated action. This event is fired on user action of standard controls only. It is not fired if flavor-created controls triggered an event or if a script triggered the event implicitly for example by invoking the GuiButton.press() method. Furthermore, technical events sending ok-codes starting with "%_GS" will not trigger onBeforeRefresh. Examples are Dataprovider load events, context menu load events and Personas ABAP layer events. If the associated script returns a boolean true value, then the started event processing is stopped, which means the standard action associated with this event is not performed. If the script returns anything else or ends without return statement, then the started event processing continues and the associated standard action is executed. The parameter "source" contains the window object to which the event handler script is attached. The parameter "triggerType" contains a numeric differentiator between the various possible triggers. Possible trigger type values are defined as constants for all window objects. Currently supported types are: EVENT_VCOMP, EVENT_VKEY, EVENT_ENTER The parameter "caller" is only provided if triggerType was EVENT_VCOMP. It contains the triggering object. The parameter "vkey" is only provided if the triggerType was EVENT_VKEY. It contains the corresponding function key . The parameter "focused" is only provided if triggerType was either EVENT_ENTER or EVENT_VKEY. It contains the control that held the focus when the event was triggered.

onLoad(GuiFrameWindow source)

The assigned script is executed if any of the following has changed since the last roundtrip: transaction, program, screen number, flavor, or the active window number has increased. The criteria "active screen number has increased" is meant to indicate that the onLoad event of a modal dialog window such as an F4 help is fired when it is opened (active window number increases from 'wnd0' to 'wnd1'), whereas the onLoad event of the main window is not fired when the modal window is closed (active window number decreases from 'wnd1' to 'wnd0'). This event can be used to do one-time initialization. The screen loading lifecycle is: onLoad onAfterRefresh

GuiGOSShell extends GuiContainerShell

GOS shell in title bar.

Properties

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiGridView extends GuiContainerShell

Grid implements a container for displaying and editing data in an ALV grid. The properties columns, selectedColumns and the methods getColumnIndex() and getColumnName() rely on the column order or a column index order. The the 0-based column index order is based on the existent (visible and hidden) column order from left to right (for left to right systems). This means the column index order takes into account the column order set by the applied flavor and can even change during runtime when a user changes the column order by dragging and dropping columns. Columns that are hidden are included in the index and appear in the index position that they held at the point in time when they were hidden in the flavor editor or through scripting during runtime. In other words, hiding a column does not affect column index order.

Properties

Name

Type

Access

Style

Description

columns

GuiCollection

r

 

Returns collection of columns (type GuiTableColumn). The GuiCollection is ordered according to the current column index order. Refer to the general description of this control type for more on column index order. The collection is "detached" which means that if a different flavor is applied or if the column order is changed during runtime by a user who drags and drops columns, then a previously read columns collection is outdated.

firstVisibleRow

Number

rw

 

Sets the first visible row (0-based index) of the table. Setting this property has the effect of scrolling.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerBackgroundColor

String

rw

Yes

Background color of a table header area. Note that GuiGridView.backgroundColor affect the entire table area (header and body). By setting GuiGridView.headerBackgroundColor you can control the table's header color, superseding what was set by backgroundColor.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

maxRows

Number

rw

 

Restricts the number of visible rows and indirectly controls the height of the table. Set this property to set a dynamic table's height instead of setting the table's 'height' property directly. It is allowed to set 'maxRows' to a value greater than the current number of visible rows because in dynamic DYNPRO scenarios the number of table rows may increase during runtime after a window resize which in turn makes it necessary for the system to apply the 'maxRows' restriction. Note that if 'maxRows' is greater than the actual number of rows then no empty rows are added.

rowCount

Number

r

 

The number of rows of data associated with the grid control. Not all of them may be visible. Vice versa, the number of data rows may be smaller than the number of visible rows in the grid.

selectedColumns

String

rw

 

This property represents the selected columns of the table. It is a concatenation of column indexes (0-based) or index ranges (index ranges separated by hyphen) separated by semicolon in arbitrary order (e.g. 2;5-7;1;23;9-11 ). Refer to the general description of this control type for more on column indices and column index order.

selectedRows

String

rw

 

This property is deprecated with SAP Screen Personas 3.0 SP03 and removed with SP05.Use selectedRowsAbsolute instead. This property represents the selected rows of the table. It is a concatenation of row indexes (0-based) or index ranges (index ranges separated by hyphen) separated by semicolon in arbitrary order (e.g. 2;5-7;1;23;9-11). The row index numbers in this string are relative to the visible rows meaning these numbers can go from 0 to visibleRowCount-1. This means that these row indices are unsuitable for use in other table methods such as getCellValue(), modifyCell(), etc. which is the reason why this property was marked deprecated and property selectedRowsAbsolute was created to replace it. |

selectedRowsAbsolute

String

rw

 

This property represents the selected rows of the table. It is a concatenation of row indexes (0-based) or index ranges separated by semicolon in arbitrary order. Ranges follow the format "<lower number>-<higher number>". Example: "2;5-7;1;23;9-11". The row index numbers in this string are relative to the entire set of rows meaning the numbers span from 0 to rowCount-1.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

visibleRowCount

Number

r

 

The number of visible rows. This property in conjunction with setting firstVisibleRow can be used for paging which is needed for the proper functioning of getCellValue() and modifyCell().

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

clearSelection()

void

Places all children in unselected state. Does not trigger the onSelect event.

doubleClick(Number rowIndex, String columnName) throws RowIndexOutOfRange, WrongColumnName

void

Simulates a mouse double click on the cell given by row and column. Fires a DBLCLICK_ROW_COL(3) event to the backend. The first row index is 0. Throws a runtime exception if the row number exceeds the stored range or no column with this columnId is found.
Exceptions:
RowIndexOutOfRange: WrongColumnName:

getCellValue(Number rowIndex, String columnName) throws RowIndexOutOfRange, WrongColumnName

String

This function returns the value of the specified cell. This method will only return values if the row is visible or in other words the following conditions are met: firstVisibleRow <= rowIndex < min( firstVisibleRow + visibleRowCount, rowCount) . Use property firstVisibleRow to page to the right set of rows before reading their values. If the specified cell is outside of the visible row range or the column does not exist, then an exception is thrown. Only cells that are currently editable can be manipulated by this method. Supported cell types are: text field, radio button, button, and check box. For radio button and check box cells the valid values are "X" for 'checked' and " " for 'unchecked'. For an unsupported cell type (such as combo box ) or a read-only cell, the method will throw an exception which will differ depending on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).
Exceptions:
RowIndexOutOfRange: WrongColumnName:

getColumnIndex(String columnName)

Number

Returns the 0-based order index of the column with the specified column name. Returns -1 if no column with the specified column name exists. For more on the column index see the description of control GuiGridView .

getColumnName(Number columnIndex)

String

Returns the column name for the specified 0-based order index. Returns null if the specified column index is out of bounds. For more on the column index see the description of control GuiGridView .

modifyCell(Number rowIndex, String columnName, String value) throws InvalidArgument, RowIndexOutOfRange, WrongColumnName

void

Sets the value in the given cell. The first row index is 0. Throws a runtime exception if the row number exceeds the stored range or no column with the specified name is found. This method will only work if the row is visible or in other words the following conditions are met: firstVisibleRow <= rowIndex < min( firstVisibleRow + visibleRowCount, rowCount) . Use property firstVisibleRow to page to the right set of rows before modifying their values. Only cells that are currently editable can be manipulated by this method. Supported cell types are: text field, radio button, button, check box, and combo box. For radio button and check box cells the valid values are "X" for checked and " " for unchecked. For performance reasons, the SAP GUI for HTML will throw RowIndexOutOfRange and WrongColumnName exceptions with a delay during a later scripting call.
Exceptions:
InvalidArgument: The parameters 'columnName' or 'value' are not strings or 'rowIndex' is not a positive integer.RowIndexOutOfRange: WrongColumnName:

selectAll()

void

This methods selects the whole grid content (i.e. all rows and all columns). It does not trigger the onSelect event.

setCellBackgroundColor(Number row, String columnId, String color)

void

This is an internal method that must not be used in user-created scripts. Behavior in user-created script is undetermined. Method for conditional formatting: method to modify cell background color. The row parameter is 0-based and must address a currently visible row.

setCellTextColor(Number row, String columnId, String color)

void

This is an internal method that must not be used in user-created scripts. Behavior in user-created script is undetermined. Method for conditional formatting: method to modify text color for specified cell. The row parameter is 0-based and must address a currently visible row.

setCurrentCell(Number row, String columnName) throws RowIndexOutOfRange, WrongColumnName

void

Sets the row and column index of the currently active grid cell. The first row index is 0-based. The title row has the special index -1. The row selection column that is sometimes visible at the left hand side of the grid view has the special column name "" (empty string).
Exceptions:
RowIndexOutOfRange: WrongColumnName:

setRowBackgroundColor(Number row, String color)

void

This is an internal method that must not be used in user-created scripts. Behavior in user-created script is undetermined. Method for conditional formatting: method to modify row background color. The row parameter is 0-based and must address a currently visible row.

setRowTextColor(Number row, String color)

void

This is an internal method that must not be used in user-created scripts. Behavior in user-created script is undetermined. Method for conditional formatting: method to modify text color for complete row. The row parameter is 0-based and must address a currently visible row.

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onConditionalFormat(GuiTableControl source)

The script to be executed for conditional formatting.

onSelect(GuiGridView source)

This event is fired if when a row selection is changed in any way. Table property "selectedRows" will be updated before the event handler script is called and can be used within the script to determine the updated current list of selectedRows.

GuiHost extends BasicComponent

GuiHost enables the communication with a surrounding environment like the Web-browser or NWBC. A singleton instance of GuiHost is available at session.host.

Properties

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

navigate(String semanticObject, String action, String parameters, Boolean inPlace) throws NotSupported

void

Enables object based navigation with variable parameter list. This method is not supported by the SAP Gui for Windows or Java. In other words, this sort of Fiori Launchpad navigation is only supported by the by SAP Gui for Html. If the parameter "inPlace" is true, then no new browser tab will be opened.
Exceptions:
NotSupported: SAP GUIs for Windows and Java will throw this exception.

publishData(String name, String type, String value)

void

The command allows to push data from the main screen to a side panel.

GuiHtmlViewer extends GuiShell

Simple HTML viewer control inside SAPGUI to show content of internal/external web sites.

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Background color disabled for this control because it is not supported. Reading this property in scripting will always return an empty sting and setting it will have no effect.

content

String

w

 

String containing the html to be displayed by the HTML viewer. If this property is non-empty, then it takes precedence over the url property and its associated document. This property cannot be read, only written.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

url

String

rw

 

Web address for HTML control. Note that this property is undetermined (and may vary between WebGui, Java and Windows Client) if the control's content was set via the content property.

visible

Boolean

r

 

True if component is visible on client side, false else

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiLabel extends GuiAtomicControl

Read-only text element.

Properties

Name

Type

Access

Style

Description

clickable

Boolean

rw

 

The clickable property allows to disable/enable any action (backend action or assigned scripts to the onClick event) when the label is clicked. Based on the value of this property, the label text will be underlined (true) or not.

disabledBackgroundColor

String

rw

Yes

Text color for Disabled state

disabledFontColor

String

rw

Yes

Text color for Disabled state

hasIcon

Boolean

r

 

Indicates whether or not this control has an icon. The property is indirectly changed by assigning or removing an icon in the flavor editor or by manipulation of the properties iconId and iconUrl through scripting.

hoverFontColor

String

rw

Yes

The text color applied when the mouse pointer hovers over the control.

iconId

String

rw

 

The id of the control's icon (or an empty string if there is no icon or an icon by virtue of property iconUrl). If this property is set, then the related property iconUrl is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconId" is not valid an error icon is displayed.

iconUrl

String

rw

 

SAPR3 URL for a customized icon (or an empty string if there is no icon or an icon by virtue of property iconId). If this property is set then the related property iconId is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconUrl" is not valid an error icon is displayed.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

press()

void

For standard GuiLabel controls, this method triggers the standard click action in the ABAP backend. For custom labels, this method executes the associated onClick script. Note that if a standard label has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onClick(GuiLabel source)

This event is fired when someone clicks on the label or when the label is selected and F2 is pressed. Note: This event is also fired for custom controls, but not for standard controls when the press() method is called. For standard labels with an onClick script, the script is executed first, before the standard onClick action is performed. The script can suppress the standard action by returning a Boolean true. Note: The default behavior is to perform the standard action when the script does not return any value. For the standard action to run without error, the script must ensure that the transaction, program, and screen are the same at the end of script execution as they were before script execution. If a script navigates to a different screen without returning to the originating screen, then it must return a Boolean true to prevent the execution of the standard action from causing an error.

GuiListContainer extends GuiScrollContainer

ABAP list container. Replacement container for a GuiUserArea in list mode. For now its only used for a POC in JavaGui

Properties

Properties Inherited from GuiSimpleContainer:

backgroundHorizontalAlign ( Limitations:WIN:future.), backgroundImage ( Limitations:WIN:future.), backgroundRepeat ( Limitations:WIN:future.), backgroundStretch ( Limitations:WIN:future.), backgroundVerticalAlign ( Limitations:WIN:future.), height, left, top, width

Properties Inherited from GuiVContainer:

tooltip ( Limitations:WIN:future, HTML:future.)

Properties Inherited from GuiVComponent:

backgroundColor ( Limitations:WIN:future.), clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible ( Limitations:WIN:future.)

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiSimpleContainer:

findByPlaceholderId()

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiMainWindow extends GuiFrameWindow

Main window for SAPGUI application. This control contains a menu bar, various button, tool and title bars, a user area and a status bar.

Constants Inherited from [GuiFrameWindow|#GuiFrameWindow:

EVENT_VCOMP
, EVENT_VKEY
, EVENT_ENTER

Properties

Name

Type

Access

Style

Description

backgroundHorizontalAlign

String

rw

Yes

background image horizontal alignment
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

backgroundImage

String

rw

Yes

Background image (URL of image).

backgroundRepeat

String

rw

Yes

Defines if background image is repeatable
Constants starting with session.constants.BG_REPEAT_ can be used for values.

backgroundStretch

String

rw

Yes

How to stretch background image
Constants starting with session.constants.STRETCH_ can be used for values.

backgroundVerticalAlign

String

rw

Yes

background image vertical alignment
Constants starting with session.constants.VERT_ALIGN_ can be used for values.

height

Number

r

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

width

Number

r

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiFrameWindow:

backgroundColor, systemFocus, title

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

resize(Number width, Number height, Number userAreaWidth, Number userAreaHeight)

void

Sends new window and user area dimensions to the ABAP backend to force it to recalculate the window layout. This method can be used in conjunction with suppressing the GuiMainWindow.onResize event to make the backend to layout and render enough data that the flavor author is certain can be displayed. For instance, in the case of an application where the number of table rows that are displayed changes depending on the window height. If other screen controls are hidden in the flavor there might be space for a bigger table than the backend calculates there is. All parameters are in pixels, 'userAreaHeight' and 'userAreaWidth' are optional i.e. may be 'null'.

Methods Inherited from GuiFrameWindow:

findById(), findTemplatesById(), getProperty(), sendVKey(), setProperty()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiFrameWindow:

onAfterRefresh()
,
onBeforeRefresh()
,
onEnter()
,
onLoad()

GuiMenu extends GuiVComponent

Menu element (which can either be a menu item, a sub-menu or a menu separator. This peculiar behavior is due to the form menus are treated within R/3).

Properties

Name

Type

Access

Style

Description

disabledBackgroundColor

String

rw

Yes

Background color for disabled state

enabled

Boolean

rw

 

Indicates whether or not a control is enabled. For GuiMenu controls that are disabled as per backend definition (enabled = false) the following applies: It is possible to set this property to "true" in scripting without raising an exception. However, subsequent reading of the property will yield the actual value of the property, namely "false". Also, the control will not react to the change, i.e. the control will still be displayed and behave like a disabled GuiMenu control. The scripting API does not check whether or not a control is enabled when other, logically dependent properties, e.g. the "text" property of the GuiMenu are set. Backend-disabled GuiMenu controls are the exception to this rule, because an exception is thrown if one attempts to set a dependent property. Note that the type of exception depends on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).

fontColor

String

rw

Yes

Text color of a menu item.

headerBackgroundColor

String

rw

Yes

Background color of the menu text area, superseding what was set by backgroundColor. headerBackgroundColor allows sub-menus to have a background color that is different from the containing menu's background color.

hoverBackgroundColor

String

rw

Yes

Background color for hover state

text

String

rw

 

Text value for text-based components.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

select()

void

Selects this menu item on behalf of the user. For sub menus or menu separators, this will have no effect.

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiMenuBar extends GuiVComponent

Menu bar, to be displayed in a frame window.

Properties

Name

Type

Access

Style

Description

fontColor

String

rw

Yes

This property is deprecated with SAP Screen Personas 3.0 SP05.Text color |

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiModalWindow extends GuiFrameWindow

Modal/Popup window for SAPGUI application.

Constants Inherited from [GuiFrameWindow|#GuiFrameWindow:

EVENT_VCOMP
, EVENT_VKEY
, EVENT_ENTER

Properties

Properties Inherited from GuiFrameWindow:

backgroundColor, systemFocus, title

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

close()

void

Closes a modal window from scripting

Methods Inherited from GuiFrameWindow:

findById(), findTemplatesById(), getProperty(), sendVKey(), setProperty()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiFrameWindow:

onAfterRefresh()
,
onBeforeRefresh()
,
onEnter()
,
onLoad()

GuiMutableCollection extends GuiCollection

A scripting language independent collection. A mutable collection offers methods to add or remove entries. It can contain the same entry object more than once.

Properties

Name

Type

Access

Style

Description

entryType

String

r

 

The type of entry this collection accepts.

Properties Inherited from GuiCollection:

length

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

add(BasicComponent entry) throws WrongEntryType

void

Appends the given entry at the end of the collection.
Exceptions:
WrongEntryType:

addAt(BasicComponent entry, Number index) throws WrongEntryType

void

Inserts the given entry at the specified, 0-based index. If the provided index position exceeds the current number of entries in the collection, then the entry is appended at the end of the collection.
Exceptions:
WrongEntryType:

removeAll()

void

Removes all entries from the collection.

removeAt(Number index) throws IndexOutOfRange

BasicComponent

Removes the entry at the specified, 0-based index from the collection and returns the removed entry.
Exceptions:
IndexOutOfRange:

Methods Inherited from GuiCollection:

elementAt()

GuiOKCodeField extends GuiAtomicControl

Special text entry field used for OK codes within the tool bar.

Properties

Name

Type

Access

Style

Description

text

String

rw

 

Text value for OK Code field.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiPasswordField extends GuiAtomicControl

Password field. Used to enter password by user.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBorderColor

String

rw

Yes

Defines the border-color for the content

hoverBorderColor

String

rw

Yes

Defines the border-color for the content

maxLength

Number

rw

 

Setting maxLength prevents end users from entering more text into the control than is allowed. It does not prevent the backend or personas scripts from doing the same - It does not change existing text in the control. For DYNPRO controls personas maxLength can not be larger than the original maxLength. Calls of that nature will be reverted to the original maxLength.

text

String

w

 

Overwritten from TextField because its not allowed to read the text of a password field.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiPicture extends GuiShell

Image implements a container for displaying images bitmaps, jpeg, tiff, png and gif.

Name

Type

Value

Description

STRETCH_NONE

String

none

 

STRETCH_STRETCH

String

stretch

 

STRETCH_FIT

String

fit

 

STRETCH_FILL

String

fill

 

Properties

Name

Type

Access

Style

Description

enabled

Boolean

rw

 

Indicates whether or not a control is enabled. For DYNPRO GuiPicture controls that are disabled as per backend definition (enabled = false) the following applies: It is possible to set this property to "true" in scripting without raising an exception. However, subsequent reading of the property will yield the actual value of the property, namely "false". Also, the picture will not react to the change, i.e. the control will still be displayed and behave like a disabled one.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

Yes

Image horizontal alignment. In SAP GUI for HTML it is converted into the custom style property textAlign.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

scroll

Boolean

rw

 

Enables scrollbars on GuiPicturs if the image size is bigger than the control size AND if stretch mode is 'none'.

stretch

String

r

 

Position of the image within the container.
Constants starting with session.constants.STRETCH_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

url

String

rw

 

The URL with which the displayed Image was loaded. Returns an empty string if the displayed image was loaded using an Icon or Image name (in this case use the property icon) or if no image is currently displayed.

verticalAlign

String

rw

Yes

Image vertical alignment
Constants starting with session.constants.VERT_ALIGN_ can be used for values.

visible

Boolean

r

 

True if component is visible on client side, false else

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

click()

void

For a standard GuiPicture control, this method triggers the standard action of a generic, single mouse click anywhere in the control in the ABAP backend. For custom pictures, this method executes the associated onClick script. Note that if a standard picture has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

clickControlArea(Number x, Number y)

void

For a standard GuiPicture control, this method triggers the standard action of a single click in the control at the given position within the control area (unit: pixel) in the ABAP backend. For custom pictures, this method executes the associated onClick script without propagating the x and y coordinates to the script. Note that if a standard picture has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

clickPictureArea(Number x, Number y)

void

For a standard GuiPicture control, this method triggers the standard action of a single click in the displayed picture at the given position in the picture coordinate system in the ABAP backend. Depending on display mode this doesn"t necessarily have to be the same as pixel coordinates. The coordinates always refer to the position within the original unscaled image. For custom pictures, this method executes the associated onClick script without propagating the x and y coordinates to the script. Note that if a standard picture has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiRFC extends BasicComponent

Calls via Personas ABAP layer any BAPI on the host system and any RFC on a remote system. API uses JSON strings to exchange data between the Gui and the JavaScript engine.

Properties

Name

Type

Access

Style

Description

functionName

String

rw

 

Name of the BAPI that has to be called.

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

clearAll()

void

Clear the whole RFC state. RFC object can be reused later on. Note: The functionName property is also cleared.

getExceptionText()

String

Returns the explanation why he exception occurred. Returns an empty string if no exception has occurred.

getExceptionType()

String

Returns the type of the exception, e.g. CX_SY_DYN_CALL_PARAM_MISSING. Returns an empty string if no exception has occurred.

getResult(String name)

String

Gets either a field, structure or table result by its parameter name. Only names of parameters that were previously requested with the requestResults() method can be used. The returned string is the JSON string of the object returned by method getResultObject(). Throws an exception if the requested result parameter does not exist or wasn't previously requested. The type of exception depends on the GUI used.

getResultObject(String name)

String

Gets either a field, structure or table result by name. Only names of parameters that were previously requested with the requestResults() method can be used. Simple result parameters are returned as string. Structure results are returned as JS object whose property names correspond to the structure's component names. Table results are returned as JS Arrays containing JS objects representing table rows. The table row objects are constructed like the objects returned for structure results. Throws an exception if the requested result parameter does not exist or wasn't previously requested. The type of exception depends on the GUI used.

requestResults(String list)

void

Because the interface of a BAPI might be large this method allows to request a list of dedicated fields, structures or tables as return values. Names of exporting, changing, or tables parameters can be used. Note: The expected format of the "list" parameter is a JS Array containing the strings of the names of the RFC parameters to be returned or this array's JSON representation. Example: "RESULT1", "RESULT2" or JSON.stringify("RESULT1", "RESULT2").

send()

void

Send RFC to the Personas ABAP layer. Successful execution of the remote call can be tested with methods getExceptionType() and getExceptionText().

setParameter(String name, String value)

void

Set any kind of a RFC parameter (field, structure, table). Names of importing, changing, or tables parameters can be used. For field parameters the set value must be of type string. For structure and table parameters either the actual object representation or the corresponding JSON string ( obtained by JSON.stringify() ) set. The object to set for a structure parameter must be a JS object whose property names correspond to the structure's component names. The object to set for a table parameter must be a JS Array containing JS objects representing the table rows. The table row objects are constructed like the objects used for structure parameters.

GuiRadioButton extends GuiToggleControl

Radio button, used for single selection from a button group.

Properties

Name

Type

Access

Style

Description

groupId

Number

r

 

Radio group id for this button. Only one button in a group can be selected. Only used in control conversion scenario

Properties Inherited from GuiToggleControl:

flushing ( Limitations:WIN:future.), hasIcon ( Limitations:WIN:future.), iconId ( Limitations:WIN:future, HTML:future.), iconUrl ( Limitations:WIN:future, HTML:future.), inputElementFirst ( Limitations:WIN:future, HTML:future.), selected

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiToggleControl:

select()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiScrollContainer extends GuiSimpleContainer

Generic scrollable container, can be used as scrolling area to host other controls.

Properties

Properties Inherited from GuiSimpleContainer:

backgroundHorizontalAlign ( Limitations:WIN:future.), backgroundImage ( Limitations:WIN:future.), backgroundRepeat ( Limitations:WIN:future.), backgroundStretch ( Limitations:WIN:future.), backgroundVerticalAlign ( Limitations:WIN:future.), height, left, top, width

Properties Inherited from GuiVContainer:

tooltip ( Limitations:WIN:future, HTML:future.)

Properties Inherited from GuiVComponent:

backgroundColor ( Limitations:WIN:future.), clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible ( Limitations:WIN:future.)

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiSimpleContainer:

findByPlaceholderId()

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiSearchHelp extends GuiVContainer

Personas ValueHelp control.

Properties

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiSession extends GuiComponent

An R/3 external modus, which serves as the runtime environment context for all controls within it. Basically, a session is the representation of an "ABAP thread" in the server. This object is only available for scripting. It does not exist in the flavor context.

Properties

Name

Type

Access

Style

Description

activeWindow

GuiFrameWindow

r

 

Returns the topmost main or modal window of the current session. This is the window the user is allowed to interact with.

constants

GuiConstants

r

 

Constants that can be used in scripting.

host

GuiHost

r

 

Reference to the GuiHost singleton instance.

info

GuiSessionInfo

r

 

Reference to the GuiSessionInfo singleton instance, which contains general information about the current session state.

utils

GuiUtils

r

 

Reference to the GuiUtils singleton instance.

viewport

PersonasViewport

r

 

Reference to the PersonasViewport singleton instance.

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

callTransaction(String tcode)

void

Send a Personas command to the ABAP layer which does the CallTransaction call. It is possible to return to the current transaction/context by "back"-commands.

createRFC(String function)

GuiRFC

Returns a new GuiRFC instance.

findById(String componentId)

GuiComponent

Returns component with specified id. Please note that the method may return a control even if no control with such an id exists in the current screen state. SAPGUI for Java and SAPGui for Windows will return a null object is this case. For existence checks please use GuiSession.idExists().

findByRestGuiId(String componentId)

GuiComponent

Returns component with specified id as defined by the RESTGUI. This method is only relevant and functional in the SAP Gui for Html while in the SAP Gui for Windows and Java this method does nothing and always returns null.

idExists(String componentId)

Boolean

Returns true if a component with the specified ID exists on the currently loaded screen. This method does not take into account the currently applied flavor. Only if the control with the specified ID is present in the original screen, then this method will return true. This is important for controls that were moved out of their original container such as a tab and this container is currently not active.

sendCommand(String okCode)

void

Sends an OKCode on behalf of the user.

sendPersonasCommand(String sXml)

void

Internal method to send a Personas command screen to the ABAP backend.

startTransaction(String tcode)

void

Method to start a new transaction inside current session.

Methods Inherited from GuiComponent:

executeWebRequest()

GuiSessionInfo extends BasicComponent

Information about the current state of the session.

Properties

Name

Type

Access

Style

Description

applicationServer

String

r

 

The host name of the SAP application server the GUI session is currently connected with.

client

String

r

 

The current logon client (mandant).

clientHeight

Number

r

 

Height of the client in pixels. Note that if the SAP GUI for HTML is embedded, for instance in a portal, then this property only reflects the SAP GUI portion of the browser screen.

clientWidth

Number

r

 

Width of the client in pixels. Note that if the SAP GUI for HTML is embedded, for instance in a portal, then this property only reflects the SAP GUI portion of the browser screen.

codepage

Number

r

 

The current SAP codepage number.

dateFormat

String

r

 

Contains the key of the current user's date format as maintained in transaction SU3. See also

http://help.sap.com/abapdocu_70/en/ABENCOUNTRY_FORMATS.htm

for more information.

decimalFormat

String

r

 

Contains the key of the current user's decimal format. Possible values are " " (="1.234.567,89"), "X" (="1,234,567.89"), and "Y"(="1 234 567,89").

flavorId

String

r

 

The ID (GUID) of the current flavor. Null if no flavor (i.e. the original screen) is active.

flavorName

String

r

 

The name of the current flavor. Null if no flavor (i.e. the original screen) is active.

guiType

Number

r

 

Provides the GUI runtime in which the current script is executed. Values are: 0 (= SAP GUI for Windows) 1 (= SAP GUI for Html) 2 (= SAP GUI for Java) 3 (= SAP Screen Personas Slipsteam Engine)

language

String

r

 

The current logon language.

program

String

r

 

ABAP program of the currently active window.

screenNumber

Number

r

 

ABAP dynpro screen number of the currently active window. Note that this property is unaffected by any methods of PersonasViewport but always reflects the original DYNPRO screen number.

systemName

String

r

 

The name of the SAP system the GUI session is currently connected with.

systemTimezone

String

r

 

Contains the system's time zone. This value is up to six characters long and corresponds to a value of component TZONE in table TTZZ.

transaction

String

r

 

Current server transaction name.

user

String

r

 

The current logon user.

userTimezone

String

r

 

Contains the current user's time zone as maintained in transaction SU3. This value is up to six characters long and corresponds to a value of component TZONE in table TTZZ. If the time zone is not maintained for the current user, then the property contains an empty string.

Properties Inherited from BasicComponent:

type

GuiShell extends GuiVComponent

Generic root control for all Shell/OMRT controls.

Properties

Name

Type

Access

Style

Description

shellId

Number

r

 

Unique ID identifying the GuiShell of an OMRT-control. It is assigned dynamically and can be used to access the control and its data in the backend, for instance by the use of a custom RFC. Example GuiRFC script: var shellId = session.findById("wnd0/usr/cntlBCALV_GRID_VERIFY_0100_GRID1/shellcont/shell").shellId; var rfc = session.createRFC("Z_FIND_CONTROL"); rfc.setParameter ("SHELLID", shellId); rfc.send(); Example for ABAP function module Z_FIND_CONTROL: FUNCTION Z_FIND_CONTROL.   data alv TYPE REF TO CL_GUI_alv_grid.   data control TYPE REF TO CL_GUI_control.   CALL METHOD CL_GUI_CFW=>GET_SUBSCRIBER_BY_ID     EXPORTING       SHELLID = shellid     IMPORTING       SUBSCRIBER = control     EXCEPTIONS       CNTL_ERROR = 1       OTHERS = 2.   * suppose the control is an ALV grid. Do type checking   alv ?= control.   * up from here the ALV-API can be used ENDFUNCTION.

visible

Boolean

r

 

True if component is visible on client side, false else

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiSimpleContainer extends GuiVContainer

Simple dynpro container (also known as subscreen).

Properties

Name

Type

Access

Style

Description

backgroundHorizontalAlign

String

rw

Yes

background image horizontal alignment
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

backgroundImage

String

rw

Yes

Background image (URL of image).

backgroundRepeat

String

rw

Yes

Defines if background image is repeatable
Constants starting with session.constants.BG_REPEAT_ can be used for values.

backgroundStretch

String

rw

Yes

How to stretch background image
Constants starting with session.constants.STRETCH_ can be used for values.

backgroundVerticalAlign

String

rw

Yes

background image vertical alignment
Constants starting with session.constants.VERT_ALIGN_ can be used for values.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

findByPlaceholderId(String placeholderId)

GuiVComponent

Finds the control which fills the placeholder with the specified placeholder ID. The method returns a JavaScript 'null' if there is no placeholder with this ID or if it wasn't filled. The placeholder ID is the relative segment of the absolute placeholder ID starting from the template's simple container ID. Example: The placeholder is embedded in a group box in the template. The absolute placeholder ID as seen in the advanced property pane in the template editor shows "wnd0/usr/subPersonas_154085084051027/boxPersonas_154085094437839/placePersonas_154085096321117". The placeholder ID is "boxPersonas_154085094437839/placePersonas_154085096321117".

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiSplitterShell extends GuiContainerShell

Splitter container implements multiple shell's containers.

Properties

Name

Type

Access

Style

Description

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiStatusBar extends GuiVComponent

Status bar, used in main windows to display messages and status info.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

messageId

String

r

 

Name of the message class used in the ABAP message call.

messageNumber

String

r

 

Name of the message number used in the ABAP message call. It will usually be a number, but this is not enforced by the system.

messageType

String

r

 

Message type. Possible values are "E" (Error), "W" (Warning), "S" (Success), "I" (Information), "A" (Abort), "X" (Exit), and empty string.

text

String

r

 

The current message's text. The property is read-only. Use method setMessage() to set this property indirectly.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

getMessageParameter(Number index)

String

Values of the parameters used to expand the placeholders in the message text definition in the data dictionary. The text property of the GuiStatusBar already contains the expanded text of the message. A maximum of 8 parameter values can be provided in the ABAP coding, so index should be in the range from 0 to 7. Returns null if parameter does not exist for current message.

setMessage(String messageText, String messageType) throws InvalidArgument

void

Sets the specified message text and icon in the message bar. Note that message will always be created as message type "Success", but the displayed icon can be controlled the provided messageType parameter. Supported values for the messageType parameter are "S", "I", "W", "E", and "A".
Exceptions:
InvalidArgument:

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiStickyNote extends GuiVComponent

Personas specific control to handle Sticky Notes. If the text on the note requires more space then space available in the note, then the text is auto-wrapped and vertical scrollbars should appear if required. No horizontal scrollbars are shown.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

collapsed

Boolean

rw

 

Defines whether or not this sticky note is collapsed or expanded.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerFontColor

String

rw

Yes

Title color

headerFontFamily

String

rw

Yes

Font name for used for the title.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

headerFontSize

String

rw

Yes

font size for text component. If the text with specified size does not feet into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

headerFontStyle

String

rw

Yes

Font style of a title
Constants starting with session.constants.FONT_STYLE_ can be used for values.

headerFontWeight

String

rw

Yes

Font weight of the title
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerTextDecoration

String

rw

Yes

Text decoration of the title
Constants starting with session.constants.DECORATION_ can be used for values.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

title

String

r

 

Title for current StickyNote

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiTab extends GuiVContainer

Container for tab related children.

Name

Type

Value

Description

MODE_ONSELECT

Number

0

Tab was manually selected.

MODE_ONPROXY

Number

1

Tab is activated during proxy processing.

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Base class for all visual UI elements on screen.

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBackgroundColor

String

rw

Yes

Text color for disabled state

disabledBorderColor

String

rw

Yes

Defines the disabledBorder-color for the content

disabledBorderRadius

String

rw

Yes

Defines the disabledBorder-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBorderStyle

String

rw

Yes

Defines the disabledBorder-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

disabledBorderWidth

String

rw

Yes

Defines the disabledBorder-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledFontColor

String

rw

Yes

Text color for disabled state

disabledFontStyle

String

rw

Yes

Text color for disabled state
Constants starting with session.constants.FONT_STYLE_ can be used for values.

disabledFontWeight

String

rw

Yes

Text color for disabled state
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

enabled

Boolean

rw

 

Indicates whether or not a control is enabled. For GuiTab controls that are disabled as per backend definition (enabled = false) the following applies: It is possible to set this property to "true" in scripting without raising an exception. However, subsequent reading of the property will yield the actual value of the property, namely "false". Also, the control will not react to the change, i.e. the control will still be displayed and behave like a disabled GuiTab control. The scripting API does not check whether or not a control is enabled when other, logically dependent properties such as the "text" property are set or methods such as select() of the GuiMenu are invoked. Backend-disabled GuiTab controls are the exception to this rule, because an exception is thrown if one attempts to set a dependent property or invoke a dependent method. Note that the type of exception depends on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not feet into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" and "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerBackgroundColor

String

rw

Yes

Background color of a group box's header. Note that both GuiBox.backgroundColor and GuiBox.backgroundImage affect the entire group box area (header and body). By setting GuiBox.headerBackgroundColor you can control the box's header color, superseding what was set by backgroundImage or backgroundColor.

headerBorderColor

String

rw

Yes

Defines the border-color for the content

headerBorderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

headerBorderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

headerBorderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

selectedBackgroundColor

String

rw

Yes

Text color for selected state

selectedBorderColor

String

rw

Yes

Defines the selectedBorder-color for the content

selectedBorderRadius

String

rw

Yes

Defines the selectedBorder-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

selectedBorderStyle

String

rw

Yes

Defines the selectedBorder-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

selectedBorderWidth

String

rw

Yes

Defines the selectedBorder-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

selectedFontColor

String

rw

Yes

Text color for selected state

selectedFontStyle

String

rw

Yes

Text color for selected state
Constants starting with session.constants.FONT_STYLE_ can be used for values.

selectedFontWeight

String

rw

Yes

Text color for selected state
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

selectedTextDecoration

String

rw

Yes

Text decoration for selected state
Constants starting with session.constants.DECORATION_ can be used for values.

text

String

rw

 

Tab item text.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

select()

void

Selects this GuiTab to be displayed. Note that executing this method will not lead onActivated event scripts to be executed.

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onActivated(GuiTab source, String mode)

JavaScript that is executed after a tab was activated. The source parameter contains the GuiTab that was activated. The mode parameter indicates what caused the tab to be activated. Currently, only the manual selection of the tab will fire this event (mode = GuiConstants.MODE_ONSELECT ).

GuiTabStrip extends GuiVContainer

Container for Tab children.

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Background color disabled for this control because it is not supported. Reading this property in scripting will always return an empty sting and setting it will have no effect.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

selectedTab

GuiTab

r

 

The currently selected tab.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiTableColumn extends GuiComponent

A column object for Grid and Table control

Properties

Name

Type

Access

Style

Description

historyDisabled

Boolean

r

 

The property indicates whether or not any text fields in this column show history during edit mode. See also GuiTextField.historyDisabled .

name

String

r

 

The name of the column that corresponds with the column name parameter in table methods, e.g. GuiTableControl.getCellValue(rowIndex, columnName ) or GuiTableControl.getColumnName(columnIndex).

selected

Boolean

rw

 

True if column is selected

title

String

rw

 

The column title

visible

Boolean

r

 

True if column is visible on client side, false in other case

width

Number

rw

 

Width value for Column. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8. The value 0 is equal to "invisible" column.

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

hide()

void

Hide component. Set visible for component to false.

show()

void

Show component. Set visible for component to true.

Methods Inherited from GuiComponent:

executeWebRequest()

GuiTableControl extends GuiVContainer

Table control, can contain all kinds of dynpro elements. The properties columns, selectedColumns and the methods getColumnIndex() and getColumnName() rely on the column order or a column index order. The the 0-based column index order is based on the existent (visible and hidden) column order from left to right (for left to right systems). This means the column index order takes into account the column order set by the applied flavor and can even change during runtime when a user changes the column order by dragging and dropping columns. Columns that are hidden are included in the index and appear in the index position that they held at the point in time when they were hidden in the flavor editor or through scripting during runtime. In other words, hiding a column does not affect column index order.

Properties

Name

Type

Access

Style

Description

columns

GuiCollection

r

 

Returns collection of columns (type GuiTableColumn). The GuiCollection is ordered according to the current column index order. Refer to the general description of this control type for more on column index order. The collection is "detached" which means that if a different flavor is applied or if the column order is changed during runtime by a user who drags and drops columns, then a previously read columns collection is outdated.

firstVisibleRow

Number

rw

 

Sets the first visible row (0-based index) of the table. Setting this property has the effect of scrolling. Note that for a GuiTableControl the highest possible value for this property, the maximum first visible row index is: rowCount - visibleRowCount. If it is attempted to set this property to a value between the maximum first visible row index and rowCount minus 1, then the system will adjust and use the maximum first visible row index instead. In this case reading this property will return the maximum first visible row index and not the number that was attempted to be set.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

headerBackgroundColor

String

rw

Yes

Background color of a table header area. Note that GuiTableControl.backgroundColor affect the entire table area (header and body). By setting GuiTableControl.headerBackgroundColor you can control the table's header color, superseding what was set by backgroundColor.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

maxRows

Number

rw

 

Restricts the number of visible rows and indirectly controls the height of the table. Set this property to set a dynamic table's height instead of setting the table's 'height' property directly. It is allowed to set 'maxRows' to a value greater than the current number of visible rows because in dynamic DYNPRO scenarios the number of table rows may increase during runtime after a window resize which in turn makes it necessary for the system to apply the 'maxRows' restriction. Note that if 'maxRows' is greater than the actual number of rows then no empty rows are added.

rowCount

Number

r

 

This property represents to number of rows in the table. For GuiTableControl, 'rowCount' is not necessarily the actual number of rows of data, but may include empty rows at the end of the table. To determine the actual number of rows of data, one must scroll to the last page of table an scan each row of the page for the first empty row. Scrolling is accomplished by setting the property GuiTableControl.firstVisibleRow . Empty rows can be identified by the fact that all text cells only contain underscore (="_") characters.

selectedColumns

String

rw

 

This property represents the selected columns of the table. It is a concatenation of column indexes (0-based) or index ranges (index ranges separated by hyphen) separated by semicolon in arbitrary order (e.g. 2;5-7;1;23;9-11 ). Refer to the general description of this control type for more on column indices and column index order.

selectedRows

String

rw

 

This property is deprecated with SAP Screen Personas 3.0 SP03 and removed with SP05.Use selectedRowsAbsolute instead. This property represents the selected rows of the table. It is a concatenation of row indexes (0-based) or index ranges (index ranges separated by hyphen) separated by semicolon in arbitrary order (e.g. 2;5-7;1;23;9-11). The row index numbers in this string are relative to the visible rows meaning these numbers can go from 0 to visibleRowCount-1. This means that these row indices are unsuitable for use in other table methods such as getCellValue(), modifyCell(), etc. which is the reason why this property was marked deprecated and property selectedRowsAbsolute was created to replace it. |

selectedRowsAbsolute

String

rw

 

This property represents the selected rows of the table. In GuiTableControl (unlike in a GuiGridView control) this property only represents the selected rows that are currently visible. There may be other selected rows which are outside of the current scroll area and therefore excluded from this property. If information of the selection state of currently not visible rows is needed, then is is necessary to "scroll" to the invisible rows by setting the firstVisibleRow property before reading the selecteRowsAbsolute property. It is a concatenation of row indexes (0-based) or index ranges separated by semicolon in arbitrary order. Ranges follow the format "<lower number>-<higher number>". Example: "2;5-7;1;23;9-11". The row index numbers in this string are relative to the entire set of rows meaning the indices span from firstVisibleRow to (firstVisibleRow+visibleRowCount-1).

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

visibleRowCount

Number

r

 

The number of visible rows. This property in conjunction with setting firstVisibleRow can be used for paging which is needed for the proper functioning of getCellValue() and modifyCell().

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

clearSelection()

void

Places all children in unselected state. Does not trigger the onSelect event.

getCell(Number rowIndex, String columnName) throws RowIndexOutOfRange, WrongColumnName

GuiAtomicControl

This function returns the control that sits in a the specified cell. This method will only return a control if the specified row is visible or in other words the following conditions are met: firstVisibleRow <= rowIndex < min( firstVisibleRow + visibleRowCount, rowCount). Set property firstVisibleRow to page to the right set of rows before before accessing their cells. If the specified cell is outside of the visible row range or the column does not exist, then an exception is thrown.
Exceptions:
RowIndexOutOfRange: WrongColumnName:

getCellValue(Number rowIndex, String columnName) throws RowIndexOutOfRange, WrongColumnName

String

This function returns the value of the specified cell. This method will only return values if the row is visible or in other words the following conditions are met: firstVisibleRow <= rowIndex < min( firstVisibleRow + visibleRowCount, rowCount). Use property firstVisibleRow to page to the right set of rows before reading their values. If the specified cell is outside of the visible row range or the column does not exist, then an exception is thrown. The following cell types are supported: text field, radio button, button, check box, combo box, and label. For combo boxes the method returns the selected options value, and not the key. Radio button and check boxes will either yield "X" for 'checked' and " " for 'unchecked'. For all other cell types the method returns the text value or when a icon is visible (which typically is only the case for read-only cells) the returned value has the following format: @<iconId>@<text>
Exceptions:
RowIndexOutOfRange: WrongColumnName:

getColumnIndex(String columnName)

Number

Returns the 0-based order index of the column with the specified column name. Returns -1 if no column with the specified column name exists. For more on the column index see the description of control GuiTableControl .

getColumnName(Number columnIndex)

String

Returns the column name for the specified 0-based order index. Returns null if the specified column index is out of bounds. For more on the column index see the description of control GuiTableControl .

modifyCell(Number rowIndex, String columnName, String value) throws InvalidArgument, RowIndexOutOfRange, WrongColumnName

void

Sets the value in the given cell. The first row index is 0. Throws a runtime exception if the row number exceeds the stored range or no column with the specified name is found. This method will only work if the row is visible or in other words the following conditions are met: firstVisibleRow <= rowIndex < min( firstVisibleRow + visibleRowCount, rowCount) . Use property firstVisibleRow to page to the right set of rows before modifying their values. Only cells that are currently editable can be manipulated by this method. Supported cell types are: text field, radio button, button, and check box. For radio button and check box cells the valid values are "X" for 'checked' and " " for 'unchecked'. For an unsupported cell type (such as combo box ) or a read-only cell, the method will throw an exception which will differ depending on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).
Exceptions:
InvalidArgument: The parameters 'columnName' or 'value' are not strings or 'rowIndex' is not a positive integer.RowIndexOutOfRange: WrongColumnName:

selectAll()

void

This methods selects the all visible selectable content (i.e. all visible rows if rows multi-select and all columns if columns are multi-select). It does not trigger the onSelect event.

setCellBackgroundColor(Number row, String columnId, String color)

void

This is an internal method that must not be used in user-created scripts. Its behavior in a user-created script is undetermined! Method for conditional formatting: method to modify cell background color. The row parameter is 0-based and must address a currently visible row.

setCellTextColor(Number row, String columnId, String color)

void

This is an internal method that must not be used in user-created scripts. Its behavior in a user-created script is undetermined! Method for conditional formatting: method to modify text color for specified cell. The row parameter is 0-based and must address a currently visible row.

setRowBackgroundColor(Number row, String color)

void

This is an internal method that must not be used in user-created scripts. Its behavior in a user-created script is undetermined! Method for conditional formatting: method to modify row background color. The row parameter is 0-based and must address a currently visible row.

setRowTextColor(Number row, String color)

void

This is an internal method that must not be used in user-created scripts. Its behavior in a user-created script is undetermined! Method for conditional formatting: method to modify text color for complete row. The row parameter is 0-based and must address a currently visible row.

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onConditionalFormat(GuiTableControl source)

The script to be executed for conditional formatting.

onSelect(GuiTableControl source)

This event is fired when a row selection is changed in any way. Table property "selectedRows" will be updated before the event handler script is called and can be used within the script to determine the updated current list of selectedRows.

GuiTextEdit extends GuiShell

Text edit Control implements a container for editing text

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

disabledBackgroundColor

String

rw

Yes

Background color for Disabled state

disabledBorderColor

String

rw

Yes

Defines the border-color for the content

disabledFontColor

String

rw

Yes

Text color for Disabled state

enabled

Boolean

rw

 

Indicates whether or not a control is enabled. For DYNPRO controls that are disabled as per backend definition (enabled = false) the following applies: It is possible to set this property to "true" in scripting without raising an exception. However, subsequent reading of the property will yield the actual value of the property, namely "false". Also, the control will not react to the change, i.e. the control will still be displayed and behave like a disabled control. The scripting API does not check whether or not a control is enabled when other, logically dependent properties of the control are set. For example, in scripting it is possible to set the "text" property of a text field or the "selected" property of a check box even when the control is disabled. Backend-disabled DYNPRO controls are the exception to this rule, because an exception is thrown if one attempts to set a dependent property. Note that the type of exception depends on the GUI and the exception may be thrown with a delay when a later scripting command is executed (in case of the SAP GUI for HTML).

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

hoverBackgroundColor

String

rw

Yes

Background color for Hover state

hoverBorderColor

String

rw

Yes

Defines the border-color for the content

hoverFontColor

String

rw

Yes

The text color applied when the mouse pointer hovers over the control.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

maxLength

Number

rw

 

Setting maxLength prevents end users from entering more text into the control than is allowed. It does not prevent the backend or personas scripts from doing the same - It does not change existing text in the control. For DYNPRO controls personas maxLength can not be larger than the original maxLength. Calls of that nature will be reverted to the original maxLength.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

visible

Boolean

r

 

True if component is visible on client side, false else

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiTextField extends GuiAtomicControl

TextBox input field (single line).

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

clickable

Boolean

rw

 

The clickable property allows to disable/enable any action (backend action or assigned scripts to the onClick event) when the label is clicked. Based on the value of this property, the label text will be underlined (true) or not.

disabledBorderColor

String

rw

Yes

Defines the border-color for the content

historyDisabled

Boolean

r

 

The property returns true if the history for a text field has been disabled and false if it is enabled (default).

hoverBorderColor

String

rw

Yes

Defines the border-color for the content

maxLength

Number

rw

 

Setting maxLength prevents end users from entering more text into the control than is allowed. It does not prevent the backend or personas scripts from doing the same - It does not change existing text in the control. For DYNPRO controls personas maxLength can not be larger than the original maxLength. Calls of that nature will be reverted to the original maxLength.

numerical

Boolean

rw

 

Setting numerical to true prevents end users from entering non-numerical characters into the control. It does not prevent the backend or personas scripts from doing the same - It does not change existing text in the control. For DYNPRO controls personas numerical="false" can not override numerical="true" from the backend. Calls of that nature will be ignored.

outputField

Boolean

r

 

If set to true, this text field is drawn in output field style (i.e. more like a label). This property cannot be set in the editor, in the editor enabled=false is used.

readonlyBackgroundColor

String

rw

Yes

Text color for read-only fields

readonlyBorderColor

String

rw

Yes

Border color for read-only fields

readonlyFontColor

String

rw

Yes

Text color read-only fields

recommended

Boolean

rw

 

Recommended state of this component. A recommended component must be filled in by the user before triggering the dialog step.

text

String

rw

 

Text value for text-based components.

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

pressF4()

void

This method emulates a click of the corresponding F4 help button. If applied to a custom input control, the onF4 event handler script is executed if it exists. If applied to a standard field, then the onF4 event handler script is executed if it exists. If no onF4 handler script exists, then the F4 help assigned in the backend is invoked.

showF4Help(String table, String field, String value)

void

This method opens the F4 help defined by the parameters "table" and "field". Parameters "table" and "field" define the F4 help to be opened. These parameters are mandatory. The parameter "value" specifies the initial value of the F4 help. If it is not provided, then the current value of the text property is taken instead.

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Signature

Description

onF4(GuiTextField source)

JavaScript that is executed if someone presses the F4 help button. If an onF4 event handler script is assigned to a DYNPRO F4 help field, then only the onF4 handler script is executed and the standard F4 help is not shown.

GuiTitleBar extends GuiVComponent

Title bar, displaying window title. The visibility of this component may depend on the Look and Feel settings.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderRadius

String

rw

Yes

Defines the border-radius. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

fontColor

String

rw

Yes

Text color

fontFamily

String

rw

Yes

Font name for text based component. The string contains comma separated list of font family names.
Constants starting with session.constants.FONT_FAMILY_ can be used for values.

fontSize

String

rw

Yes

font size for text component. If the text with specified size does not fit into control area it would be clipped out.
Constants starting with session.constants.FONT_SIZE_ can be used for values.

fontStyle

String

rw

Yes

Defines if font style is Italic
Constants starting with session.constants.FONT_STYLE_ can be used for values.

fontWeight

String

rw

Yes

Defines if font style is "bold" or "normal".
Constants starting with session.constants.FONT_WEIGHT_ can be used for values.

horizontalAlign

String

rw

 

Horizontal alignment of text (and icon if existing). Please note, this is not converted into a custom style property in SAP GUI for HTML.
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

text

String

rw

 

Text value for text-based components.

textDecoration

String

rw

Yes

Defines if font style is Underlined.
Constants starting with session.constants.DECORATION_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiToggleButton extends GuiButton

Controls of this type normally occur only as children of a GuiControlToolBar.

Properties

Name

Type

Access

Style

Description

groupId

Number

r

 

Group id for this button. If the groupId is defined (not empty) then only one button in a group can selected, otherwise, multiselection is possible.

selected

Boolean

rw

 

Selection state of the toggle button.

Properties Inherited from GuiButton:

borderColor, borderRadius, borderStyle, borderWidth, disabledBorderColor, hasIcon, hoverBorderColor, hoverFontColor, iconId, iconUrl

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign ( Limitations:WIN:future, HTML:future.), hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiButton:

press()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiButton:

onClick()

GuiToggleControl extends GuiAtomicControl

Generic two-state button for single or multiple selection.

Properties

Name

Type

Access

Style

Description

flushing

Boolean

r

 

Flushing state for this component. For flushing components, changing state by the user causes server communication.

hasIcon

Boolean

r

 

Indicates whether or not this control has an icon. The property is indirectly changed by assigning or removing an icon in the flavor editor or by manipulation of the properties iconId and iconUrl through scripting.

iconId

String

rw

 

The id of the control's icon (or an empty string if there is no icon or an icon by virtue of property iconUrl). If this property is set, then the related property iconUrl is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconId" is not valid an error icon is displayed.

iconUrl

String

rw

 

SAPR3 URL for a customized icon (or an empty string if there is no icon or an icon by virtue of property iconId). If this property is set then the related property iconId is reset to an empty string and the hasIcon property is set to true. If this property is assigned to an empty string through scripting, then no icon will be displayed and the "hasIcon" property yields 'false'. If the "iconUrl" is not valid an error icon is displayed.

inputElementFirst

Boolean

r

 

Defines if the input element is before or after the text + icon.

selected

Boolean

rw

 

Selection state of the toggle control (checked or unchecked). Changing this property in a custom control may fire the corresponding selection event of the control (see GuiCheckBox.onToggle or GuiRadioButton.onSelect ).

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor, disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign, hoverBackgroundColor, hoverFontColor, left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

select()

void

Puts the control into the 'selected' state. In case of a radio button, this will automatically unselect all other radio buttons in this button group. Invoking this method on a custom control will fire the corresponding selection event of the control but only if the selection truly changed. In other words, if the control is already selected, then invoking this method will not fire the corresponding event. For more information also see GuiCheckBox.onToggle or GuiRadioButton.onSelect .

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiToolBar extends GuiVContainer

Classic DYNPRO toolbar used as system or application toolbar.

Properties

Name

Type

Access

Style

Description

borderColor

String

rw

Yes

Defines the border-color for the content

borderStyle

String

rw

Yes

Defines the border-style. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_STYLE_ can be used for values.

borderWidth

String

rw

Yes

Defines the border-width. Supported ONLY by HTML client.
Constants starting with session.constants.BORDER_WIDTH_ can be used for values.

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiToolBarSeparator extends GuiVComponent

Toolbar separator to split buttons into logical groups.

Properties

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiTree extends GuiContainerShell

SAPGUI Tree control with different representations: classical tree, tree with table, etc.

Properties

Name

Type

Access

Style

Description

columnNames

GuiCollection

r

 

A collection of all column names. The value returned is an instance of the GuiCollection that contains entries of type string. This column names returned by this property can be used in any of the item based operations, such as getItemText(), doubleClickItem(), etc. The itemName parameter of these methods correspond to the column name from this collection. The first entry of the collection (index 0) contains the name of the column that contains the hierarchy tree.

height

Number

rw

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

left

Number

rw

 

Left position of this control. Metric is in 1/8 DYNPRO character. E.g. if the left position is 1 DYNPRO character the return value is 8.

selectedNode

String

rw

 

The node key of the currently selected node.

tooltip

String

rw

 

Personas tooltip text for this control.

top

Number

rw

 

Top position of this control. Metric is in 1/8 DYNPRO character. E.g. if the top position is 1 DYNPRO character the return value is 8.

topNode

String

rw

 

The node key of the first visible node.

width

Number

rw

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiShell:

shellId, visible

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

changeCheckbox(String nodeKey, String itemName, Boolean checked)

void

Changes the checkbox item state to the provided value.

clickLink(String nodeKey, String itemName)

void

Clicks a link item.

collapseNode(String nodeKey)

void

Collapses an expanded node.

doubleClickItem(String nodeKey, String itemName)

void

Double clicks an item.

doubleClickNode(String nodeKey)

void

Double clicks a node.

expandNode(String nodeKey)

void

Expands a collapsed node.

getCheckBoxState(String nodeKey, String itemName)

Boolean

Returns a boolean value that corresponds to the state of the checkbox.

getItemText(String nodeKey, String itemName)

String

Returns the text of the item corresponding to the provided node key and item name.

getNodes()

GuiCollection

A collection of node keys. The value returned is an instance of the GuiCollection that contains entries of type string. The node keys returned by this property correspond to all the nodes that are currently loaded in the frontend application. A node is loaded in the frontend application the first time it is made visible either by default or by expanding a parent node.

getParentNodeKey(String nodeKey)

String

Returns the node key of the parent node corresponding to the provided child node key.

getSubNodes(String nodeKey)

GuiCollection

A collection of node keys. The value returned is an instance of the GuiCollection that contains entries of type string. Th node keys returned by this property correspond to all the child nodes corresponding to the provided node key that are currently loaded in the frontend application. A node is loaded in the frontend application the first time it is made visible either by default or by expanding a parent node.

pressButton(String nodeKey, String itemName)

void

Presses a button item.

selectItem(String nodeKey, String itemName)

void

Selects an item.

selectNode(String nodeKey)

void

Selects a node corresponding to the provided node key.

unselectAll()

void

Clears all selections including node, item and column selections.

Methods Inherited from GuiContainerShell:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiUserArea extends GuiVContainer

User area, the area within a window where dynpro and all UI elements can be placed.

Properties

Name

Type

Access

Style

Description

backgroundHorizontalAlign

String

rw

Yes

background image horizontal alignment
Constants starting with session.constants.HORIZ_ALIGN_ can be used for values.

backgroundImage

String

rw

Yes

Background image (URL of image).

backgroundRepeat

String

rw

Yes

Defines if background image is repeatable
Constants starting with session.constants.BG_REPEAT_ can be used for values.

backgroundStretch

String

rw

Yes

How to stretch background image
Constants starting with session.constants.STRETCH_ can be used for values.

backgroundVerticalAlign

String

rw

Yes

background image vertical alignment
Constants starting with session.constants.VERT_ALIGN_ can be used for values.

height

Number

r

 

Vertical size of this control. Metric is in 1/8 DYNPRO character. E.g. if the height is 1 DYNPRO character the return value is 8.

visible

Boolean

r

 

The userarea cannot be hidden in Personas

width

Number

r

 

Horizontal size of this control. Metric is in 1/8 DYNPRO character. E.g. if the width is 1 DYNPRO character the return value is 8.

Properties Inherited from GuiVContainer:

tooltip

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

hide()

void

This method does not do anything if invoked for GuiUserArea.

Methods Inherited from GuiVContainer:

findById()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiUtils extends BasicComponent

An object that provides utility functionality like openUrl, showMessageBox, etc. A singleton instance of GuiUtils is available at session.utils.

Name

Type

Value

Description

MESSAGE_OPTION_OK

Number

0

 

MESSAGE_OPTION_OKCANCEL

Number

1

 

MESSAGE_OPTION_YESNO

Number

2

 

MESSAGE_RESULT_CANCEL

Number

0

 

MESSAGE_RESULT_OK

Number

1

 

MESSAGE_RESULT_YES

Number

2

 

MESSAGE_RESULT_NO

Number

3

 

MESSAGE_TYPE_INFORMATION

Number

0

 

MESSAGE_TYPE_QUESTION

Number

1

 

MESSAGE_TYPE_WARNING

Number

2

 

MESSAGE_TYPE_ERROR

Number

3

 

MESSAGE_TYPE_NONE

Number

4

 

Properties

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

alert(String message)

void

This method opens a modal popup displaying the specified message.

changeFlavor(String flavorGUID)

void

Switches the current flavor to the specified one.

changeFlavorAdaptive(String flavorGUID)

void

Switches the current flavor to the specified flavor. If the flavor is a part of an adaptive flavor stack, the flavor of the associated stack that matches the client's window size is selected instead.

changeToDefaultFlavor()

void

Switches to the default flavor of the currently logged on user.

changeToOriginalScreen()

void

Switches to the original screen where no flavor is applied.

confirm(String message)

Boolean

This method opens a modal popup displaying the specified message asking the user either to confirm by pressing the displayed "Ok"-button or to reject by pressing the "Cancel"-button. The return value is 'true' if confirmed and 'false' if rejected.

executeScript(String scriptId, GuiVComponent source)

Boolean

Executes a global script or another flavor script from within a script. Parameter "scriptId" is used to identify the script to be executed. The session object is available in the called script (variable name "session"). If the source parameter is not null, then it will be passed to the called script via the variable "source". The method returns a Boolean true if and only if the script returns a Boolean true. For all other script return values such as "undefined", "null", string values, object, etc., this methods returns a Boolean false.

executeScriptAsync(String scriptId, String data) throws NotSupported

void

This method is only available for the SAP GUI for HTML and Personas Slipstream Engine. The method executes the specified script in an asynchronous manner, i.e. the current script continues and finishes normally before the specified script is executed. After the asynchronous execution of the script, the screen is redrawn and - if applicable - the onLoad and onAfterRefresh scripts are executed. The called script has access to the session object and a variable named 'data' which was provided as second parameter to the method. Note that the 'data' parameter is optional but must be serializable with JSON.stingify() if provided. These features make this method uniquely suitable to be used within callbacks, e.g. for window.setTimout() or external libraries that require callbacks such as the bar code reader of the Apache Cordova library in SE. This method can also be used in event handlers of UI controls that are not part of the Personas or DYNPRO UI, for instance for the controls within a GuiHtmlViewer control. For this purpose the methods is made globally accessible as sap.personas.scripting.executeScriptAsync(). Parameter passing example: Separate script with ID "wnd0/scrptPersonas_abc", which will be called asynchronously: session.findById("<label ID>").text = data.param; The script that defines and registers the callback with an external library: function callback(callback_param){   var data = {param: callback_param};   session.utils.executeScriptAsync("wnd0/scrptPersonas_abc", data); } externalLibrary.registerCallback(callback);
Exceptions:
NotSupported: SAP GUIs for Windows and Java will throw this exception.

get(String key)

String

Returns a value from the session store. Returns null if there is no entry with the specified key in the session store.

getScriptById(String scriptId)

String

This methods returns the script source of the specified script. This can be used for script libararies, e.g. var lib = eval(session.utils.getScriptById('libraryScriptID')); lib.method1(); Returns null if script by the specified ID does not exist.

include(String scriptResourceId, Boolean alwaysExecute) throws ResourceNotFound, InvalidScript

String

This method is deprecated for the SAP GUI for HTML and Slipstream Engine in SP09 or later. New global scripts used exclusively for SAP GUI for HTML and/or Slipstream Engine should be created in Script Editor, and calls via API GuiUtils.executeScript method. For existing global scripts created before SP09 (via uploading of the script as resource in the admin transaction), we recommend that the scripts be migrated by recreating the global script in the script editor if they are used exclusively in SAP GUI for HTML and/or Slipstream Engine. For scripts uploaded as resource via the SAP Screen Personas admin transaction, this method can be used to call the script. The scriptResourceId refers to the ID of a valid resource that was created in the admin transaction. A resource is valid if it is text based and contains valid JavaScript code. If alwaysExecute is set to true then the specified global script is always executed when include is being called. Otherwise, it is only executed when the current method invocation is the very first time in the current session. Note: The parameter alwaysExecute only has an effect in the SAP GUI for HTML. In the SAP GUI for Windows and Java, alwaysExecute is ignored and the global script is executed every time. There are two ways of defining and using a library: a) the resource library defines global library objects when it is executed, b) the resource library returns one library object that is assigned to local variable in the caller script. a) Example of a global library that is defined by the resource script. Note that for the SAP GUI for Windows and Java the global library object is redefined during each "include"-call and that this global object only exists for the duration of the current script execution. mathLib = {   add: function(a,b) {     return a+b;   },   sub: function(a,b) {     return a-b;   } }; Example of the caller script using the library: session.utils.include("resource id", false); var sum = mathLib.add(1,1); b) Example for a library resource that returns a library object: return {   add: function(a,b) {     return a+b;   } ,   sub: function(a,b) {     return a-b;   } }; Example of a script using the library: var mathLib = session.utils.include("resource id", true ); var sum = mathLib.add(1,1);
Exceptions:
ResourceNotFound: InvalidScript:

log(String message)

void

Logs a message to the scripting log console.

logMeasurement(String collectionId, String data, String time)

void

Log a measurement document that can be used with the Personas analytics feature. Note that the parameter "data" is expected to be a map of properties (a javascript object) that was converted to a string with JSON.stringify(). In the SAP Gui for Html only, the original data object will also be accepted. The time parameter can either be 'null' or a string of the format "YYYYMMDDHHMMSS.MMM", e.g. "20160217163524.452". If the passed time parameter is 'null', then the client substitutes the current time.

openUrl(String url)

void

Opens an external browser window to display the provided URL's content. Microsoft Universal Naming Convention (UNC) paths are permitted too. Please note that backspace characters that typically occur in UNC paths have to be escaped by two backspace characters in JavaScript strings, e.g. session.utils.openUrl("\\\\server\\path
page.html") opens "\\server\path\page.html".

prompt(String message, String defaultValue)

String

This method opens a modal popup displaying the specified message asking the user to enter a text value. The method returns the user-entered value. It returns 'null' if the user cancels the popup.

put(String key, String value)

void

Puts a value into the session store. The key parameter must be a non-empty string. If an entry with that key exists then this entry will be overwritten or replaced by the currently specified value. Setting the value with null will remove the respecive key from the session store (if it exists).

resetFlavorState(String id, String property)

void

Resets controls' properties to the state defined in the active flavor. Both parameters "id" and "property" can be a JS null. If no parameter is set (i.e. set to JS null) then ALL properties of ALL controls are reset. If parameter "id" is set then only the properties of the corresponding control are reset. If only parameter "property" is set then the corresponding property is reset for all controls.

showOptionDialog(String title, String text, String msgIcon, String msgType, String onOptionDialogClose, String optionDialogId)

void

Opens an dialog to display a message. The function named "onOptionDialogClose" is called when the dialog is closed. This parameter can be null, in which case there will be no callback and the parameter optionDialogId is of no consequence. During callback, the callback function receives two parameters. The first parameter is the user's decision and second is the value of parameter optionDialogId that was passed during invocation. The function onOptionDialogClose has to be defined locally within the script and has to be named exactly "onOptionDialogClose". optionDialogId is optional and can be used to differentiate between option dialogs if more than one dialog is used in one script because there can only be one locally defined callback function named "onOptionDialogClose" which has to be used for each dialog in a script. Example: session.utils.showOptionDialog("My Dialog", "Do You want to continue (1) ?", session.utils.MESSAGE_TYPE_INFORMATION, session.utils.MESSAGE_OPTION_OKCANCEL, onOptionDialogClose, "1"); function onOptionDialogClose(dec, id){   session.utils.log("decision: "dec"\nid: "+id);   if(id=='1'){     session.utils.showOptionDialog("My Dialog", "Ok (2)?", session.utils.MESSAGE_TYPE_INFORMATION, session.utils.MESSAGE_OPTION_OK, onOptionDialogClose, "2");   } }

GuiVComponent extends GuiComponent

Base class for all visual UI elements on screen.

Properties

Name

Type

Access

Style

Description

backgroundColor

String

rw

Yes

Background color of a visual control.

clickable

Boolean

r

 

This property is deprecated with SAP Screen Personas 3.0 SP03 and removed with SP05.Clickable atoms should react with an selected event (F2) on a single mouse click |

contextMenuVisible

Boolean

rw

 

Handles the corresponding context menu visibility. This mean if this property is false, then no context menu will be displayed on a right-click. In case GuiVComponent is GuiUserArea, the default context menu is used. Note that context menus can still be opened in scripting through GuiVComponent.openContextMenu() even while this property is set to 'false'. Special Limitation of SAP GUI for Java: The property cannot be set through scripting.

highlighted

Boolean

rw

 

This property is deprecated with SAP Screen Personas 3.0 SP03 and removed with SP05.Indicates whether this component is visually highlighted. |

visible

Boolean

r

 

True if component is visible on client side, false else

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

closeContextMenu()

void

Closes the corresponding context menu if it is available. This methods does nothing in the SAP GUI for HTML.

getProperty(String propertyName) throws IllegalAccess, InvalidArgument

String

This method returns the specified property's value. Both regular and style properties are supported. Only properties of JS types String, Boolean and Number are supported, whereas properties of complex types (e.g. GuiCollection) are not. Properties of type Number and Boolean will be converted to a string before they are returned. There are defined and undefined properties. Defined properties are all properties that are defined in this API documentation. Undefined properties, i.e. any property name that is not defined in this API documentation, can be used in conjunction with GuiVComponent.setProperty() to store meta information with a given control that can later be read with this method. If this method is used on an undefined property which was not previously set via GuiVComponent.setProperty(), then this method returns JS 'null'. If a defined property has no value set by either the runtime, theme, flavor, or scripting, then this method returns: An empty string if the property is of type string (example: tooltip), or the default value as defined for the property if its type is either number or boolean. Check the property's documentation for the default value. Number properties that do not have a defined default value are always set by the runtime. Note that this method exhibits special behavior for unsupported properties (see the documentation for GuiVComponent.setProperty() for more information on unsupported properties).
Exceptions:
IllegalAccess: The property to be read is marked as "write-only".InvalidArgument: The property to be be read is of complex type (e.g. GuiCollection).

hide()

void

Hide component. Set visible for component to false.

openContextMenu()

void

Opens the corresponding context menu if it is available. This methods does nothing in the SAP GUI for HTML.

resetProperty(String propertyName)

void

If propertyName is provided, the property of the control is set to the value assigned in the flavor. The propertyName parameter is optional. If no propertyName is provided, all properties of the control are set to their respective values assigned in the flavor. Limitation: Requires SAP Screen Personas 3.0, Service Pack 7.

resetPropertyToOriginal(String propertyName)

void

If 'propertyName' is provided, the property of the control is set to the original value with no flavor changes. Parameter 'propertyName' is optional. If no 'propertyName' is provided, all properties of the control are set to their respective original values with no flavor changes which means for custom controls that they will be effectively deleted and disappear. Limitation: Requires SAP Screen Personas 3.0, Service Pack 7.

setFocus()

void

Sets the focus to this component.

setProperty(String propertyName, String propertyValue) throws IllegalAccess, InvalidArgument

void

This method sets the specified property to the given value. Both regular and style properties are supported. Only properties of JS types String, Number, and Boolean can be set. If the property is of complex type (e.g. GuiCollection), or the property is marked as read-only, then this methods throws an exception. There are defined and undefined properties. Defined properties are all properties that are defined in this API documentation or are used by SAP Screen Personas internally. This method can be used with undefined properties, i.e. any property name that is not defined in this API documentation, to store additional, control-specific information with the specified control. This data can later be read with GuiVComponent.getProperty(). Such control specific data "lives" until the current flavor is changed. This contrasts with the session store (see GuiUtils.put() and GuiUtils.put()) whose data lives for the duration of the current session. For control-specific data storage it is strongly recommended to use an "Y_" or "Z_" as property name prefix to prevent collisions with internally used properties names and consequently caused side effects. The defined properties can be subdivided into supported and unsupported properties. A particular property can be supported in one GUI and be unsupported in another. In the majority of cases properties are supported in the SAP GUI for HTML and not supported in the SAP GUIs for Window and Java. Regarding defined, undefined, supported and unsupported properties, the following rules apply: If setProperty() is used on a defined, but unsupported property for the current GUI, then the GUI can ignore the call and the returned value of a subsequent getProperty() call is undefined. In this context, 'undefined' does not mean JavaScript 'undefined' but that the returned value may differ from a GUI that supports the property. If setProperty() is used on a defined property but the set value is unsupported by the current GUI, then the GUI can ignore the call and the returned value of a subsequent getProperty() call is undefined. Examples for unsupported values are: Use of an unsupported unit of measure: control.setProperty('fontSize', '20em') and use of any unit of measure in a nominally numeric property: control.setProperty('width','20%'). If setProperty() is used on an undefined property, then the set value is stored at the control level and can be accessed via the getProperty() method.
Exceptions:
IllegalAccess: The property to be set is defined as "read-only".InvalidArgument: The property to be set is of complex type (e.g. GuiCollection).

show()

void

Show component. Set visible for component to true.

Methods Inherited from GuiComponent:

executeWebRequest()

GuiVContainer extends GuiVComponent

Generic visual container, i.e. an inner element of the object tree that can have a visual representation.

Properties

Name

Type

Access

Style

Description

tooltip

String

rw

 

Personas tooltip text for this control.

Properties Inherited from GuiVComponent:

backgroundColor, clickable, contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

findById(String id)

GuiComponent

Retrieves a component in the component hierarchy tree below this container, using the unique ID of the component for the search. This method will iterate over child containers.

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

GuiWrappingLabel extends GuiLabel

Read-only text element which displays a wrapping multiline text. If the text doesn't fit a tooltip is responsible to show the full text.

Properties

Name

Type

Access

Style

Description

hoverFontColor

String

rw

Yes

The text color applied when the mouse pointer hovers over the control.

text

String

rw

 

Text value for text-based components.

Properties Inherited from GuiLabel:

clickable ( Limitations:WIN:future, HTML:future.), disabledBackgroundColor ( Limitations:WIN:future, HTML:future.), disabledFontColor, hasIcon, hoverFontColor ( Limitations:WIN:future, HTML:future.), iconId ( Limitations:HTML:future.), iconUrl ( Limitations:HTML:future.)

Properties Inherited from GuiAtomicControl:

associatedLabel, disabledBackgroundColor ( Limitations:WIN:future, HTML:future.), disabledFontColor, enabled, fontColor, fontFamily, fontSize, fontStyle, fontWeight, height, horizontalAlign ( Limitations:WIN:future.), hoverBackgroundColor ( Limitations:WIN:future, HTML:future.), hoverFontColor ( Limitations:WIN:future, HTML:future.), left, text, textDecoration, tooltip, top, width

Properties Inherited from GuiVComponent:

backgroundColor ( Limitations:HTML:7.22.), clickable ( Limitations:WIN:future, HTML:future.), contextMenuVisible ( Limitations:WIN:future, HTML:7.53.), highlighted, visible

Properties Inherited from GuiComponent:

id, parent, parentID

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

press()

void

For standard GuiWrappingLabel controls, this method triggers the standard click action in the ABAP backend. For custom labels, this method executes the associated onClick script. Note that if a standard label has an additional (Personas) script attached to the onClick event, then this script is NOT executed!

Methods Inherited from GuiLabel:

press()

Methods Inherited from GuiVComponent:

closeContextMenu(), getProperty(), hide(), openContextMenu(), resetProperty(), resetPropertyToOriginal(), setFocus(), setProperty(), show()

Methods Inherited from GuiComponent:

executeWebRequest()

Events

Events Inherited from GuiLabel:

onClick()

PersonasViewport extends BasicComponent

The PersonasViewport class provides utility functionality to handle multiple viewports for a DYNPRO screen. A viewport can be considered as a virtual screen and each viewport has a number which ranges from 1 to 9999. Normally, flavor changes are stored and applied per current ABAP program and current screen number. When a new viewport is set through one of the PersonasViewport class's methods, only the flavor changes stored for the current ABAP program and viewport number instead of the actual underlying DYNPRO screen number are applied. Note that the current DYNPRO screen number which is unaffected by the application of a viewport can be determined through GuiSessionInfo.screenNumber (or in a script: session.info.screenNumber). From SP08 of SAP Screen Personas 3.0 and higher, a list of viewports and their order can be defined for each actual DYNPRO screen in the flavor editor.

Properties

Name

Type

Access

Style

Description

active

Number

r

 

Returns 0 if the original DYNPRO screen is active, otherwise returns the current viewport's number (1 to 9999).

Properties Inherited from BasicComponent:

type

Methods

Signature

Return Type

Description

next()

Number

Shows the next viewport and returns its number. In SP06 and SP07 of SAP Screen Personas 3.0, the use of this method is discouraged because it only adds one to the current viewport number and shows it, which can lead to confusing results. Use PersonasViewport.show() instead. If the currently active viewport number is 9999 then this method stays on the current viewport and returns 9999. From SP08 of SAP Screen Personas 3.0 and higher, this method shows the next viewport in the list of viewports associated with the actual underlying DYNPRO screen in the current flavor. A list of viewports and their order can be defined for each actual DYNPRO screen in the flavor editor. If the method is called while no viewport is applied (but the actual underlying DYNPRO is shown), then the methods shows the first viewport in the list and returns its screen number. If the method is called while the last viewport in the list is visible, then the method stays on the this viewport and returns its number. For flavors with viewports that were created in SP07 and are now executed in SP08, this method behaves just as in SP07. Please note it is still recommended to add the viewport meta data in the flavor editor for these upgraded flavors.

previous()

Number

Shows the previous viewport and returns its number. In SP06 and SP07 of SAP Screen Personas 3.0, the use of this method is discouraged because it only subtracts one from the current viewport number and shows it, which can lead to confusing results. Use PersonasViewport.show() instead. If the currently active viewport number is 1 then this method stays on the current viewport and returns 1. From SP08 of SAP Screen Personas 3.0 and higher, this method shows the previous viewport in the list of viewports associated with the actual underlying DYNPRO screen in the current flavor. A list of viewports and their order can be defined for each actual DYNPRO screen in the flavor editor. If the method is called while the first viewport in the list is visible, then the methods behaves like PersonasViewport.reset() , i.e. the actual underlying DYNPRO screen is shown and the method returns 0. If the method is called while no viewport is applied (but the actual underlying DYNPRO is shown), then the method stays on the actual DYNPRO and returns 0. For flavors with viewports that were created in SP07 and are now executed in SP08, this behaves just as in SP07. Please note it is still recommended to add the viewport meta data in the flavor editor for these upgraded flavors.

reset()

void

Resets that viewport and loads the actual underlying DYNPRO screen.

show(Number iViewport) throws InvalidArgument, UndefinedViewportException

void

Shows the viewport of the given number if 1 <= iViewport<= 9999. From SP08 of SAP Screen Personas 3.0, this method throws the exception 'UndefinedViewportException' if the viewport to be shown was not previously defined in the flavor editor. For flavors with viewports that were created in SP07 and are now executed in SP08, this method behaves just as in SP07, i.e. the viewport number is applied without checking if the viewport meta data exists. Please note it is still recommended to add the viewport meta data in the flavor editor for these upgraded flavors.
Exceptions:
InvalidArgument: The "iViewport" parameter is not a number or does not fall in the range of 1 and 9999.UndefinedViewportException: Only SP08 and later, the viewport has not been defined in the flavor editor.

Explanation of Limitations

Certain properties, methods, and events described in this document do not work in some of the supported GUIs. These are marked as "(Limitations: HTML:..., JAVA:..., WIN:...)". The meaning of "HTML", "JAVA", and "WIN" is given:

HTML

This is a limitation of the SAP GUI for HTML. Because this document is delivered as part of the software component that includes the SAP Screen Personas flavor editor
and the scripting engine, all properties in this document can be edited in the flavor editor and all properties and methods exist and can be used in scripts.
However, the proper functioning of certain properties and methods require a specific underlying ABAP kernel. In the case of events, an event is not fired unless a certain ABAP kernel is installed.
For example, "HTML: 7.53PL100" means that that you have to run a kernel releases 7.53, patch level 100 or higher for a so annotated event to be fired or
a so annotated property to produce the correct value or "do something" when changed.
"HTML: future" means it is currently unknown what release will support the so annotated feature.

WIN

This is a limitation of the SAP GUI for Windows. Certain properties and methods only exist in the SAP Gui for Windows' scripting engine from a certain release onward.
For example, "WIN: 7.40PL13" means that that you have to run the SAP GUI for Windows, version 7.40 patch level 13 or higher for a so annotated event to be fired. Trying to access a property or invoking a method that is marked
with such a limitation may lead to a runtime error complaining that the respective property or method does not exist or will simply not do anything.
"WIN: future" means it is currently unknown what release of the SAP GUI for Windows will support the so annotated feature.

JAVA

This is a limitation of the SAP GUI for Java. Certain properties and methods only exist in the SAP Gui for Java's scripting engine from a certain release onward.
For example, "JAVA: 7.40PL11" means that that you have to run the SAP GUI for Java, version 7.40 patch level 11 or higher for a so annotated event to be fired. Trying to access a property or invoking a method that is marked
with such a limitation may lead to a runtime error complaining that the respective property or method does not exist or will simply not do anything.
"JAVA: future" means it is currently unknown what release of the SAP GUI for Java will support the so annotated feature.

Deprecated and Removed Features
In some cases some scripting features have to be changed or removed rendering existing scripts incompatible.
Those changes are kept to a minimum and regularly published in note 2297199. In accordance with the policies outlined in this note,
scripting features are marked as deprecated in a particular service pack release and then removed in the next one. This service pack refers to the SAP GUI for HTML. Because SAP GUI for Windows and Java follow
their own release schedule the actual removal of a feature in these GUIs may considerably lag the removal of it in the SAP GUI for HTML.