This guide covers SAP GUI automation without the Scripting API: a desktop AI agent that works in the SAP GUI for Windows window like a person. It can work only where SAP GUI exposes its controls to Windows UI Automation, so test it on your system first.
A test task: payment terms for five vendors in XK02
LapuAI has not been tested on a specific SAP release, so use this hypothetical task as a test plan. Run it in a non-production client first.
Suppose procurement sends you a spreadsheet with new payment terms for five vendors. Your system has SAP GUI Scripting turned off. You could ask LapuAI:
For each row in vendor-changes.xlsx, open XK02. Enter the vendor number and company code. Go to the payment transactions view and set the payment terms to the value in column D. Ask me before each save. Then list each vendor with the old and new terms.
Check these points in the test, one vendor at a time:
- Fields. Check that LapuAI can find the command field, the vendor field and the payment terms field on your release.
- Values. Check that LapuAI enters the transaction code and the values from vendor-changes.xlsx in the right fields.
- Saves. Your request tells LapuAI to stop before each save. Check the screen, then approve or correct the change.
- Messages. If a vendor number does not exist, SAP returns a message. Check that LapuAI reports it and asks what to do with the row.
- Results. Compare LapuAI's list and the Chat's work details with SAP's change documents.
One XK02 test run
- You send the request5 vendors, test client
- LapuAI reads the spreadsheetvendor-changes
.xlsx - LapuAI tries the XK02 fieldscommand, vendor, payment termsNote: Works only if SAP GUI exposes these fields to Windows UI Automation.
- You approve each saveyour request says stop firstNote: Full access skips ordinary approvals.
- You compare the resultswork details and change documents
If the five vendors go well, try a slightly larger batch. Keep checking each batch before you move on. For the spreadsheet side of the task, such as cleaning an SAP export, see AI Excel automation.
Why SAP GUI Scripting is often turned off
SAP GUI Scripting is an automation interface for SAP GUI for Windows. Outside code can attach to a running SAP session through it. The code can then read fields, enter values, press buttons and run transactions.
On the server, SAP GUI Scripting is off by default. An administrator turns it on with the profile parameter sapgui/user_scripting, set to TRUE in transaction RZ11 (SAP, 2021). Administrators can also allow scripting only for some users. They do this with sapgui/user_scripting_per_user and the authorization object S_SCR.
On each PC, the scripting component is part of the standard SAP GUI installation. An administrator can leave the component out of the installation package. An administrator can also turn scripting off with a registry setting that ordinary users cannot change (SAP, 2021).
Why keep scripting off? SAP's own guide gives the reason. A script has the same rights to run transactions and enter data as the user who starts it. For this reason, some security teams leave scripting off, or turn it on only for named users (SAP, 2021).
What breaks when scripting is off
If sapgui/user_scripting is FALSE, or the PC has scripting turned off, tools that need the Scripting API cannot attach to your session. They do not run slower. They stop at the first step.
- Recorded VBScript and VBA scripts cannot get the SAP GUI application object. The script fails when it tries to attach.
- Record-and-replay tools built on SAP GUI Scripting stop at the same point.
- RPA flows that use an SAP GUI Scripting connector lose that connector. Some RPA tools also offer screen-based modes that do not use scripting. Check your own tool's documentation for those modes.
Even where scripting is on, SAP GUI can show a notice each time a script attaches to the session. Users can turn this notice on in SAP GUI's options. For unattended runs, the notice is one more step that someone has to handle.
How a desktop AI agent automates SAP GUI without scripting
A desktop AI agent treats SAP GUI for Windows as a normal Windows desktop app. It does not ask SAP for a scripting connection. Instead, it reads the window the way a screen reader does, then types and clicks the way a clerk does.
Windows provides this view through UI Automation, its accessibility framework. Screen readers use UI Automation to read the controls in an app window. Automated test tools use it too (Microsoft, 2025). An app decides which of its controls it exposes to UI Automation, and how it names them.
In a test client, a LapuAI run in SAP GUI would follow the steps below. Each step depends on what your SAP GUI release exposes to Windows UI Automation.
- Read the SAP window. LapuAI can read a control by name where SAP GUI exposes it, for example the command field.
- Open the transaction. If your test shows a usable command field, check whether LapuAI can enter the transaction code there.
- Enter values from your file. For a task that starts from a spreadsheet, LapuAI reads the Excel file one row at a time. Check that each value lands in the right SAP field.
- Stop before saves. In Basic mode, LapuAI asks before risky or outside actions. For SAP, also tell it to stop before each posting, master-data save or release. Full access skips ordinary approvals, so keep it off production SAP.
- Compare the record. In a test run, compare the Chat's work details with the SAP screens and messages you saw.
On this route, LapuAI does not use the Scripting API. The parameter sapgui/user_scripting can stay FALSE, and you do not need an S_SCR authorization. SAP receives keyboard and mouse input in the signed-in user's session.
| Feature | Scripts and RPA on SAP GUI Scripting | Desktop AI agent |
|---|---|---|
| Interface it uses | SAP GUI Scripting API | Windows UI Automation and keyboard input |
| Needs sapgui/user_scripting = TRUE | ||
| Needs the scripting component on the PC | ||
| Depends on controls SAP GUI exposes to Windows | ||
| Needs a test on your SAP release |
The same route can work in other Windows apps that have no API. The desktop automation guide covers legacy Windows apps with the same problem.
Governance: get security sign-off first
A route around the Scripting API is not a route around governance. Treat a desktop agent in SAP like any other access to production SAP.
LapuAI works under the signed-in user's own SAP authorizations. It can do only what that user's role allows, so the limit is the SAP user you run it under. Use a dedicated SAP user with only the rights the task needs.
Expect your security team to ask for these steps:
- Involve Basis (the SAP system administrators) and security before you start. Treat this as a change to how people access production SAP.
- Know what LapuAI records. LapuAI keeps logs of its steps, and each Chat shows its work details. It has no audit log. Keep SAP's own change documents and logs as your system of record. The security overview explains Basic mode, Full access and where data goes.
- Keep saves behind an approval. Use Basic mode. Tell LapuAI to ask before postings, master-data saves and anything that leaves SAP.
- Start in a test client. Run the task in a sandbox or QA system before you use production.
Your security team can then compare this setup, one known SAP user in Basic mode, with turning scripting on.
Where this approach has limits
These limits apply before you plan any SAP work with LapuAI:
- LapuAI is not an SAP-certified integration. SAP has not certified LapuAI. It has not been tested on a specific SAP release, S/4HANA or ECC version, or support package. Test it on your own system first.
- Some screens can behave differently. If SAP GUI does not expose a control to Windows UI Automation, LapuAI cannot read that control by name. Custom controls and dialogs can also change the results.
- SAP Fiori and the Web GUI are a different surface. They run in a web browser, not in SAP GUI for Windows (Pathlock, 2024). This guide covers SAP GUI for Windows only.
- High-volume batch work needs other tools. For thousands of identical postings every night, use a purpose-built batch tool or an approved interface. LapuAI fits smaller, varied work that a person checks as it goes.
- Screen changes can affect a run. A new screen layout or theme can change what LapuAI reads. Check the first records after any SAP GUI update.
Ready to test SAP GUI automation on your own system? Download LapuAI for Windows and try it in a test client.
FAQ
What does SAP GUI automation without scripting mean?
Why is SAP GUI Scripting turned off so often?
Does a desktop AI agent need sapgui/user_scripting turned on?
Is it safe to let LapuAI work in SAP under my login?
Does LapuAI work with every SAP screen?
Will this work with SAP Fiori or the Web GUI?
When should I use other SAP tools instead?
Is LapuAI an SAP-certified integration?
Sources
- SAP GUI Scripting Security Guide, version 7.70 PL04, SAP (2021-09-07) · accessed 2026-11-16
- Security for the Use of SAP GUI Scripting: SAP Help Portal, SAP · accessed 2026-07-03
- UI Automation Overview, Microsoft (2025-07-14) · accessed 2026-11-16
- SAP GUI vs SAP Fiori: A Comprehensive Guide, Pathlock (2024-08-01) · accessed 2026-07-03


