major-ai-skills
Version:
Installable agentic skills / AI agent skills (SKILL.md) for Claude Code, Cursor, Codex CLI, Gemini CLI & Antigravity - 402+ professional app, token-efficiency, and common-sense skills. SEO/GEO ready.
117 lines (88 loc) • 6.4 kB
Markdown
title: "SAP GUI Desktop & Scripting Automation AI Skill Guide (Gemini)"
description: "Comprehensive operational skill specification for Google Gemini to visually diagnose, automate, script, and troubleshoot SAP GUI screens, ALV Grid views, Status Bar error messages, and Dynpro layouts."
category: "SAP Desktop Client & Transaction Processing"
tags: ["sap-gui", "alv-grid-analysis", "status-bar-errors", "gemini", "dynpro-screens", "sap-easy-access"]
# SAP GUI Desktop & Scripting Automation AI Skill Guide (Gemini)
## Overview & Engine Architecture
SAP GUI provides high-speed enterprise transaction entry across manufacturing, finance, and logistics modules. Gemini acts as an AI SAP Functional Auditor and UI Diagnostic Specialist, specializing in **multimodal SAP Easy Access tree inspection**, **Status Bar error message triage (Yellow warnings vs Red errors)**, **ALV Grid table layout validation**, and **GuiXT screen customization**.
### Visual Analytics & Transaction Interface Stack
```
┌─────────────────────────────────────────────────────────────┐
│ SAP GUI Visual Operations Stack │
│ │
│ UI Presentation & Status Hierarchy │
│ ├── SAP Easy Access Tree (Favorites & TCode Navigation) │
│ ├── Status Bar Component (`wnd[0]/sbar` - Info/Warn/Error) │
│ └── ALV Grid Viewport (Total Summaries, Subtotals, Filters)│
│ │
│ Transaction Flow & Customization │
│ ├── Dynpro Screen Fields (Tabstrips, Radio Groups, Tables) │
│ ├── GuiXT Layout Simplification Overlays │
│ └── Matchcode / Search Help F4 Popup Windows │
└─────────────────────────────────────────────────────────────┘
```
## Operational Capabilities & Agent Directives
1. **Multimodal Status Bar Triage**: Analyze screenshots of the SAP GUI bottom status bar (`sbar`) to decode short error codes (*e.g. `Account 400000 requires an assignment to a CO object` or `Material 100-200 is locked by user JSMITH`*).
2. **ALV Grid Layout Inspection**: Evaluate ALV Grid reporting views, diagnosing broken column layout variants, missing subtotals, and incorrect decimal format masking.
3. **Dynpro Screen Field Diagnostics**: Review multi-tab Dynpro screens (e.g. `MM02`, `VA02`, `FB60`) to identify missing mandatory fields marked with checkmark icons.
4. **GuiXT Script Verification**: Audit GuiXT scripts for clean field repositioning, push button creation, and table control column hiding.
## Production Python Automation: Automated SAP GUI Status Bar Error Catcher
Execute this script to monitor an active SAP session and capture status bar messages during automated RPA execution:
```python
"""
SAP GUI Real-Time Status Bar Error & Notification Monitor
Attaches to session, reads active status bar state, and logs message class/type.
"""
import sys
import win32com.client
def check_sap_status_bar():
try:
sap_gui = win32com.client.GetObject("SAPGUI")
app = sap_gui.GetScriptingEngine
session = app.Children(0).Children(0)
sbar = session.findById("wnd[0]/sbar")
msg_type = sbar.MessageType # 'S' = Success, 'W' = Warning, 'E' = Error, 'A' = Abort
msg_text = sbar.Text
msg_id = sbar.MessageId
msg_no = sbar.MessageNumber
print("--- [SAP GUI ACTIVE STATUS BAR DIAGNOSTIC] ---")
print(f"Message Type: {msg_type}")
print(f"Message ID: {msg_id} (Number: {msg_no})")
print(f"Message Text: '{msg_text}'")
if msg_type in ('E', 'A'):
print("\n🚨 CRITICAL ERROR DETECTED ON CURRENT SCREEN!")
elif msg_type == 'W':
print("\n⚠️ WARNING DETECTED (Press Enter to bypass).")
elif msg_type == 'S':
print("\n✅ TRANSACTION PROCEEDED NORMALLY.")
except Exception as e:
print(f"Error reading SAP status bar: {e}")
if __name__ == "__main__":
check_sap_status_bar()
```
## Technical Troubleshooting Matrix
| Issue & Visual Signature | Root Cause Analysis | Diagnostic & Resolution Pathway |
| :--- | :--- | :--- |
| **Status Bar Shows Red Error: `Required field missing`** | A mandatory Dynpro input field on an unselected tab has not been populated. | 1. Review all screen tabs (General, Purchasing, Accounting).<br>2. Look for fields highlighted with a white input checkmark.<br>3. Populate field and press Enter. |
| **F4 Search Help Returns `No values found`** | Filter criteria in the Matchcode popup window are too restrictive or master data not extended to the target plant/company code. | 1. In F4 dialog, clear specific field restrictions.<br>2. Verify Material or Customer is extended to target Sales Org / Plant. |
| **ALV Grid Export to Excel Option Greyed Out** | User lacks authorization object `S_GUI` or ALV view is rendered in Classical List mode. | In *Settings $\rightarrow$ User Parameters*, set parameter `ME_USE_GRID = 'X'`. |
| **SAP GUI Text Looks Blurry on 4K High-DPI Display** | High-DPI scaling not enabled in SAP GUI 7.70/8.0 theme settings. | In *SAP GUI Options $\rightarrow$ Visual Design $\rightarrow$ Font Configuration*, check **Enable Multi-Monitor High-DPI Scaling**. |
## Command Line Syntax & Server Control
```bash
# Query SAP System Info from Active Session via VBScript
cscript //nologo C:\Scripts\GetSAPInfo.vbs
# Launch SAP GUI with Belize Theme
saplogon.exe /THEME=BELIZE
```
### Key Configuration Locations
- **SAP Themes & Options**: `%APPDATA%\SAP\SAP GUI\SAPGUI.xml`
- **GuiXT Scripts**: `C:\Program Files (x86)\SAP\FrontEnd\SAPgui\GuiXT\`
## Agent Operational Directive
> **MANDATORY**: Always inspect the `sbar.MessageType` property (`'E'`, `'A'`, `'W'`, `'S'`) after every simulated user keystroke in SAP GUI automation to verify transaction success before continuing.