Introduction to SAP Automation in ACCELQ
ACCELQ provides a specialized, no-code framework for automating SAP WinGUI applications. It abstracts the complexity of SAP’s scripting protocol into a readable logic editor, allowing practitioners to build automation that is both robust and easy to maintain.
Unlike traditional automation tools that require extensive scripting, ACCELQ provides a natural language, codeless interface specifically designed for SAP's unique architecture.
Key Characteristics:
- Native SAP Support: Built-in understanding of SAP GUI components (tables, grids, transaction codes)
- Codeless Implementation: Natural language commands eliminate scripting requirements
- Session Management: Intelligent handling of SAP sessions and connections
- Transaction-Based Navigation: Direct T-code navigation for efficient test flows
- Multi-Module Coverage: Support for MM, FI, SD, CO, and other SAP modules
Supported SAP Versions and Modules
ACCELQ's SAP automation capabilities support:
SAP Versions:
- SAP ECC 6.0 and higher
- SAP Business Suite applications
- Industry-specific SAP solutions
Common Modules:
- MM (Materials Management): Procurement, inventory, vendor management
- FI (Financial Accounting): GL posting, accounts payable/receivable
- SD (Sales & Distribution): Sales orders, deliveries, billing
- CO (Controlling): Cost center accounting, internal orders
- PP (Production Planning): Manufacturing orders, work centers
- HR (Human Resources): Personnel administration, payroll
Setting Up the Foundation
Before building automation logic, ensure the following technical prerequisites are met:
Install SAP GUI
- Install SAP GUI from your organization's software center or SAP Marketplace
-
Configure SAP Connections (SAP Logon Pad):
- Application Server or Message Server details
- System ID (SID)
- Instance number
- Connection name (descriptive identifier)
-
Verify Manual Access:
- Test login to each SAP system manually
- Ensure all required transactions are accessible
- Verify user authorizations
Environmental Configuration
-
SAP GUI Scripting: Scripting must be enabled on the SAP Server (Transaction
RZ11) and in the SAP GUI Client settings. Learn more - Local Agent: The ACCELQ Local Agent must be installed on the machine where the SAP GUI client resides. Learn more
-
Pathing: Locate the
saplogon.exepath on your local drive (usually under Program Files, such as "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe", "C:\Program Files\SAP\FrontEnd\SAPgui\saplogon.exe", etc.
RPA Server Initialization
To facilitate the connection between ACCELQ and the SAP GUI protocol, the ACCELQ RPA server must be active on the host machine.
- Requirement: The RPA server acts as the bridge for desktop-based automation.
-
Setup Process:
-
Download & Unzip: Locate the RPA server package provided by ACCELQ. Unzip the contents into a dedicated folder on the local machine (e.g.,
C:\ACCELQ_RPA_Server). -
Execute: Navigate to the unzipped folder and run the server executable (typically
accelq-rpa-server.exeor a similar batch file).
-
Download & Unzip: Locate the RPA server package provided by ACCELQ. Unzip the contents into a dedicated folder on the local machine (e.g.,
Session Lifecycle Management
Every SAP automation flow follows a specific lifecycle: Initialization, Authentication, Execution, and Cleanup.
Establishing the Session
To start, use the command Initialize SAP Logon Application in the logic editor. This launches the local SAP Logon pad.
Authentication & Login
ACCELQ provides the Log in to SAP Session command. You can choose between:
- Standard Login: Passing Client, Username, and Password.
- SSO Login: Utilizing the Connection Name only for environments with Single Sign-On enabled.
Transaction Navigation
Transaction codes (T-codes) are SAP's primary navigation mechanism. Instead of clicking through complex menus, use the command Execute transaction code in current SAP session. This command directly loads the target T-Code, significantly reducing execution time.
Element Identification
The success of SAP automation depends on choosing the right identification method for each field. The element identification for SAP application is achieved in ACCELQ in two different approaches: Label-Based Interaction (zero-maintenance) and Smart Locators (element-based).
The "Locator-Free", or "Label-First" Approach
ACCELQ’s most powerful element-id capability is label-based identification. If a field has a visible text label next to it, use Label-based commands.
-
Example Command:
Enter text in SAP Input Field with labelorClick on a SAP element with label.- Commands containing the word "label" indicate a command that uses a locator-free approach for element identification.
- Practitioner Tip: This method requires no captured elements in the repository, making your scripts immune to most UI upgrades or technical property changes. Simply type the onscreen label into the command to target the required element.
The "Smart Locator" Approach
For elements that lack text labels—such as toolbar icons, specific table cells, or dropdowns—use the View Capture process. Smart Locators are repository-based element definitions that ACCELQ captures and stores. They contain multiple identifying attributes, making them robust against certain types of UI changes.
-
Process: Capture the SAP screen using the ACCELQ plugin, right-click the target element, and save it to the Repository. Learn more
- Works for elements without labels
- Centralized maintenance in a Context, and reusable across all Actions belonging to it
- Supports complex identification strategies
-
Example Command:
Click on a SAP UI Element(using the saved element).- Commands containing the word "element" indicate a command that uses a smart-locator approach for element identification.
Working with Complex UI Structures
Tables and Grids
SAP tables are structured entities (GuiGridView, GuiTableControl) and are not treated as standard HTML tables.
Table Identification Strategies
Because tables rarely have unique labels, they are typically identified via Smart Locators.
- Capture: Save the table control as a Smart Locator in the repository.
-
Focus: Many SAP tables require a "Focus" click before they become editable. Use
Click on the specified cell in the SAP UI Table elementfirst. -
Action: Perform data entry using
Set value of a cell in SAP UI Tableor retrieval usingGet value from SAP UI Table Cell.
Column Identification Options
ACCELQ allows you to target columns using three distinct strategies:
-
Column Index (1-based): Target a column by its numeric position, where the column numering starts with 1 (e.g., Column
5).- Pros: Simple and direct.
- Cons: Breaks if the SAP layout is customized or the column order changes.
-
Column ID (Technical): Target using the technical SAP backend ID (e.g.,
"MATNR").- Pros: Highly stable; unaffected by UI rearrangements or hidden columns.
- Cons: Requires identifying the technical ID during capture.
-
Column Label (Header Text): Target using the onscreen header (e.g.,
"Material").- Pros: Human-readable and maintainable.
- Cons: Dependent on UI language and header visibility.
Row Identification & Navigation
- Row Indexing: Uses 1-based integers (1 = first row). Note that indices refer to currently visible rows and are affected by pagination.
- Dynamic Row Location: For robust logic, use "Find Row" type commands to search for a row containing a specific cell value (like an ID) rather than hardcoding an index.
Comboboxes and Dropdowns
Identifying selection lists depends on the UI control type:
- Label-Based: Use standard label commands if the dropdown has a unique text label.
-
Icon-Based/ComboBox: Use
Select an item from SAP UI combobox. If it lacks a label, capture it as a Smart Locator and select items by their displayed text or underlying key/value.
Scenario: Dynamic Dropdown Content
In many SAP workflows, dropdown options change dynamically based on prior selections (e.g., selecting a Company Code filters the available Cost Centers).
Strategy:
- Sequence: Ensure all prerequisite field selections are completed first to trigger the backend update.
-
Synchronization: Introduce a short
Waitor a dynamic existence check to allow the dropdown list to populate. - Parameterization: Use a parameterized value in the selection command to maintain flexibility across different test data sets.
Advanced UI Interactions
-
Double-Clicking: Drilling down into SAP records often requires a double-click. Use
Double click on a SAP element with labelif the text is visible, or a Smart Locator for icons. -
Existence Checks: Before interacting with complex components, use
Is SAP UI Element existsas a guardrail to ensure the component is rendered. This is applicable for Smart Locator Elements.
Advanced Interactions & Validations
Function Keys and Shortcuts
SAP power users rely on the keyboard, and automation should too. Use Press Keyboard Key on Current SAP Window for:
-
ENTERto submit forms. -
F4to trigger Search Help. -
F11to trigger the Save action.
Refer to the SAP Command reference for the complete listing.
The SAP Status Bar
Post-action validation should always involve the SAP Status Bar (the "toaster" at the bottom).
-
Command:
Get Status Message from SAP Window. -
Logic: Once retrieved, use
Get Number Portion from Stringto extract document IDs or order numbers generated by the system.
Synchronization
SAP response times can vary.
-
Explicit Waits: Use the
Waitcommand for fixed delays. -
Dynamic Waits: Use
Wait for SAP UI Element to appearwith a given timeout to ensure a screen is fully loaded before proceeding.
Practitioner Best Practices
- Direct Navigation: Always use T-Codes rather than clicking through the SAP Tree Menu.
- Modular Logic: Create reusable "Actions" for common functional blocks to maintain consistency across different test scenarios.
-
Use
\n: When navigating, passing\nin a transaction command is a quick way to reset the session back to the main menu. - Wait for Results: Always add a short wait after a "Save" or "Post" action before attempting to capture the status message.
- Element Cleanup: Periodically review the element repository to delete captured elements that could have been handled with label-based commands.
More Information:
SAP Automation Command Reference
Comments
0 comments
Article is closed for comments.