🌐 Language / 语言: English 中文
![]()
![]()
![]()
An AI-powered code completion plugin for SAP ABAP developers, built for Eclipse. Based on Large Language Models (LLM), it pursues ultimate privacy and data security, supports local LLMs for in-house/enterprise use, preventing corporate code from being uploaded to the Internet to guarantee code confidentiality, and provides intelligent code suggestions and auto-completion while writing ABAP code.
Ctrl+Shift+. to manually invoke AI code completion.abap, .txt, .skill files as AI reference patternsCtrl+Shift+.) uses SKILL**: Auto-completion (requestQuickCompletion) uses a simplified standalone prompt and does not load SKILL directory content.There are three ways to install; Method 1 (Eclipse Marketplace) is recommended.
In the Eclipse menu bar, open Help → Eclipse Marketplace...
Type ABAP AI in the search box and find ABAP AI Completion
Click Install and follow the prompts (accept the license, trust the certificate)
After installation, click Restart Now (Restart Eclipse) to load the plugin
In the Eclipse menu bar, select Help → Install New Software... (some versions show Help → Install Software...)
Click the Add... button in the Available Software dialog and enter the update site URL:
Name: ABAP AI Completion
Location: https://yan252.github.io/ABAP-AI-completion/update-site
💡 You can also click
Archive...and selectABAP-AI-Completion-UpdateSite-1.0.5.zipfor offline installation.
Check ABAP AI Completion Feature, then click Next → Next → accept the license → Finish
After installation, click Restart Now (Restart Eclipse) to load the plugin
dropins approach (debugging/development)Copy dist/com.sap.abap.ai.completion_1.0.5.jar to Eclipse’s <install-path>/dropins/ directory (create it if it does not exist), then restart Eclipse.
.abap, .prog, etc.)Ctrl + Shift + . to invoke AI completionTab to accept the suggestion, or any other key to cancelAfter enabling “Auto-complete while typing” in the configuration, AI suggestions automatically trigger after you stop typing for a period (default 2000ms).
To change the shortcut:
Window → PreferencesGeneral → KeysABAP AI completionBinding field and press the new key combinationOK to saveWindow → PreferencesABAP AI Completion in the left navigation tree
| Setting | Description | Example |
|---|---|---|
| API Base URL | AI service endpoint URL | https://api.openai.com/v1 |
| Model Name | AI model name to use | gpt-4, deepseek-v4-flash |
| API Key | API authentication key | (displayed as stars) |
| Max Tokens | Maximum number of generated tokens | 256 |
| Temperature | Creativity temperature (0.0-2.0) | 0.3 (lower means more deterministic output) |
💡 Tip: Click the
Test Connectionbutton to verify the API connection.
| Setting | Description |
|---|---|
| Enable ABAP AI Completion plugin | Enable/disable the entire plugin |
| Auto-complete while typing | When enabled, auto-triggers AI suggestions after you stop typing |
| Setting | Description |
|---|---|
| Delay after typing (ms) | How many milliseconds after you stop typing before auto-completion triggers |
💡 Suggestion: Recommended value is 1500-3000 ms. Lower values increase API request frequency.
Place .abap, .txt, or .skill files in the skill directory and the AI references these file code patterns for completion. This is very useful for project-specific coding standards and naming conventions.
Customize the system prompt sent to the AI to guide it to follow specific code styles and standards.
Customize the display colors of AI completion code in the editor.
git clone https://github.com/yan252/ABAP-AI-completion.git
File → Import → Existing Projects into WorkspaceFinishcom.sap.abap.ai.completion/
├── META-INF/
│ └── MANIFEST.MF # OSGi bundle manifest
├── src/
│ └── com/sap/abap/ai/completion/
│ ├── client/ # AI API client
│ │ ├── AIClient.java
│ │ ├── AIClientException.java
│ │ └── PromptCacheManager.java # Prompt compression & multi-node cache management
│ ├── editor/ # Editor integration
│ │ ├── AICompletionHandler.java
│ │ ├── AICompletionListener.java
│ │ ├── AICompletionOverlay.java
│ │ ├── AICompletionProposalPopup.java
│ │ ├── AICompletionService.java
│ │ └── AIOverlayManager.java
│ ├── logging/ # Logging
│ │ └── AILogger.java
│ ├── parser/ # ABAP parser
│ │ ├── AbapCodeTruncator.java
│ │ ├── AbapIncludeResolver.java
│ │ ├── AbapLanguageDetector.java
│ │ ├── ParentProgramContext.java
│ │ ├── ParentProgramResolver.java
│ │ └── WorkspaceCodeCollector.java
│ ├── preferences/ # Configuration management
│ │ ├── AICompletionPreferencePage.java
│ │ ├── AIConfiguration.java
│ │ ├── PreferenceConstants.java
│ │ └── PreferenceInitializer.java
│ ├── ui/ # UI integration such as status bar
│ │ └── AbapAIStatusLineContribution.java
│ └── Activator.java # Bundle activator
├── icons/
│ └── SAPLogo.ico # Plugin icon
├── dist/ # Published JAR
│ └── com.sap.abap.ai.completion_1.0.1.jar
├── update-site/ # Update site
│ ├── features/
│ ├── plugins/
│ ├── artifacts.jar / artifacts.xml
│ ├── content.jar / content.xml
│ └── site.xml
├── tools/
│ └── CacheVerifyTool.java # Cache verification tool
├── plugin.xml # Plugin extension point declarations
├── build.properties # Build properties
├── build.ps1 # Windows build script
├── build_plugin.xml # Build script (ANT)
├── generate-update-site.ps1 # Update site generation script
└── rebuild.ps1 # Rebuild script
This plugin integrates through the following Eclipse extension points:
| Extension Point | Purpose |
|---|---|
org.eclipse.ui.startup |
Plugin auto-start |
org.eclipse.ui.preferencePages |
Configuration page registration |
org.eclipse.core.runtime.preferences |
Preference initialization |
org.eclipse.ui.commands |
Completion command definition |
org.eclipse.ui.bindings |
Shortcut key bindings |
When manual completion (Ctrl+Shift+.) is triggered, the plugin constructs a message list of 1 system node + 5 user nodes to send to the AI (corresponding to the buildUserMessages method in AICompletionService.java). The meaning of each node is as follows:
| Node | Role | Content |
|---|---|---|
| System | system |
System prompt. Defines the AI’s role (senior SAP ABAP development expert), completion rules, and output constraints. Can be overridden using Custom System Prompt |
| Node 1/5 | user |
SKILL file content: .abap/.txt/.skill files loaded from the skill directory as code style and best-practice references. If no SKILL, it states “use system default ABAP coding standards” |
| Node 2/5 | user |
Parent program call context: When the current file is an INCLUDE, deep search finds the code of the parent programs that call it (recursively searched by configured search depth). Compressed via PromptCacheManager.compressContent |
| Node 3/5 | user |
Programs open in workspace: Other ABAP files open in the current Eclipse workspace as style reference and supplementary context (collected by WorkspaceCodeCollector, also compressed) |
| Node 4/5 | user |
Program metadata: Summary of filename, code type, INCLUDE count, parent program/workspace/SKILL load status to help the AI comprehensively understand the overall context |
| Node 5/5 | user |
Current program at cursor (with cursor position): Merged from the original “full code” node and “cursor context” node. Shows the complete code of the program at the cursor (with all INCLUDEs expanded via AbapIncludeResolver), with the insertion position marked with [[[CURSOR_HERE]]] — this is exactly where the AI generates the completion content |
Note: Nodes 2 and 3 are uniformly compressed before sending via
PromptCacheManager.compressContent(with the compression limit following theMax Workspace Code Charsconfiguration) to avoid context window overflow; Node 1 (SKILL) is sent in full, while the other nodes are sent according to their own rules. If a node has no matching content, a placeholder message (stating that node’s current status) is still sent to ensure the AI always receives the complete 1+5 node structure.
Comparison: Auto-completion (
requestQuickCompletion) does not load SKILL or the above context; it uses a simplified standalone prompt and only sends 1systemnode + 1usernode (current line context).
ExportDeployable plug-ins and fragmentsdist/Finish# Windows PowerShell
.\build.ps1
Or use the provided build_plugin.xml:
ant -f build_plugin.xml
Launch a new Eclipse instance in Eclipse to debug:
Run → Run ConfigurationsEclipse Application configurationPlug-ins tab, ensure com.sap.abap.ai.completion is includedRun to startA: Please verify:
dropins directoryA:
Max Tokens and Temperature values in the configurationTest Connection button to verify the connectionA: Any service compatible with the OpenAI Chat Completions API, including but not limited to:
A: No. This plugin requires a network connection to call the AI API service. However, reference files in the skill directory can help the AI generate code that better conforms to project standards.
A: The API Key is stored in Eclipse preferences and displayed as stars. However, note that:
This project is for learning and personal use only. Please comply with the terms of service and licensing requirements of the AI services you use.
This plugin is inspired by AI-assisted programming tools such as VS Code Copilot, aiming to provide a better coding experience for SAP ABAP developers.