TypeText

Estimated reading: 5 minutes

The SAP TypeText activity enters text into input fields within SAP applications. It uses SAP element information captured through Spy to identify the target field and enter the specified text during workflow execution. The activity supports text entry in editable SAP fields, such as form fields, search boxes, and transaction parameters.

The activity must be used within an SAP Logon scope and uses the active SAP session established by the parent activity.

Activity Canvas

The activity canvas allows you to identify the target SAP input field and configure the text entry operation.

Select Element: Allows you to identify and capture the target SAP input field using Spy. The captured element information is used to locate the field during execution.

Text: Specifies the text to enter into the selected SAP field. You can enter a fixed value or use a variable to provide a value at runtime.

Using Dynamic Values in the Text Field

The Text field supports dynamic values through variables, arguments, and VB.NET expressions that return a String value.

Example:

1. Create a String variable named Username and assign the value “SAMUEL”.
2. In the Text field, enter Username as a variable reference using the Designer’s supported syntax.
3. Execute the workflow.

During execution, the activity retrieves the value stored in Username and enters SAMUEL into the selected SAP field.

Note: Ensure that variables, arguments, and expressions used in the Text field return a String value.

Press Enter After Typing: Determines whether an Enter keystroke is sent after the text is entered. Enable this option when the SAP screen requires Enter to validate the input or proceed with the operation.

Properties

Execution

Delay Before: Specifies the delay, in milliseconds, before the text entry operation begins.

Delay After: Specifies the delay, in milliseconds, after the text entry operation completes.

Offset X: Specifies the horizontal offset from the center of the selected element. Positive values move the interaction position to the right, while negative values move it to the left.

Offset Y: Specifies the vertical offset from the center of the selected element. Positive values move the interaction position downward, while negative values move it upward.

Use Anchor: Determines whether an anchor is used to help identify the target SAP element.
Enabled: Uses the configured anchor to help identify the target element.
Disabled: Identifies the target element without using an anchor.

Wait Time: Specifies the maximum time, in milliseconds, to wait for the target SAP element to become available before timing out.

Input

Clear Before Typing: Determines whether the existing content in the target field is cleared before entering the specified text.
True: Clears the existing value before entering the specified text.
False: Enters the specified text without explicitly clearing the existing value. The resulting behavior depends on the target SAP control.

Press Enter: Determines whether an Enter keystroke is sent after the text entry operation completes.
True: Sends an Enter keystroke after entering the text.
False: Does not send an Enter keystroke after entering the text.

Text: Specifies the text to enter into the selected SAP field. Provide the value as a hardcoded string or a string variable.

MISC

DisplayName: Specifies the activity’s display name. Customize it to identify the activity in the workflow.

SkipOnError: Specifies whether workflow execution continues when the activity encounters an error.
True: Continues workflow execution when an error occurs.
False: Stops workflow execution when an error occurs.
None: Uses the default value, False.

Version: Displays the current version of the activity.

OUTPUT

Result: Returns a Boolean value indicating the activity’s execution status.
True: The activity executed successfully.
False: The activity failed due to an unexpected error.

SAP

SAP Id: Identifies the SAP session associated with the activity. It is retrieved automatically during execution

How It Works

1. Uses the active SAP session established by the parent SAP Logon activity.
2. Locates the target SAP input field using the captured element information.
3. Waits for the target element to become available, subject to the configured Wait Time.
4. Clears the existing field content if Clear Before Typing is enabled.
5. Enters the specified text into the target field.
6. Sends an Enter keystroke if Press Enter is enabled.
7. Stores the operation result in the Result property.

Exception Handling

The text entry operation may fail if:

1. The target SAP field cannot be identified.
2. The SAP session is unavailable or disconnected.
3. The target field is read-only or does not support text entry.
4. The target element does not become available within the configured Wait Time.
5. An error occurs while entering the text.
6. Errors are handled according to the activity’s error-handling configuration, including the SkipOnError setting.

Example

A workflow needs to search for a material record in SAP by entering its material number.

1. Use Spy to capture the Material input field.
2. Configure Text with the required material number.
3. Enable Clear Before Typing to remove any existing value.
4. Enable Press Enter if the SAP screen requires Enter to validate the material number.
5. Execute the workflow.

The activity locates the field, enters the specified material number, and sends Enter if configured, allowing the workflow to proceed with the next operation.

Share this Doc

TypeText

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online