Skip to main content

SAP GUI Automation When Scripting Is Disabled

 · 7 min readUpdated

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:

  1. Fields. Check that LapuAI can find the command field, the vendor field and the payment terms field on your release.
  2. Values. Check that LapuAI enters the transaction code and the values from vendor-changes.xlsx in the right fields.
  3. Saves. Your request tells LapuAI to stop before each save. Check the screen, then approve or correct the change.
  4. 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.
  5. Results. Compare LapuAI's list and the Chat's work details with SAP's change documents.
Who does what in the five-vendor XK02 test

One XK02 test run

  1. You send the request5 vendors, test client
  2. LapuAI reads the spreadsheetvendor-changes.xlsx
  3. LapuAI tries the XK02 fieldscommand, vendor, payment termsNote: Works only if SAP GUI exposes these fields to Windows UI Automation.
  4. You approve each saveyour request says stop firstNote: Full access skips ordinary approvals.
  5. 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.

  1. Read the SAP window. LapuAI can read a control by name where SAP GUI exposes it, for example the command field.
  2. Open the transaction. If your test shows a usable command field, check whether LapuAI can enter the transaction code there.
  3. 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.
  4. 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.
  5. 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.

Which SAP GUI settings each route needs
FeatureScripts and RPA on SAP GUI ScriptingDesktop AI agent
Interface it usesSAP GUI Scripting APIWindows 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?
SAP GUI automation without scripting means automating SAP GUI for Windows without the SAP GUI Scripting API. Recorded scripts and many RPA flows use that API. A desktop AI agent reads the SAP window through Windows UI Automation instead. Windows UI Automation is the accessibility layer that screen readers use. The agent then types and clicks the way a person does.
Why is SAP GUI Scripting turned off so often?
On the server, SAP GUI Scripting is off until an administrator turns it on. SAP's security guide explains the risk: a script has the same rights as the user who starts it. For this reason, some security teams keep scripting off, or turn it on only for named users.
Does a desktop AI agent need sapgui/user_scripting turned on?
No. The parameter sapgui/user_scripting controls the SAP GUI Scripting channel, and a desktop AI agent does not use that channel. The agent reads the window through Windows UI Automation and sends keyboard and mouse input instead. Whether this route works on your screens depends on your SAP GUI release. Test it in a non-production client first.
Is it safe to let LapuAI work in SAP under my login?
LapuAI works under your own SAP user and can do only what your SAP role allows. In Basic mode, it asks before risky or outside actions. Full access skips ordinary approvals, so keep Full access off production SAP. Get sign-off from your Basis and security teams, and tell LapuAI to stop before each save.
Does LapuAI work with every SAP screen?
No. LapuAI can read a control by name only where SAP GUI exposes it to Windows UI Automation. Some screens, custom controls and dialogs can behave differently. Test LapuAI on your SAP GUI release, in a test client, before you rely on it.
Will this work with SAP Fiori or the Web GUI?
Not in the same way. SAP Fiori and the Web GUI run in a web browser, not in SAP GUI for Windows. LapuAI has a built-in browser, but a web page is a different surface from the SAP GUI window. This article covers SAP GUI for Windows only.
When should I use other SAP tools instead?
If the job is thousands of identical postings every night, use a purpose-built batch tool or an approved interface. A desktop AI agent suits smaller, varied work that a person checks.
Is LapuAI an SAP-certified integration?
No. SAP has not certified LapuAI, and LapuAI has not been tested on a specific SAP release. SAP GUI for Windows needs LapuAI on a Windows PC. Check its compatibility in a non-production client first, with your Basis and security teams.

Sources

  1. SAP GUI Scripting Security Guide, version 7.70 PL04, SAP (2021-09-07) · accessed 2026-11-16
  2. Security for the Use of SAP GUI Scripting: SAP Help Portal, SAP · accessed 2026-07-03
  3. UI Automation Overview, Microsoft (2025-07-14) · accessed 2026-11-16
  4. SAP GUI vs SAP Fiori: A Comprehensive Guide, Pathlock (2024-08-01) · accessed 2026-07-03
AI automationSAP GUI automationDesktop AI agentWindows automationComputer use AI
ShareXLinkedIn
Adam Rybałko

Co-founder of LapuAI, the desktop AI agent for macOS and Windows.

Related articles

More in AI for small business: an agent for your everyday office work: Data entry automation with an AI agent, step by step 

Try LapuAI on your next task

LapuAI is a desktop AI agent that works in your files, browser and apps, with you in control. Download the app, sign in and ask for the result you need.

  • Free plan
  • No credit card
  • Cancel anytime

No credit card needed. For 64-bit Windows 10 or 11 and Apple Silicon Macs on macOS 14 or later.