SAP Object Explorer
📦 Browse SAP objects and jump between related objects from static, abapGit-exported files — no live ADT, BTP, or backend connection required.
✨ What this is
SAP Object Explorer turns an abapGit-cloned repo (.abapgit.xml + src/) into an
ADT-like workbench inside VS Code. Everything is computed from the files on disk,
so there is no SAP system, no ADT, no BTP and no network connection involved —
the only thing that ever talks to the internet is license activation (and the
optional GitHub Browser).
Core workbench — always included
- Catalog & tree view of every CLAS / INTF / DDLS / BDEF / TABL / MSAG / DEVC / …,
grouped either by ADT category or by folder, with 24 ADT-style SVG icons.
- Full language-server coverage for
abap, abap_cds, abap_bdef, abap_xml:
Go to Definition, Hover, References, Implementations, Workspace Symbols, Outline,
Folding, and cross-file completion for TYPE REF TO, INTO, DATA … LIKE, JOIN … ON.
- Find References (Where-Used) — incoming and outgoing edges of the
cross-reference graph, with direction arrows.
- abaplint static analysis in-process, with Problems-panel diagnostics and
Quick Fix lightbulbs. Plus a separate catalog-level Diagnostics pass for
duplicate names, missing descriptions, orphans and malformed metadata.
- Rename / Refactor — atomically rewrites an object name across every file in
its reference graph, behind a confirm modal.
- Git history & diff per object — commit list, show at revision, diff against any ref.
- Create objects from templates, bookmarks & favorites, notes,
search panel, deep links, catalog export, structure report,
statistics, and an ABAP Unit test-class overview.
- DEVC package properties — software component, transport layer, correction
number, responsible user, homepage, suppression flags.
- Document formatting for ABAP (abaplint PrettyPrinter) and for all SAP metadata XML.
Pro — requires a license (see Licensing)
Dependency Analyzer, CDS graph, Package diagram, CDS impact analysis, RAP BO
visualization, Code Metrics, Activity Heatmap, Health Score, Object Compare,
PlantUML export, Multi-Workspace, Batch Operations, AI Assistant, GitHub Browser.
🔑 Licensing
|
|
| Trial |
14 days from first run, all features unlocked. Anchored server-side per machine, so reinstalling does not restart it. |
| After the trial |
Without a license the extension enters locked mode — the views show a lock and only the license commands stay available. |
| With a license |
Core workbench plus every Pro feature your plan includes. |
Run SAP Object Explorer: Show License Information to see your plan, expiry
and this machine's Machine ID. The SAP Tools sidebar marks every paid tool with
a PRO badge (🔒 when locked) so you can tell before clicking, and each category
header shows how many of its tools a license would unlock.
To buy or to move a license to another machine, see orderPageUrl /
supportEmail in src/licenseConfig.ts. Licenses are bound to a hardware
fingerprint; use Deactivate License to free the activation slot first.
📥 Cài đặt
Cách 1: Cài từ file VSIX (khuyên dùng)
- Build file VSIX — chạy
build.bat (xem mục Build bên dưới), hoặc tải file đã build sẵn sap-object-explorer-<version>.vsix
- Mở VS Code → Mở tab Extensions (
Ctrl+Shift+X)
- Click vào
... (góc phải) → Install from VSIX...
- Chọn file
.vsix vừa build/tải
Hoặc dùng terminal:
code --install-extension sap-object-explorer-<version>.vsix
Cách 3: Cài từ VS Code Marketplace
Một khi đã publish (xem PUBLISHING.md), chỉ cần search "SAP Object Explorer" trong tab Extensions và bấm Install — từ đó VS Code tự động cập nhật lên bản mới mỗi khi publisher publish version mới (mặc định extensions.autoUpdate = true, không cần làm gì thêm).
Cách 2: Build từ source
cd vscode-extension
npm install
npm run compile
npm run package # runs the licence + notices gates, then builds and packages
# Hoặc chạy build.bat (Windows)
🚀 Bắt đầu nhanh
Chưa có code trên máy? Clone thẳng từ GitHub
Mở Command Palette → SAP Object Explorer: Clone abapGit Repository from GitHub...
(hoặc mở tab GitHub Browser ở sidebar rồi bấm ⤵ Clone & Scan).
Extension sẽ:
git clone branch bạn chọn (mặc định --depth 1 cho nhanh; tick Full git history
nếu cần Activity Heatmap / Object History đi sâu hơn),
- đọc
.abapgit.xml để lấy STARTING_FOLDER — nên nó biết chính xác thư mục nào
chứa object thật (thường là /src/) mà bạn không phải đoán,
- quét luôn thư mục đó và dựng catalog.
💡 Trước khi clone, tab GitHub Browser gắn badge abapGit / not abapGit cho repo —
nếu repo không có .abapgit.xml ở root thì catalog sẽ rỗng, biết trước đỡ mất thời gian tải.
Repo private: bấm Add token trong tab GitHub Browser, dán Personal Access Token
(scope repo). Token lưu trong VS Code secret storage và được xoá khỏi .git/config
ngay sau khi clone xong.
Máy không có git trên PATH? Dùng nút ⤓ ZIP để tải snapshot (nhưng khi đó
Object History / Diff / Heatmap sẽ không có dữ liệu git để đọc).
Clone nhiều repo? Mỗi lần clone được thêm vào Switch Scan Context để nhảy qua lại
trong cùng một window.
Đã có code sẵn
- Mở folder chứa code abapGit đã clone về (thường là
src/ hoặc zfpt_*/) → File > Open Folder...
- Mở SAP Objects View: Click icon
SAP ở Activity Bar bên trái
- Quét catalog: Bấm nút Refresh Catalog 🔄 trên thanh title của view — mặc định view không tự quét khi mở (đổi qua
sapExplorer.autoScanOnFirstView nếu muốn tự quét lại lần đầu mở view)
- Click vào object để xem chi tiết (files, source, cross-references)
💡 Project lớn, nhiều package không liên quan? Bấm Scan From Folder... 📂 trên thanh title để chọn đúng thư mục con cần quét (vd. zfpt_report) thay vì quét cả workspace — nhanh hơn nhiều trên repo lớn. Bấm Reset Scan Path để quay lại quét cả workspace root. Muốn loại trừ thêm thư mục cụ thể (không đổi hẳn scan path) thì dùng sapExplorer.excludeFolders.
🎨 Syntax highlighting & editor experience
- Colorized bracket pairs cho khối lệnh ABAP —
IF/ENDIF, METHOD/ENDMETHOD, CLASS/ENDCLASS, LOOP/ENDLOOP, TRY/ENDTRY, DO/ENDDO, FORM/ENDFORM, FUNCTION/ENDFUNCTION, INTERFACE/ENDINTERFACE (cả hoa/thường) được bracket-matching/colorize như dấu ngoặc thật.
- Auto-indent khi gõ Enter sau các khối trên, tự dedent khi gõ
ENDIF./ENDMETHOD./... (case-insensitive).
- Auto-close cho string template
|...| và backtick `...`.
- Region folding thủ công qua comment
* #region / * #endregion (ABAP) hoặc // #region / // #endregion (CDS/BDEF).
- Field symbol (
<fs>) giờ có scope highlighting riêng (variable.other.field-symbol.abap, in nghiêng) thay vì lẫn vào scope preprocessor chung — hoạt động trong mọi khối (IF/LOOP/FORM/FUNCTION/METHOD...).
🎯 Tính năng
🌲 Hai chế độ xem cây thư mục
Click nút Toggle View Mode (📋) trên thanh title của SAP Objects view để chuyển đổi:
| Chế độ |
Mô tả |
| Category View (mặc định) |
Nhóm objects theo category ADT (Core Data Services, Business Services, Dictionary...) — giống Package Explorer |
| Folder View |
Hiển thị cấu trúc filesystem thực tế — giống GitHub file tree |
📤 Export & Structure Report
- Export Catalog as JSON (💾) — Xuất toàn bộ catalog ra file JSON để chia sẻ / tái tạo cấu trúc
- Generate Structure Report — Tạo báo cáo dạng tree hierarchy (package → object types → objects)
- Show Statistics (📊) — Thống kê chi tiết objects theo type, package, cross-references
📋 Copy nhanh
- Copy Object Path — Click chuột phải vào object → copy đường dẫn file
- Copy Object Key — Click chuột phải → copy key
name.type
🎨 Icons chuyên nghiệp
24 icons được thiết kế theo phong cách SAP ADT, phân loại bằng màu sắc:
| Màu |
Nhóm |
Ví dụ |
| 🔵 Xanh dương |
Source Code + Services |
CLAS (class diagram), SRVD (document) |
| 🟢 Xanh lá |
Dictionary |
TABL (grid), DTEL (tag) |
| 🟣 Tím |
CDS/RAP + IAM |
DDLS (CDS doc), BDEF (gear), DCLS (shield) |
| 🟠 Cam |
Authorizations |
SUSH (lock) |
| ⚪ Xám |
Miscellaneous |
MSAG (speech bubble) |
| 🟡 Vàng |
Package |
DEVC (3D box) |
⚙️ Cài đặt mới
| Setting |
Default |
Mô tả |
sapExplorer.viewMode |
"category" |
"category" hoặc "folder" — chế độ xem cây |
sapExplorer.showObjectCounts |
true |
Hiển thị số lượng objects bên cạnh tên folder/category |
📋 Danh sách commands
| Command |
Mô tả |
| Refresh Catalog 🔄 |
Quét lại folder, rebuild tree + identifier index |
| Scan From Folder... 📂 |
Mở popup chọn thư mục con cụ thể để quét, thay vì cả workspace |
Reset Scan Path $(root-folder) |
Xoá scan path đã chọn, quay về quét cả workspace root |
| Toggle View Mode 📋 |
Chuyển Category/Folder view |
| Export Catalog as JSON 💾 |
Xuất catalog ra JSON |
| Show Statistics 📊 |
Thống kê objects |
| Search Objects 🔎 |
QuickPick tìm object theo name/type/package |
Find References $(references) |
Where-Used cho object dưới caret |
Run Diagnostics $(checklist) |
Lint catalog: duplicate names, missing descr, orphans |
Command palette (right-click on a file/object too)
| Command |
Mô tả |
| Show Object Overview |
Mở panel chi tiết object |
| Go to Related Object |
Mở danh sách object liên quan |
| Open File |
Mở file của object đang chọn |
| Generate Structure Report |
Render cây package hierarchy ra Markdown |
Show Object History $(history) |
Git commit list cho object |
Diff Object Against Git Ref $(diff) |
git diff object's folder vs ref |
Rename Object (Refactor) $(edit) |
Đổi tên + rewrite references toàn graph |
Language-server features (auto)
| Cách |
Mô tả |
| Status bar $(list-tree) |
Khi mở file SAP, status bar bên phải hiển thị $(list-tree) CLAS ZFOO_BAR · ZFPT_PKG. Click vào để reveal trong cây. |
| Right-click → Reveal in Object Explorer Tree |
Từ editor title menu, editor context menu, hoặc VS Code Explorer context menu (chỉ với file SAP). |
| Hover → Reveal link |
Hover lên identifier trong ABAP/CDS → popup có link $(list-tree) Reveal in Object Explorer tree. |
| Object Panel → Files → $(list-tree) |
Mỗi dòng file có thêm icon (tree) nhỏ ngay cạnh filename. |
| Find References → $(list-tree) |
Mỗi row trong Where-Used có file path trong cột detail + button (tree) để jump thẳng vào cây. |
Khi reveal, các package/folder cha được expand tự động (cả chế độ Category lẫn Folder) và object được select/focus. Nếu file chưa được scan vào catalog (vd. mới tạo sau lần refresh cuối), lệnh fallback sang VS Code Explorer view tiêu chuẩn và báo trong status message.
| Phím tắt |
Hoạt động |
| F12 / Ctrl+Click |
Go to Definition |
| Hover |
Hiện Type / Name / Package / file path |
| Shift+F12 |
References (graph + in-file occurrences) |
| Ctrl+T |
Workspace Symbol - tìm object toàn workspace |
| Ctrl+Shift+O |
Document Symbol - outline CLASS / METHOD / FORM / IF |
| Ctrl+Space |
Cross-file completion cho CLAS / TABL / DTEL / INTF |
| Folding |
IF/ENDIF, DO/ENDDO, METHOD/ENDMETHOD, CLASS/ENDCLASS, XML tags |
🔍 Tính năng có sẵn
Package Explorer-style tree
Packages và sub-packages nested by on-disk folder, grouped vào category/subcategory giống ADT (Business Services, Core Data Services, Dictionary, Cloud Communication Management...), kèm object counts.
Cross-reference navigation
Objects mà metadata/source có chứa tên của object khác sẽ tự động linked. Dùng Go to Related Object từ file đang mở, hoặc mở rộng object trong tree để xem references.
Object overview panel
Click object (bất kỳ, kể cả object chỉ có 1 file) → panel bên cạnh mở ra, hiển thị:
- Files (click để mở)
- Type-specific detail:
- BDEF — operations (entity/alias/lock/authorization/associations/validations/determinations)
- DDLS — keys, associations, compositions
- CLAS — Types / Data / Methods theo từng class (kể cả local class)
- TABL — table header (DD02V), Technical Settings (DD09L), Fields (DD03P), Extras/TDDAT (authorization group)
- DOMA — header + bảng Fixed values (value/text)
- DTEL — domain/type tham chiếu, độ dài field label
- TTYP — row type/kind, access mode
- NROB — number range attributes + text
- MSAG — danh sách messages
- Related objects list
Muốn mở file XML thô thay vì panel: bấm mũi tên expand ở node object trong tree, file con nằm sẵn trong đó.
ABAP CDS / RAP syntax highlighting
Cho .asddls, .asdcls, .asbdef, .srvdsrv, .asddlxs files.
Outline/breadcrumb cho CDS view entities và Behavior Definitions.
JSON Schema validation
Cho AFF *.uiad.json, *.nont.json, *.ront.json files — hover docs và autocomplete.
⚙️ Settings
| Setting |
Default |
Mô tả |
sapExplorer.scanPath |
"" (whole workspace) |
Folder to scan, relative tới workspace root. Set nhanh qua command Scan From Folder... (liệt kê sẵn các folder trong workspace) thay vì sửa tay trong Settings |
sapExplorer.viewMode |
"category" |
"category" / "folder" |
sapExplorer.showObjectCounts |
true |
Show/hide object counts in tree |
sapExplorer.autoScanOnFirstView |
false |
Tự scan workspace khi mở SAP Object Explorer view lần đầu. Mặc định tắt — bấm Refresh Catalog khi cần quét |
sapExplorer.enableScanCache |
true |
Cache kết quả scan để mở lại nhanh hơn (xem ghi chú lưu trữ bên dưới) |
sapExplorer.excludeFolders |
[] |
Thêm tên thư mục muốn bỏ qua khi quét, cộng dồn với danh sách mặc định (.git, node_modules, .vscode, .github, .gitlab, __pycache__, .nyc_output, coverage, .next, target, build, dist, .cache, .svn). Match theo tên thư mục chính xác, không phải path/glob |
sapExplorer.maxReferenceGraphObjects |
5000 |
Ngưỡng số object tối đa để build cross-reference graph (phần "Related"/Where-Used) — vượt ngưỡng thì bỏ qua vì thuật toán O(n²) sẽ chậm trên repo rất lớn |
🧠 How scanning works
- Mỗi file được nhóm theo
<name>.<type> (bỏ qua extension variant), giống cách abapGit lưu objects trên disk
- Một file
.xml hoặc .json là metadata; các file còn lại là companion source
- Một số types được parse thêm: BDEF operations, DDLS fields/associations, CLAS types/data/methods
- Cross-references: dựa trên evidence — một edge chỉ được tạo khi tên object xuất hiện trong file của object khác
- Thư mục trong danh sách mặc định (
.git, node_modules, .vscode, build, dist, ...) + bất kỳ thư mục nào thêm qua sapExplorer.excludeFolders luôn bị bỏ qua khi đi bộ cây thư mục — kể cả ở bước kiểm tra cache
- Nếu catalog có hơn
sapExplorer.maxReferenceGraphObjects objects (mặc định 5000), bước build cross-reference graph bị bỏ qua để tránh chậm trên repo rất lớn — tree/panel vẫn hiển thị bình thường, chỉ thiếu "Related"/Where-Used
Chạy in-process bằng TypeScript (src/sapReader.ts). Python script tools/sap_reader.py có sẵn nếu muốn dùng CLI.
Lưu trữ cache: file cache của scan nằm trong thư mục global storage riêng của extension (do VS Code quản lý, ngoài workspace) — không ghi bất kỳ file nào vào trong repo/workspace đang scan, kể cả khi đó là abapGit repo thật của bạn.
⚠️ Known limitations
- Category placement cho types ít gặp là best-effort — xem
src/categories.ts. Types không map được sẽ vào Other bucket
- BDEF/DDLS/CLAS parsing và cross-reference graph là best-effort regex, không phải full grammar
- Không track trạng thái object (activation, transport, v.v.)
- Tested trên static export snapshots, không phải live system
🏗️ Project structure
vscode-extension/
├── src/ # TypeScript source
│ ├── extension.ts # Entry point
│ ├── sapReader.ts # Scan & parse abapGit files
│ ├── objectTreeProvider.ts # Tree view data provider
│ ├── objectPanel.ts # Object detail webview
│ ├── exportFeature.ts # Export & structure features ✨
│ ├── categories.ts # Type → category mapping
│ ├── icons.ts # Type → icon file mapping
│ ├── catalog.ts # Data types
│ ├── xmlParse.ts # XML parser
│ └── symbolProvider.ts # CDS/BDEF outline
├── resources/
│ └── icons/ # 24 SVG icons
├── syntaxes/ # CDS textmate grammar
├── schemas/ # JSON validation schemas
├── tools/
│ └── sap_reader.py # Python CLI (optional)
├── out/ # Compiled JS
└── package.json
🤝 Contributing
Bug reports and feature requests are welcome — please open an issue.
Pull requests are not accepted at the moment. SAP Object Explorer is
commercially licensed from v0.3.0 onward, and without a Contributor Licence
Agreement an outside contributor keeps copyright in their contribution to a
product that is being sold. If you would like to contribute code, open an issue
first so a CLA can be put in place.
📝 License
- v0.3.0 and later — commercial licence, see LICENSE.md.
Terms are written but awaiting legal review; packaging is blocked until that is done.
- Data collection — PRIVACY.md. Your source code never leaves your
machine; only licence activation talks to the Licensor.
- v0.2.55 and earlier — MIT, permanently. Relicensing is not retroactive.
- Bundled third-party code — see THIRD-PARTY-NOTICES.md.
Author: Bùi Hoàng Trí Nghĩa (StormShyn) — nghiabht@fpt.com
| |