abapgit-agent 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +440 -1
- package/CLAUDE.md +354 -16
- package/INSTALL.md +6 -11
- package/README.md +10 -0
- package/RELEASE_NOTES.md +57 -0
- package/abap/CLAUDE.md +340 -0
- package/abap/copilot-instructions.md +28 -0
- package/abap/zcl_abgagt_agent.clas.abap +2 -2
- package/abap/zcl_abgagt_cmd_factory.clas.abap +1 -0
- package/abap/zcl_abgagt_command_inspect.clas.abap +255 -36
- package/abap/zcl_abgagt_command_preview.clas.abap +386 -0
- package/abap/zcl_abgagt_command_preview.clas.xml +15 -0
- package/abap/zcl_abgagt_command_view.clas.abap +3 -1
- package/abap/zcl_abgagt_resource_preview.clas.abap +67 -0
- package/abap/zcl_abgagt_resource_preview.clas.xml +15 -0
- package/abap/zcl_abgagt_rest_handler.clas.abap +1 -0
- package/abap/zcl_abgagt_util.clas.abap +2 -2
- package/abap/zcl_abgagt_viewer_ddls.clas.abap +83 -0
- package/abap/zcl_abgagt_viewer_ddls.clas.xml +15 -0
- package/abap/zcl_abgagt_viewer_ttyp.clas.abap +93 -0
- package/abap/zcl_abgagt_viewer_ttyp.clas.xml +15 -0
- package/abap/zif_abgagt_command.intf.abap +2 -1
- package/abap/zif_abgagt_viewer.intf.abap +2 -1
- package/bin/abapgit-agent +447 -40
- package/docs/commands.md +5 -0
- package/docs/preview-command.md +528 -0
- package/docs/view-command.md +94 -2
- package/package.json +1 -1
- package/src/abap-client.js +18 -0
- package/src/agent.js +19 -0
package/CLAUDE.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
This is the **abapgit-agent** CLI tool project - a Node.js application for pulling and activating ABAP code from git repositories.
|
|
4
4
|
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Quick commands
|
|
9
|
+
abapgit-agent pull # Pull and activate all
|
|
10
|
+
abapgit-agent pull --files file.clas.abap # Pull specific file(s)
|
|
11
|
+
abapgit-agent inspect --files file.clas.abap # Syntax check
|
|
12
|
+
abapgit-agent unit --files test.clas.testclasses.abap # Run tests
|
|
13
|
+
abapgit-agent preview --objects TABLE # Preview table data
|
|
14
|
+
abapgit-agent view --objects OBJ # View object definition
|
|
15
|
+
abapgit-agent tree --package $PACKAGE # Show package hierarchy
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Common Tasks
|
|
19
|
+
|
|
20
|
+
**Making code changes:**
|
|
21
|
+
```bash
|
|
22
|
+
1. Edit ABAP file(s)
|
|
23
|
+
2. git add && git commit && git push
|
|
24
|
+
3. abapgit-agent pull --files file.clas.abap
|
|
25
|
+
4. Check for errors in output
|
|
26
|
+
5. If "Error updating where-used list" → use inspect for details
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Exploring unknown tables:**
|
|
30
|
+
```bash
|
|
31
|
+
abapgit-agent preview --objects SFLIGHT # See sample data
|
|
32
|
+
abapgit-agent view --objects SFLIGHT --type TABL # See structure
|
|
33
|
+
```
|
|
34
|
+
|
|
5
35
|
## Project Structure
|
|
6
36
|
|
|
7
37
|
```
|
|
@@ -83,6 +113,14 @@ abapgit-agent view --objects ZCL_MY_CLASS
|
|
|
83
113
|
abapgit-agent view --objects ZIF_MY_INTERFACE --type INTF
|
|
84
114
|
abapgit-agent view --objects ZCL_CLASS1,ZCL_CLASS2 --json
|
|
85
115
|
|
|
116
|
+
# Preview table/CDS view data
|
|
117
|
+
abapgit-agent preview --objects SFLIGHT
|
|
118
|
+
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
119
|
+
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,PRICE --limit 20
|
|
120
|
+
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
121
|
+
abapgit-agent preview --objects SFLIGHT --vertical
|
|
122
|
+
abapgit-agent preview --objects SFLIGHT --compact
|
|
123
|
+
|
|
86
124
|
# Health check
|
|
87
125
|
abapgit-agent health
|
|
88
126
|
|
|
@@ -181,6 +219,75 @@ abapgit-agent health
|
|
|
181
219
|
}
|
|
182
220
|
```
|
|
183
221
|
|
|
222
|
+
## Inspect Command
|
|
223
|
+
|
|
224
|
+
### Description
|
|
225
|
+
Run syntax check for ABAP objects. Supports both regular ABAP objects (classes, interfaces, programs) and CDS views (DDLS).
|
|
226
|
+
|
|
227
|
+
### Usage
|
|
228
|
+
```bash
|
|
229
|
+
# Inspect single file
|
|
230
|
+
abapgit-agent inspect --files abap/zcl_my_class.clas.abap
|
|
231
|
+
|
|
232
|
+
# Inspect multiple files
|
|
233
|
+
abapgit-agent inspect --files abap/zcl_class1.clas.abap,abap/zcl_class2.clas.abap
|
|
234
|
+
|
|
235
|
+
# Inspect CDS view
|
|
236
|
+
abapgit-agent inspect --files abap/zc_my_view.ddls.asddls
|
|
237
|
+
|
|
238
|
+
# Inspect mixed file types (DDLS + CLAS)
|
|
239
|
+
abapgit-agent inspect --files abap/zc_my_view.ddls.asddls,abap/zcl_my_class.clas.abap
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Supported Object Types
|
|
243
|
+
|
|
244
|
+
| Type | Description | Validation Method |
|
|
245
|
+
|------|-------------|------------------|
|
|
246
|
+
| CLAS | Class | Code Inspector (SCI) |
|
|
247
|
+
| INTF | Interface | Code Inspector (SCI) |
|
|
248
|
+
| PROG | Program | Code Inspector (SCI) |
|
|
249
|
+
| FUGR | Function Group | Code Inspector (SCI) |
|
|
250
|
+
| DDLS | CDS View/Entity | DDL Handler (CL_DD_DDL_HANDLER_FACTORY) |
|
|
251
|
+
|
|
252
|
+
### Output
|
|
253
|
+
|
|
254
|
+
**Passed:**
|
|
255
|
+
```
|
|
256
|
+
✅ CLAS ZCL_MY_CLASS - Syntax check passed
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**With Warnings:**
|
|
260
|
+
```
|
|
261
|
+
⚠️ DDLS ZC_MY_VIEW - Syntax check passed with warnings (4):
|
|
262
|
+
|
|
263
|
+
Warnings:
|
|
264
|
+
────────────────────────────────────────────────────────────
|
|
265
|
+
Line 9 : ParentPackage
|
|
266
|
+
Line 11 : SoftwareComponent
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Failed:**
|
|
270
|
+
```
|
|
271
|
+
❌ DDLS ZC_MY_VIEW - Syntax check failed (1 error(s)):
|
|
272
|
+
|
|
273
|
+
Errors:
|
|
274
|
+
────────────────────────────────────────────────────────────
|
|
275
|
+
Line 21, Column 12: Error message text
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Key Behaviors
|
|
279
|
+
|
|
280
|
+
1. **Multiple files in one request** - All files are sent in a single API call for better performance
|
|
281
|
+
2. **CDS View validation** - Uses `CL_DD_DDL_HANDLER_FACTORY` to validate CDS views
|
|
282
|
+
3. **Check inactive version first** - For CDS views, checks the inactive version first (`get_state = 'M'`), then falls back to active version
|
|
283
|
+
4. **Detailed error messages** - Uses `get_errors()` and `get_warnings()` methods from the exception to get detailed information
|
|
284
|
+
5. **Per-object results** - Returns results for each object individually
|
|
285
|
+
|
|
286
|
+
### File Format
|
|
287
|
+
Files are parsed to extract `(obj_type, obj_name)`:
|
|
288
|
+
- `zcl_my_class.clas.abap` → CLAS, ZCL_MY_CLASS
|
|
289
|
+
- `zc_my_view.ddls.asddls` → DDLS, ZC_MY_VIEW
|
|
290
|
+
|
|
184
291
|
## Unit Command
|
|
185
292
|
|
|
186
293
|
### Description
|
|
@@ -371,6 +478,9 @@ abapgit-agent view --objects ZMY_STRUCT --type STRU
|
|
|
371
478
|
# View data element type information
|
|
372
479
|
abapgit-agent view --objects ZMY_DTEL --type DTEL
|
|
373
480
|
|
|
481
|
+
# View CDS view definition
|
|
482
|
+
abapgit-agent view --objects ZC_MY_CDS_VIEW --type DDLS
|
|
483
|
+
|
|
374
484
|
# View class interface and methods
|
|
375
485
|
abapgit-agent view --objects ZCL_UNKNOWN_CLASS
|
|
376
486
|
|
|
@@ -378,6 +488,24 @@ abapgit-agent view --objects ZCL_UNKNOWN_CLASS
|
|
|
378
488
|
abapgit-agent view --objects ZIF_UNKNOWN_INTERFACE
|
|
379
489
|
```
|
|
380
490
|
|
|
491
|
+
### When to Use View Command
|
|
492
|
+
|
|
493
|
+
AI assistant SHOULD call `view` command when:
|
|
494
|
+
|
|
495
|
+
- User asks to "check", "look up", or "explore" an unfamiliar object
|
|
496
|
+
- Working with a table/structure and you don't know the field names/types
|
|
497
|
+
- Calling a class/interface method and you don't know the parameters
|
|
498
|
+
- User provides an object name that may not exist in the git repository
|
|
499
|
+
- You need to verify an object exists before using it
|
|
500
|
+
|
|
501
|
+
**Example workflow:**
|
|
502
|
+
```
|
|
503
|
+
User: "Check if SFLIGHT table has a PRICE field"
|
|
504
|
+
|
|
505
|
+
Assistant: <calls `abapgit-agent view --objects SFLIGHT --type TABL`>
|
|
506
|
+
→ Shows table structure with all fields including PRICE
|
|
507
|
+
```
|
|
508
|
+
|
|
381
509
|
### Usage
|
|
382
510
|
```bash
|
|
383
511
|
# View single object (auto-detect type from TADIR)
|
|
@@ -401,29 +529,37 @@ abapgit-agent view --objects ZCL_MY_CLASS --json
|
|
|
401
529
|
| Parameter | Required | Description |
|
|
402
530
|
|-----------|----------|-------------|
|
|
403
531
|
| `--objects` | Yes | Comma-separated list of object names (e.g., `ZCL_MY_CLASS,ZIF_MY_INTERFACE`) |
|
|
404
|
-
| `--type` | No | Object type
|
|
532
|
+
| `--type` | No | Object type (CLAS, INTF, TABL, STRU, DTEL, TTYP, DDLS). Auto-detected from TADIR if not specified |
|
|
405
533
|
| `--json` | No | Output raw JSON only (for scripting) |
|
|
406
534
|
|
|
407
535
|
### Supported Object Types
|
|
408
536
|
|
|
409
|
-
| Type | Description |
|
|
410
|
-
|
|
411
|
-
| CLAS | Class |
|
|
412
|
-
| INTF | Interface |
|
|
413
|
-
| TABL | Table |
|
|
414
|
-
| STRU | Structure |
|
|
415
|
-
| DTEL | Data Element |
|
|
537
|
+
| Type | Description |
|
|
538
|
+
|------|-------------|
|
|
539
|
+
| CLAS | Class |
|
|
540
|
+
| INTF | Interface |
|
|
541
|
+
| TABL | Table |
|
|
542
|
+
| STRU | Structure |
|
|
543
|
+
| DTEL | Data Element |
|
|
544
|
+
| TTYP | Table Type |
|
|
545
|
+
| DDLS | CDS View/Entity |
|
|
546
|
+
|
|
547
|
+
**Note:** Object type is automatically detected from TADIR. Use `--type` only when you know the type and want to override auto-detection.
|
|
416
548
|
|
|
417
549
|
### Output
|
|
418
550
|
|
|
419
551
|
**Human-readable:**
|
|
420
552
|
```
|
|
421
553
|
📖 ZCL_MY_CLASS (Class)
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
554
|
+
Class ZCL_MY_CLASS in $PACKAGE
|
|
555
|
+
|
|
556
|
+
CLASS zcl_my_class DEFINITION PUBLIC.
|
|
557
|
+
|
|
558
|
+
PUBLIC SECTION.
|
|
559
|
+
INTERFACES: zif_my_interface.
|
|
560
|
+
METHODS: constructor,
|
|
561
|
+
get_value RETURNING VALUE(rv_result) TYPE string.
|
|
562
|
+
ENDCLASS.
|
|
427
563
|
```
|
|
428
564
|
|
|
429
565
|
**JSON Output:**
|
|
@@ -431,20 +567,49 @@ abapgit-agent view --objects ZCL_MY_CLASS --json
|
|
|
431
567
|
{
|
|
432
568
|
"success": true,
|
|
433
569
|
"command": "VIEW",
|
|
434
|
-
"message": "Retrieved
|
|
570
|
+
"message": "Retrieved object(s)",
|
|
435
571
|
"objects": [
|
|
436
572
|
{
|
|
437
573
|
"name": "ZCL_MY_CLASS",
|
|
438
574
|
"type": "CLAS",
|
|
439
575
|
"type_text": "Class",
|
|
440
|
-
"description": "
|
|
441
|
-
"
|
|
576
|
+
"description": "Class ZCL_MY_CLASS in $PACKAGE",
|
|
577
|
+
"source": "CLASS zcl_my_class DEFINITION PUBLIC...",
|
|
578
|
+
"not_found": false
|
|
442
579
|
}
|
|
443
580
|
],
|
|
444
581
|
"summary": { "total": 1 }
|
|
445
582
|
}
|
|
446
583
|
```
|
|
447
584
|
|
|
585
|
+
**Table Type Output:**
|
|
586
|
+
```
|
|
587
|
+
📖 ZMY_TTYP (Table Type)
|
|
588
|
+
Table Type ZMY_TTYP in $PACKAGE
|
|
589
|
+
|
|
590
|
+
Line Type: ZMY_STRUCTURE
|
|
591
|
+
Access Mode: STANDARD
|
|
592
|
+
Key Definition: WITH KEY
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**CDS View Output:**
|
|
596
|
+
```
|
|
597
|
+
📖 ZC_MY_CDS_VIEW (CDS View)
|
|
598
|
+
CDS View ZC_MY_CDS_VIEW in $PACKAGE
|
|
599
|
+
|
|
600
|
+
@AbapCatalog.sqlViewName: 'ZCMYVIEW'
|
|
601
|
+
@AbapCatalog.compiler.compareFilter: true
|
|
602
|
+
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
603
|
+
@EndUserText.label: 'My CDS View'
|
|
604
|
+
define view ZC_MY_CDS_VIEW as select from tdevc
|
|
605
|
+
{
|
|
606
|
+
key devclass as Devclass,
|
|
607
|
+
parentcl as ParentPackage,
|
|
608
|
+
ctext as Description
|
|
609
|
+
}
|
|
610
|
+
where devclass not like '$%'
|
|
611
|
+
```
|
|
612
|
+
|
|
448
613
|
### Error Handling
|
|
449
614
|
|
|
450
615
|
| Error | Message |
|
|
@@ -452,6 +617,148 @@ abapgit-agent view --objects ZCL_MY_CLASS --json
|
|
|
452
617
|
| Object not found | `Object <name> not found` |
|
|
453
618
|
| Invalid object type | `Unsupported object type: <type>` |
|
|
454
619
|
|
|
620
|
+
## Preview Command
|
|
621
|
+
|
|
622
|
+
### Description
|
|
623
|
+
Preview data from ABAP tables or CDS views directly from the ABAP system. This command retrieves sample data rows to help developers understand table/view contents without needing to query manually.
|
|
624
|
+
|
|
625
|
+
**This is the PRIMARY way to explore table and CDS view DATA.**
|
|
626
|
+
|
|
627
|
+
### Usage
|
|
628
|
+
```bash
|
|
629
|
+
# Preview table data (auto-detect type)
|
|
630
|
+
abapgit-agent preview --objects SFLIGHT
|
|
631
|
+
|
|
632
|
+
# Preview CDS view data
|
|
633
|
+
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
634
|
+
|
|
635
|
+
# Preview with explicit type
|
|
636
|
+
abapgit-agent preview --objects SFLIGHT --type TABL
|
|
637
|
+
|
|
638
|
+
# Preview with row limit
|
|
639
|
+
abapgit-agent preview --objects SFLIGHT --limit 20
|
|
640
|
+
|
|
641
|
+
# Preview with WHERE clause filter
|
|
642
|
+
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
643
|
+
|
|
644
|
+
# Preview specific columns only
|
|
645
|
+
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,FLDATE,PRICE
|
|
646
|
+
|
|
647
|
+
# Vertical format (for wide tables)
|
|
648
|
+
abapgit-agent preview --objects SFLIGHT --vertical
|
|
649
|
+
|
|
650
|
+
# JSON output (for scripting/AI processing)
|
|
651
|
+
abapgit-agent preview --objects SFLIGHT --json
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
### Parameters
|
|
655
|
+
|
|
656
|
+
| Parameter | Required | Description |
|
|
657
|
+
|-----------|----------|-------------|
|
|
658
|
+
| `--objects` | Yes | Comma-separated list of table/view names |
|
|
659
|
+
| `--type` | No | Object type (TABL, DDLS). Auto-detected from TADIR if not specified |
|
|
660
|
+
| `--limit` | No | Maximum rows to return (default: 10, max: 100) |
|
|
661
|
+
| `--where` | No | WHERE clause filter (e.g., `CARRID = 'AA'`) |
|
|
662
|
+
| `--columns` | No | Comma-separated column names to display |
|
|
663
|
+
| `--vertical` | No | Show data in vertical format (one field per line) |
|
|
664
|
+
| `--compact` | No | Truncate values to fit columns |
|
|
665
|
+
| `--json` | No | Output raw JSON only |
|
|
666
|
+
|
|
667
|
+
### Output
|
|
668
|
+
|
|
669
|
+
**Default (first 6 columns shown with indicator):**
|
|
670
|
+
```
|
|
671
|
+
📊 Preview: SFLIGHT (Table)
|
|
672
|
+
|
|
673
|
+
┌──────────┬────────┬──────────┬───────────┬─────────┬─────────┐
|
|
674
|
+
│ CARRID │ CONNID │ FLDATE │ PRICE │ CURRENCY│ PLANETYPE│
|
|
675
|
+
├──────────┼────────┼──────────┼───────────┼─────────┼─────────┤
|
|
676
|
+
│ AA │ 0017 │ 20240201 │ 422.94 │ USD │ 747-400 │
|
|
677
|
+
│ AA │ 0017 │ 20240202 │ 422.94 │ USD │ 747-400 │
|
|
678
|
+
└──────────┴────────┴──────────┴───────────┴─────────┴─────────┘
|
|
679
|
+
|
|
680
|
+
Showing 2 of 10 rows
|
|
681
|
+
⚠️ Note: 3 more columns hidden (SEATSMAX, SEATSOCC, PAYMENTSUM)
|
|
682
|
+
Use --columns to select specific columns
|
|
683
|
+
Use --json for full data
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
**With WHERE Filter:**
|
|
687
|
+
```
|
|
688
|
+
📊 Preview: SFLIGHT (filtered)
|
|
689
|
+
|
|
690
|
+
┌──────────┬────────┬──────────┬─────────┐
|
|
691
|
+
│ CARRID │ CONNID │ FLDATE │ PRICE │
|
|
692
|
+
├──────────┼────────┼──────────┼─────────┤
|
|
693
|
+
│ AA │ 0017 │ 20240201 │ 422.94 │
|
|
694
|
+
│ AA │ 0017 │ 20240202 │ 422.94 │
|
|
695
|
+
└──────────┴────────┴──────────┴─────────┘
|
|
696
|
+
|
|
697
|
+
WHERE: CARRID = 'AA'
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
**Vertical Format (for wide tables):**
|
|
701
|
+
```
|
|
702
|
+
📊 Preview: SFLIGHT (1 of 10 rows, vertical)
|
|
703
|
+
|
|
704
|
+
Row 1:
|
|
705
|
+
────────────────────────────────────────────────────────────
|
|
706
|
+
CARRID: AA
|
|
707
|
+
CONNID: 0017
|
|
708
|
+
FLDATE: 20240201
|
|
709
|
+
PRICE: 422.94
|
|
710
|
+
CURRENCY: USD
|
|
711
|
+
PLANETYPE: 747-400
|
|
712
|
+
SEATSMAX: 400
|
|
713
|
+
SEATSOCC: 350
|
|
714
|
+
PAYMENTSUM: 145000
|
|
715
|
+
────────────────────────────────────────────────────────────
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### JSON Output
|
|
719
|
+
```json
|
|
720
|
+
{
|
|
721
|
+
"SUCCESS": true,
|
|
722
|
+
"COMMAND": "PREVIEW",
|
|
723
|
+
"OBJECTS": [
|
|
724
|
+
{
|
|
725
|
+
"NAME": "SFLIGHT",
|
|
726
|
+
"TYPE": "TABL",
|
|
727
|
+
"TYPE_TEXT": "Table",
|
|
728
|
+
"ROW_COUNT": 2,
|
|
729
|
+
"TOTAL_ROWS": 10,
|
|
730
|
+
"ROWS": [
|
|
731
|
+
{ "CARRID": "AA", "CONNID": "0017", "FLDATE": "20240201", "PRICE": "422.94", ... }
|
|
732
|
+
],
|
|
733
|
+
"FIELDS": [
|
|
734
|
+
{ "FIELD": "CARRID", "TYPE": "CHAR", "LENGTH": 3 },
|
|
735
|
+
{ "FIELD": "PRICE", "TYPE": "CURR", "LENGTH": 16 }
|
|
736
|
+
],
|
|
737
|
+
"COLUMNS_DISPLAYED": 6,
|
|
738
|
+
"COLUMNS_HIDDEN": ["SEATSMAX", "SEATSOCC", "PAYMENTSUM"]
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
"SUMMARY": { "TOTAL_OBJECTS": 1, "TOTAL_ROWS": 2 },
|
|
742
|
+
"ERROR": ""
|
|
743
|
+
}
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Error Handling
|
|
747
|
+
|
|
748
|
+
| Error | Message |
|
|
749
|
+
|-------|---------|
|
|
750
|
+
| Table not found | `Table not found: Z_NONEXISTENT` |
|
|
751
|
+
| CDS View not found | `CDS View not found: Z_NONEXISTENT` |
|
|
752
|
+
| Access denied | `Access denied to table: SFLIGHT` |
|
|
753
|
+
| Invalid WHERE clause | `Invalid WHERE clause: <reason>` |
|
|
754
|
+
|
|
755
|
+
### Auto-Detection Rules
|
|
756
|
+
|
|
757
|
+
| Object Name Pattern | Default Type |
|
|
758
|
+
|---------------------|--------------|
|
|
759
|
+
| `ZC_*` or `zc_*` | DDLS (CDS View) |
|
|
760
|
+
| Other | TABL (Table) |
|
|
761
|
+
|
|
455
762
|
## Status Check
|
|
456
763
|
|
|
457
764
|
### Description
|
|
@@ -515,10 +822,37 @@ export GIT_USERNAME="git-username"
|
|
|
515
822
|
export GIT_PASSWORD="git-token"
|
|
516
823
|
```
|
|
517
824
|
|
|
825
|
+
## Troubleshooting
|
|
826
|
+
|
|
827
|
+
**Pull fails with "Error updating where-used list":**
|
|
828
|
+
- This means SYNTAX ERROR in the object
|
|
829
|
+
- Run `abapgit-agent inspect --files <file>` for detailed errors
|
|
830
|
+
|
|
831
|
+
**Pull shows "Failed Objects" > 0:**
|
|
832
|
+
- Objects failed to activate - check the error messages
|
|
833
|
+
- Fix syntax errors and pull again
|
|
834
|
+
|
|
835
|
+
**Preview/View command fails:**
|
|
836
|
+
- Check table/view exists in the ABAP system
|
|
837
|
+
- Verify credentials in `.abapGitAgent`
|
|
838
|
+
|
|
839
|
+
**"Table or view not found":**
|
|
840
|
+
- Table may not exist or may have different name
|
|
841
|
+
- Use `view` command to check available tables
|
|
842
|
+
|
|
843
|
+
**Terminal width issues with preview:**
|
|
844
|
+
- Use `--columns` to specify exact columns
|
|
845
|
+
- Use `--vertical` for wide tables
|
|
846
|
+
|
|
518
847
|
## Development Workflow
|
|
519
848
|
|
|
520
849
|
### Exploring Unknown ABAP Objects
|
|
521
850
|
|
|
851
|
+
**Check package structure:**
|
|
852
|
+
```bash
|
|
853
|
+
abapgit-agent tree --package $MY_PACKAGE
|
|
854
|
+
```
|
|
855
|
+
|
|
522
856
|
**Before working with an unfamiliar table, structure, class, or interface:**
|
|
523
857
|
|
|
524
858
|
```bash
|
|
@@ -573,6 +907,10 @@ For quick ABAP code changes:
|
|
|
573
907
|
4. Verify activation results
|
|
574
908
|
5. Repeat until done
|
|
575
909
|
|
|
910
|
+
## Creating CDS Views
|
|
911
|
+
|
|
912
|
+
For guidelines on creating CDS views and CDS view entities, see **ABAP Code Generation** below.
|
|
913
|
+
|
|
576
914
|
## For ABAP Code Generation
|
|
577
915
|
|
|
578
916
|
**NOTE**: This file is for developing the CLI tool itself. For guidelines on **generating ABAP code** for abapGit repositories, see `/abap/CLAUDE.md`. Copy that file to your ABAP repository root when setting up new projects.
|
package/INSTALL.md
CHANGED
|
@@ -12,17 +12,12 @@ Claude (VS Code) → CLI Tool → ABAP System (REST/HTTP)
|
|
|
12
12
|
|
|
13
13
|
### ABAP Side - REST Implementation
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| `zcl_abgagt_resource_inspect.clas.abap` | Class | POST /inspect handler |
|
|
22
|
-
| `zcl_abgagt_resource_unit.clas.abap` | Class | POST /unit handler |
|
|
23
|
-
| `zcl_abgagt_resource_health.clas.abap` | Class | GET /health handler |
|
|
24
|
-
|
|
25
|
-
**Note:** Error details are returned directly in the REST response via `error_detail` field.
|
|
15
|
+
The ABAP backend consists of:
|
|
16
|
+
- **Main agent** - Core logic for pull, inspect, unit operations
|
|
17
|
+
- **REST handler** - Routes HTTP requests to appropriate resources
|
|
18
|
+
- **Resource handlers** - Individual endpoints (/pull, /inspect, /unit, /tree, /view, /preview, /health)
|
|
19
|
+
|
|
20
|
+
Deploy all ABAP objects using abapGit from the `/abap` folder.
|
|
26
21
|
|
|
27
22
|
### CLI Tool (Node.js)
|
|
28
23
|
- REST client for ABAP communication
|
package/README.md
CHANGED
|
@@ -104,6 +104,15 @@ abapgit-agent tree --package $MY_PACKAGE
|
|
|
104
104
|
abapgit-agent view --objects ZCL_MY_CLASS
|
|
105
105
|
abapgit-agent view --objects SFLIGHT --type TABL
|
|
106
106
|
abapgit-agent view --objects S_CARR_ID --type DTEL
|
|
107
|
+
|
|
108
|
+
# Preview table or CDS view data
|
|
109
|
+
abapgit-agent preview --objects SFLIGHT
|
|
110
|
+
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
111
|
+
abapgit-agent preview --objects SFLIGHT --limit 20
|
|
112
|
+
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
113
|
+
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,PRICE
|
|
114
|
+
abapgit-agent preview --objects SFLIGHT --vertical
|
|
115
|
+
abapgit-agent preview --objects SFLIGHT --compact
|
|
107
116
|
```
|
|
108
117
|
|
|
109
118
|
### Utility Commands
|
|
@@ -143,6 +152,7 @@ npm run pull -- --url <git-url> --branch main
|
|
|
143
152
|
| unit Command | [docs/unit-command.md](docs/unit-command.md) |
|
|
144
153
|
| tree Command | [docs/tree-command.md](docs/tree-command.md) |
|
|
145
154
|
| view Command | [docs/view-command.md](docs/view-command.md) |
|
|
155
|
+
| preview Command | [docs/preview-command.md](docs/preview-command.md) |
|
|
146
156
|
| REST API Reference | [API.md](API.md) |
|
|
147
157
|
| Error Handling | [ERROR_HANDLING.md](ERROR_HANDLING.md) |
|
|
148
158
|
| ABAP Coding Guidelines | [abap/CLAUDE.md](abap/CLAUDE.md) |
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## v1.4.0
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
#### preview Command
|
|
8
|
+
Preview data from ABAP tables or CDS views directly from the ABAP system:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# Preview table data (auto-detect type)
|
|
12
|
+
abapgit-agent preview --objects SFLIGHT
|
|
13
|
+
|
|
14
|
+
# Preview CDS view data
|
|
15
|
+
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
16
|
+
|
|
17
|
+
# Preview with row limit
|
|
18
|
+
abapgit-agent preview --objects SFLIGHT --limit 20
|
|
19
|
+
|
|
20
|
+
# Preview with WHERE clause filter
|
|
21
|
+
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
22
|
+
|
|
23
|
+
# Preview specific columns only
|
|
24
|
+
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,PRICE
|
|
25
|
+
|
|
26
|
+
# Vertical format (for wide tables)
|
|
27
|
+
abapgit-agent preview --objects SFLIGHT --vertical
|
|
28
|
+
|
|
29
|
+
# Compact mode (truncated values)
|
|
30
|
+
abapgit-agent preview --objects SFLIGHT --compact
|
|
31
|
+
|
|
32
|
+
# JSON output
|
|
33
|
+
abapgit-agent preview --objects SFLIGHT --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Documentation
|
|
37
|
+
|
|
38
|
+
- Added comprehensive docs/preview-command.md
|
|
39
|
+
- Updated API.md with /preview endpoint
|
|
40
|
+
- Updated IMPLEMENTATION_PLAN.md with tree, view, preview commands
|
|
41
|
+
- Simplified INSTALL.md ABAP components section
|
|
42
|
+
- Updated README.md with preview command examples
|
|
43
|
+
- Improved CLAUDE.md files with best practices
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## v1.3.0
|
|
48
|
+
|
|
49
|
+
### New Features
|
|
50
|
+
|
|
51
|
+
- **view Command**: Now supports TTYP (Table Type) and DDLS (CDS View)
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
- Fixed CDS view source display in view command
|
|
56
|
+
- Fixed interface exception handling
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
3
60
|
## v1.2.0
|
|
4
61
|
|
|
5
62
|
### New Features
|