Desktop and attended automation — SAP Guided Tutorial
Free sample lesson · open to everyone
Using SAP Build Process Automation's desktop agent for robotic automation of SAP GUI, web and desktop applications: attended vs unattended runs, recording screens, making selectors robust, and when APIs are the better choice.
In this lessonShow sectionsHide sections
Visual overview
The situation: a real project scenario
An unattended bot entered vendor invoices into a legacy system nightly. After a UI update, it typed into wrong fields for 200 invoices before anyone noticed. Adding a screen-identity check before input and an alert on unexpected screens stopped silent failures.
Explanation
Automations run on a Windows machine with the desktop agent installed and registered to the tenant — that agent is what actually drives the mouse, keyboard, and screen reading for the target application.
Application screens (SAP GUI, browser, Excel, or other desktop apps) are captured, and the elements on them are identified by criteria such as IDs or labels, not just screen position.
Attended automations run on a user's own desktop when they start them, often to assist with repetitive data entry; unattended automations run on dedicated machines on a schedule or trigger, with no user present to notice if something goes wrong.
Credentials should come from secure stores — agent variables or a credential management feature — rather than being typed directly into automation steps, where they'd be visible to anyone who opens the automation definition.
UI automation is inherently fragile because it breaks whenever the target screen's layout changes, so an API should always be used instead whenever one exists and is released for the target system.
Setup: install and register the desktop agent, and check its connection status in agent management; unattended agents should run on dedicated VMs with service users rather than a person's own login; keep agent versions consistent across the tenant so automations behave predictably.
Building automations: capture the screens of the target application and declare only the elements you actually need; identify those elements with stable criteria — IDs or labels — rather than screen coordinates, since coordinates break the moment a window is resized or a field moves; add explicit waits for screens to finish loading, and add checks that confirm the expected screen is actually showing before typing into it.
Attended vs unattended: attended automations are triggered and may be interacted with by the user, for example to pre-fill data for them to review; unattended automations run with no one watching, which means they need noticeably stronger error handling and monitoring, since a silent failure can run unnoticed for a long time.
When not to use RPA: if a released API exists for the target system, use it — it's faster, more stable, and auditable in a way UI automation isn't; avoid automating UIs that are unstable or change frequently; treat RPA as a bridge for systems that genuinely have no API, and document the plan to replace it once one becomes available.
Step by step: install the desktop agent and confirm it connects; capture a simple web form and declare three elements by stable criteria; build an automation that fills the form from process data; then deliberately change the page slightly and observe whether your selectors still work. Checkpoint: the automation should run end to end, and fail gracefully with a clear message when the screen isn't what it expects, rather than typing into the wrong field.
Watch out
Common mistakes
Using RPA to automate a system that already has a released API wastes effort building something inherently more fragile than an API call, and harder to audit.
Identifying screen elements by their position on screen, instead of by stable criteria like IDs or labels, means the automation breaks the moment a window is resized, a field moves, or a dialog appears in a slightly different spot.
Storing credentials directly inside automation steps, instead of in a secure credential store, exposes them to anyone who can open and inspect the automation definition.
Running unattended automations with no monitoring at all means a silent failure — like typing into the wrong field after a UI update — can repeat hundreds of times before anyone notices, as happened with the nightly invoice bot in the real-project scenario below.
Do this
Best practices
Default to an API integration and treat RPA strictly as a fallback for systems that genuinely have no released API, since RPA is slower to build, more fragile, and harder to audit than a direct API call.
Use robust element-identification criteria (IDs, labels) rather than screen position, and add explicit screen-identity checks before typing into a field, so the automation fails safely instead of silently typing into the wrong place after a UI change.
Keep credentials in secure stores (agent variables or credential management) rather than embedded in automation steps, and put real monitoring in place for unattended runs, since there's no human present to notice a failure as it happens.
In the interview
Interview angle
An interviewer may ask: "When would you choose RPA over an API integration in SAP Build Process Automation?" A weak answer treats RPA as a general-purpose automation tool.
A strong answer is clear that RPA is a fallback for systems with no released API — slower, more fragile (breaks on UI changes), and harder to audit — and that it should be used deliberately as a documented bridge with a plan to replace it.
The strong answer also distinguishes attended automation (user-triggered, user present) from unattended (scheduled, no one watching, so it needs stronger error handling and monitoring), and calls out that selectors should use stable identification criteria and credentials should never sit directly in automation steps.
Practice this lesson
Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.
Quick check
0 of 4 questions attempted
Question 1 of 4
What is required to run SAP Build Process Automation desktop automations?
Question 2 of 4
A released API exists for the task. What should you use?
Question 3 of 4
What makes UI element identification more robust?
Question 4 of 4
Where should credentials for an unattended automation be stored?
Practise this in an interview
Answer in your own words and get instant feedback, the way an interviewer would judge it.
1When would you use RPA in SAP Build Process Automation and how do you make it reliable?
2What is the difference between attended and unattended automation?
Was this lesson helpful?
Keep exploring
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.