abapgit-agent 1.3.0 → 1.5.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/.github/workflows/release.yml +4 -1
- package/API.md +179 -1
- package/CLAUDE.md +229 -0
- package/INSTALL.md +6 -11
- package/README.md +11 -0
- package/RELEASE_NOTES.md +44 -0
- package/abap/CLAUDE.md +242 -0
- package/abap/zcl_abgagt_cmd_factory.clas.abap +1 -0
- package/abap/zcl_abgagt_command_inspect.clas.abap +57 -12
- package/abap/zcl_abgagt_command_preview.clas.abap +386 -0
- package/abap/zcl_abgagt_command_preview.clas.xml +15 -0
- package/abap/zcl_abgagt_resource_health.clas.abap +1 -1
- package/abap/zcl_abgagt_resource_inspect.clas.abap +1 -0
- 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/zif_abgagt_command.intf.abap +2 -1
- package/bin/abapgit-agent +370 -17
- package/docs/commands.md +5 -0
- package/docs/inspect-command.md +12 -1
- package/docs/list-command.md +289 -0
- package/docs/preview-command.md +528 -0
- package/docs/pull-command.md +15 -1
- package/package.json +4 -2
- package/scripts/release.js +298 -0
- package/scripts/unrelease.js +277 -0
- package/src/abap-client.js +18 -0
- package/src/agent.js +20 -1
- package/src/config.js +9 -2
|
@@ -14,6 +14,8 @@ jobs:
|
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout code
|
|
16
16
|
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
17
19
|
|
|
18
20
|
- name: Setup Node.js
|
|
19
21
|
uses: actions/setup-node@v4
|
|
@@ -39,6 +41,7 @@ jobs:
|
|
|
39
41
|
- name: Prepare release notes
|
|
40
42
|
id: release_notes
|
|
41
43
|
run: |
|
|
44
|
+
# Read release notes from file (generated by npm run release)
|
|
42
45
|
if [ -f "RELEASE_NOTES.md" ]; then
|
|
43
46
|
# Extract only the current release (first section until --- separator)
|
|
44
47
|
content=$(awk '/^---$/{exit}1' RELEASE_NOTES.md)
|
|
@@ -46,7 +49,7 @@ jobs:
|
|
|
46
49
|
echo "$content" >> $GITHUB_OUTPUT
|
|
47
50
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
48
51
|
else
|
|
49
|
-
echo "CONTENT=
|
|
52
|
+
echo "CONTENT=Release ${{ steps.get_tag.outputs.VERSION }}" >> $GITHUB_OUTPUT
|
|
50
53
|
fi
|
|
51
54
|
|
|
52
55
|
- name: Create GitHub Release
|
package/API.md
CHANGED
|
@@ -12,6 +12,7 @@ The ABAP system exposes these endpoints via SICF handler: `sap/bc/z_abapgit_agen
|
|
|
12
12
|
| POST | `/unit` | Execute unit tests (AUnit) |
|
|
13
13
|
| POST | `/tree` | Display package hierarchy tree |
|
|
14
14
|
| POST | `/view` | View ABAP object definitions |
|
|
15
|
+
| POST | `/preview` | Preview table/CDS view data |
|
|
15
16
|
|
|
16
17
|
## GET /health
|
|
17
18
|
|
|
@@ -441,7 +442,158 @@ View ABAP object definitions directly from ABAP system.
|
|
|
441
442
|
}
|
|
442
443
|
```
|
|
443
444
|
|
|
444
|
-
##
|
|
445
|
+
## POST /preview
|
|
446
|
+
|
|
447
|
+
Preview data from ABAP tables or CDS views directly from the ABAP system. This is useful for exploring table/view contents without writing queries.
|
|
448
|
+
|
|
449
|
+
### Request Body
|
|
450
|
+
|
|
451
|
+
```json
|
|
452
|
+
{
|
|
453
|
+
"objects": ["SFLIGHT", "ZC_MY_CDS_VIEW"],
|
|
454
|
+
"type": "TABL",
|
|
455
|
+
"limit": 10,
|
|
456
|
+
"where": "CARRID = 'AA'",
|
|
457
|
+
"columns": ["CARRID", "CONNID", "PRICE"]
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
| Field | Type | Description |
|
|
462
|
+
|-------|------|-------------|
|
|
463
|
+
| `objects` | Array | List of table/view names (required) |
|
|
464
|
+
| `type` | String | Object type (TABL, DDLS). Auto-detected if not specified |
|
|
465
|
+
| `limit` | Integer | Maximum rows to return (default: 10, max: 100) |
|
|
466
|
+
| `where` | String | WHERE clause filter (e.g., `CARRID = 'AA'`) |
|
|
467
|
+
| `columns` | Array | Column names to display (optional) |
|
|
468
|
+
|
|
469
|
+
### Supported Object Types
|
|
470
|
+
|
|
471
|
+
| Type | Description |
|
|
472
|
+
|------|-------------|
|
|
473
|
+
| TABL | Database table |
|
|
474
|
+
| DDLS | CDS View/Entity |
|
|
475
|
+
|
|
476
|
+
### Auto-Detection Rules
|
|
477
|
+
|
|
478
|
+
If `type` is not specified, the system detects the type from TADIR:
|
|
479
|
+
- CDS views (DDLS) are preferred if found in TADIR
|
|
480
|
+
- Otherwise defaults to table (TABL)
|
|
481
|
+
|
|
482
|
+
### Response (success - table)
|
|
483
|
+
|
|
484
|
+
```json
|
|
485
|
+
{
|
|
486
|
+
"success": true,
|
|
487
|
+
"command": "PREVIEW",
|
|
488
|
+
"message": "Retrieved data",
|
|
489
|
+
"objects": [
|
|
490
|
+
{
|
|
491
|
+
"name": "SFLIGHT",
|
|
492
|
+
"type": "TABL",
|
|
493
|
+
"type_text": "Table",
|
|
494
|
+
"row_count": 5,
|
|
495
|
+
"total_rows": 10,
|
|
496
|
+
"rows": [
|
|
497
|
+
{
|
|
498
|
+
"MANDT": "100",
|
|
499
|
+
"CARRID": "AA",
|
|
500
|
+
"CONNID": 17,
|
|
501
|
+
"FLDATE": "2024-10-24",
|
|
502
|
+
"PRICE": 422.94,
|
|
503
|
+
"CURRENCY": "USD",
|
|
504
|
+
"PLANETYPE": "747-400"
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"fields": [
|
|
508
|
+
{ "field": "MANDT", "type": "CLNT", "length": 3 },
|
|
509
|
+
{ "field": "CARRID", "type": "CHAR", "length": 3 },
|
|
510
|
+
{ "field": "CONNID", "type": "NUMC", "length": 4 },
|
|
511
|
+
{ "field": "FLDATE", "type": "DATS", "length": 8 },
|
|
512
|
+
{ "field": "PRICE", "type": "CURR", "length": 16, "decimals": 2 },
|
|
513
|
+
{ "field": "CURRENCY", "type": "CUKY", "length": 5 }
|
|
514
|
+
],
|
|
515
|
+
"columns_displayed": 6,
|
|
516
|
+
"columns_hidden": ["SEATSMAX", "SEATSOCC", "PAYMENTSUM"],
|
|
517
|
+
"error": ""
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"summary": {
|
|
521
|
+
"total_objects": 1,
|
|
522
|
+
"total_rows": 5
|
|
523
|
+
},
|
|
524
|
+
"error": ""
|
|
525
|
+
}
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Response (success - CDS view)
|
|
529
|
+
|
|
530
|
+
```json
|
|
531
|
+
{
|
|
532
|
+
"success": true,
|
|
533
|
+
"command": "PREVIEW",
|
|
534
|
+
"message": "Retrieved data",
|
|
535
|
+
"objects": [
|
|
536
|
+
{
|
|
537
|
+
"name": "ZC_MY_CDS_VIEW",
|
|
538
|
+
"type": "DDLS",
|
|
539
|
+
"type_text": "CDS View",
|
|
540
|
+
"row_count": 10,
|
|
541
|
+
"total_rows": 25,
|
|
542
|
+
"rows": [
|
|
543
|
+
{
|
|
544
|
+
"PACKAGE": "ZMY_PACKAGE",
|
|
545
|
+
"DESCRIPTION": "My Package",
|
|
546
|
+
"PARENT": "$ZROOT"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"fields": [
|
|
550
|
+
{ "field": "PACKAGE", "type": "CHAR", "length": 30 },
|
|
551
|
+
{ "field": "DESCRIPTION", "type": "CHAR", "length": 60 },
|
|
552
|
+
{ "field": "PARENT", "type": "CHAR", "length": 30 }
|
|
553
|
+
],
|
|
554
|
+
"columns_displayed": 3,
|
|
555
|
+
"columns_hidden": [],
|
|
556
|
+
"error": ""
|
|
557
|
+
}
|
|
558
|
+
],
|
|
559
|
+
"summary": {
|
|
560
|
+
"total_objects": 1,
|
|
561
|
+
"total_rows": 10
|
|
562
|
+
},
|
|
563
|
+
"error": ""
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Response (error - not found)
|
|
568
|
+
|
|
569
|
+
```json
|
|
570
|
+
{
|
|
571
|
+
"success": true,
|
|
572
|
+
"command": "PREVIEW",
|
|
573
|
+
"message": "Retrieved data",
|
|
574
|
+
"objects": [
|
|
575
|
+
{
|
|
576
|
+
"name": "Z_NONEXISTENT",
|
|
577
|
+
"type": "TABL",
|
|
578
|
+
"type_text": "Table",
|
|
579
|
+
"row_count": 0,
|
|
580
|
+
"total_rows": 0,
|
|
581
|
+
"rows": [],
|
|
582
|
+
"fields": [],
|
|
583
|
+
"columns_displayed": 0,
|
|
584
|
+
"columns_hidden": [],
|
|
585
|
+
"error": "Table or view not found: Z_NONEXISTENT"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"summary": {
|
|
589
|
+
"total_objects": 1,
|
|
590
|
+
"total_rows": 0
|
|
591
|
+
},
|
|
592
|
+
"error": ""
|
|
593
|
+
}
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Response Structure
|
|
445
597
|
|
|
446
598
|
### Pull Response Fields
|
|
447
599
|
|
|
@@ -506,6 +658,32 @@ View ABAP object definitions directly from ABAP system.
|
|
|
506
658
|
| `summary` | Object | Summary with total and by_type |
|
|
507
659
|
| `error` | String | Error message (empty if success) |
|
|
508
660
|
|
|
661
|
+
### Preview Response Fields
|
|
662
|
+
|
|
663
|
+
| Field | Type | Description |
|
|
664
|
+
|-------|------|-------------|
|
|
665
|
+
| `success` | Boolean | Whether the request succeeded |
|
|
666
|
+
| `command` | String | Command name ("PREVIEW") |
|
|
667
|
+
| `message` | String | Status message |
|
|
668
|
+
| `objects` | Array | List of table/view results |
|
|
669
|
+
| `summary` | Object | Summary with total_objects and total_rows |
|
|
670
|
+
| `error` | String | Error message (empty if success) |
|
|
671
|
+
|
|
672
|
+
### Preview Object Fields
|
|
673
|
+
|
|
674
|
+
| Field | Type | Description |
|
|
675
|
+
|-------|------|-------------|
|
|
676
|
+
| `name` | String | Table/view name |
|
|
677
|
+
| `type` | String | Object type (TABL, DDLS) |
|
|
678
|
+
| `type_text` | String | Human-readable type (Table, CDS View) |
|
|
679
|
+
| `row_count` | Integer | Number of rows returned |
|
|
680
|
+
| `total_rows` | Integer | Total rows available (before limit) |
|
|
681
|
+
| `rows` | Array | Array of row objects with field:value pairs |
|
|
682
|
+
| `fields` | Array | Field metadata (field, type, length, decimals) |
|
|
683
|
+
| `columns_displayed` | Integer | Number of columns in output |
|
|
684
|
+
| `columns_hidden` | Array | Column names not displayed (if limited) |
|
|
685
|
+
| `error` | String | Error message (empty if success) |
|
|
686
|
+
|
|
509
687
|
### Object Fields (for View)
|
|
510
688
|
|
|
511
689
|
| Field | Type | Description |
|
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,12 +113,21 @@ 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
|
|
|
89
127
|
# Check configuration
|
|
90
128
|
abapgit-agent status
|
|
91
129
|
```
|
|
130
|
+
Note: All ABAP commands automatically check CLI/ABAP API version compatibility.
|
|
92
131
|
|
|
93
132
|
## Pull Command
|
|
94
133
|
|
|
@@ -199,8 +238,21 @@ abapgit-agent inspect --files abap/zc_my_view.ddls.asddls
|
|
|
199
238
|
|
|
200
239
|
# Inspect mixed file types (DDLS + CLAS)
|
|
201
240
|
abapgit-agent inspect --files abap/zc_my_view.ddls.asddls,abap/zcl_my_class.clas.abap
|
|
241
|
+
|
|
242
|
+
# Inspect with specific Code Inspector variant
|
|
243
|
+
abapgit-agent inspect --files abap/zcl_my_class.clas.abap --variant ALL_CHECKS
|
|
244
|
+
|
|
245
|
+
# Inspect with no variant (uses default SAP standard checks)
|
|
246
|
+
abapgit-agent inspect --files abap/zcl_my_class.clas.abap --variant EMPTY
|
|
202
247
|
```
|
|
203
248
|
|
|
249
|
+
### Parameters
|
|
250
|
+
|
|
251
|
+
| Parameter | Required | Description |
|
|
252
|
+
|-----------|----------|-------------|
|
|
253
|
+
| `--files` | Yes | Comma-separated list of ABAP files to inspect |
|
|
254
|
+
| `--variant` | No | Code Inspector variant name (e.g., `ALL_CHECKS`, `EMPTY`) |
|
|
255
|
+
|
|
204
256
|
### Supported Object Types
|
|
205
257
|
|
|
206
258
|
| Type | Description | Validation Method |
|
|
@@ -579,6 +631,148 @@ where devclass not like '$%'
|
|
|
579
631
|
| Object not found | `Object <name> not found` |
|
|
580
632
|
| Invalid object type | `Unsupported object type: <type>` |
|
|
581
633
|
|
|
634
|
+
## Preview Command
|
|
635
|
+
|
|
636
|
+
### Description
|
|
637
|
+
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.
|
|
638
|
+
|
|
639
|
+
**This is the PRIMARY way to explore table and CDS view DATA.**
|
|
640
|
+
|
|
641
|
+
### Usage
|
|
642
|
+
```bash
|
|
643
|
+
# Preview table data (auto-detect type)
|
|
644
|
+
abapgit-agent preview --objects SFLIGHT
|
|
645
|
+
|
|
646
|
+
# Preview CDS view data
|
|
647
|
+
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
648
|
+
|
|
649
|
+
# Preview with explicit type
|
|
650
|
+
abapgit-agent preview --objects SFLIGHT --type TABL
|
|
651
|
+
|
|
652
|
+
# Preview with row limit
|
|
653
|
+
abapgit-agent preview --objects SFLIGHT --limit 20
|
|
654
|
+
|
|
655
|
+
# Preview with WHERE clause filter
|
|
656
|
+
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
657
|
+
|
|
658
|
+
# Preview specific columns only
|
|
659
|
+
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,FLDATE,PRICE
|
|
660
|
+
|
|
661
|
+
# Vertical format (for wide tables)
|
|
662
|
+
abapgit-agent preview --objects SFLIGHT --vertical
|
|
663
|
+
|
|
664
|
+
# JSON output (for scripting/AI processing)
|
|
665
|
+
abapgit-agent preview --objects SFLIGHT --json
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
### Parameters
|
|
669
|
+
|
|
670
|
+
| Parameter | Required | Description |
|
|
671
|
+
|-----------|----------|-------------|
|
|
672
|
+
| `--objects` | Yes | Comma-separated list of table/view names |
|
|
673
|
+
| `--type` | No | Object type (TABL, DDLS). Auto-detected from TADIR if not specified |
|
|
674
|
+
| `--limit` | No | Maximum rows to return (default: 10, max: 100) |
|
|
675
|
+
| `--where` | No | WHERE clause filter (e.g., `CARRID = 'AA'`) |
|
|
676
|
+
| `--columns` | No | Comma-separated column names to display |
|
|
677
|
+
| `--vertical` | No | Show data in vertical format (one field per line) |
|
|
678
|
+
| `--compact` | No | Truncate values to fit columns |
|
|
679
|
+
| `--json` | No | Output raw JSON only |
|
|
680
|
+
|
|
681
|
+
### Output
|
|
682
|
+
|
|
683
|
+
**Default (first 6 columns shown with indicator):**
|
|
684
|
+
```
|
|
685
|
+
📊 Preview: SFLIGHT (Table)
|
|
686
|
+
|
|
687
|
+
┌──────────┬────────┬──────────┬───────────┬─────────┬─────────┐
|
|
688
|
+
│ CARRID │ CONNID │ FLDATE │ PRICE │ CURRENCY│ PLANETYPE│
|
|
689
|
+
├──────────┼────────┼──────────┼───────────┼─────────┼─────────┤
|
|
690
|
+
│ AA │ 0017 │ 20240201 │ 422.94 │ USD │ 747-400 │
|
|
691
|
+
│ AA │ 0017 │ 20240202 │ 422.94 │ USD │ 747-400 │
|
|
692
|
+
└──────────┴────────┴──────────┴───────────┴─────────┴─────────┘
|
|
693
|
+
|
|
694
|
+
Showing 2 of 10 rows
|
|
695
|
+
⚠️ Note: 3 more columns hidden (SEATSMAX, SEATSOCC, PAYMENTSUM)
|
|
696
|
+
Use --columns to select specific columns
|
|
697
|
+
Use --json for full data
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
**With WHERE Filter:**
|
|
701
|
+
```
|
|
702
|
+
📊 Preview: SFLIGHT (filtered)
|
|
703
|
+
|
|
704
|
+
┌──────────┬────────┬──────────┬─────────┐
|
|
705
|
+
│ CARRID │ CONNID │ FLDATE │ PRICE │
|
|
706
|
+
├──────────┼────────┼──────────┼─────────┤
|
|
707
|
+
│ AA │ 0017 │ 20240201 │ 422.94 │
|
|
708
|
+
│ AA │ 0017 │ 20240202 │ 422.94 │
|
|
709
|
+
└──────────┴────────┴──────────┴─────────┘
|
|
710
|
+
|
|
711
|
+
WHERE: CARRID = 'AA'
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
**Vertical Format (for wide tables):**
|
|
715
|
+
```
|
|
716
|
+
📊 Preview: SFLIGHT (1 of 10 rows, vertical)
|
|
717
|
+
|
|
718
|
+
Row 1:
|
|
719
|
+
────────────────────────────────────────────────────────────
|
|
720
|
+
CARRID: AA
|
|
721
|
+
CONNID: 0017
|
|
722
|
+
FLDATE: 20240201
|
|
723
|
+
PRICE: 422.94
|
|
724
|
+
CURRENCY: USD
|
|
725
|
+
PLANETYPE: 747-400
|
|
726
|
+
SEATSMAX: 400
|
|
727
|
+
SEATSOCC: 350
|
|
728
|
+
PAYMENTSUM: 145000
|
|
729
|
+
────────────────────────────────────────────────────────────
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### JSON Output
|
|
733
|
+
```json
|
|
734
|
+
{
|
|
735
|
+
"SUCCESS": true,
|
|
736
|
+
"COMMAND": "PREVIEW",
|
|
737
|
+
"OBJECTS": [
|
|
738
|
+
{
|
|
739
|
+
"NAME": "SFLIGHT",
|
|
740
|
+
"TYPE": "TABL",
|
|
741
|
+
"TYPE_TEXT": "Table",
|
|
742
|
+
"ROW_COUNT": 2,
|
|
743
|
+
"TOTAL_ROWS": 10,
|
|
744
|
+
"ROWS": [
|
|
745
|
+
{ "CARRID": "AA", "CONNID": "0017", "FLDATE": "20240201", "PRICE": "422.94", ... }
|
|
746
|
+
],
|
|
747
|
+
"FIELDS": [
|
|
748
|
+
{ "FIELD": "CARRID", "TYPE": "CHAR", "LENGTH": 3 },
|
|
749
|
+
{ "FIELD": "PRICE", "TYPE": "CURR", "LENGTH": 16 }
|
|
750
|
+
],
|
|
751
|
+
"COLUMNS_DISPLAYED": 6,
|
|
752
|
+
"COLUMNS_HIDDEN": ["SEATSMAX", "SEATSOCC", "PAYMENTSUM"]
|
|
753
|
+
}
|
|
754
|
+
],
|
|
755
|
+
"SUMMARY": { "TOTAL_OBJECTS": 1, "TOTAL_ROWS": 2 },
|
|
756
|
+
"ERROR": ""
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### Error Handling
|
|
761
|
+
|
|
762
|
+
| Error | Message |
|
|
763
|
+
|-------|---------|
|
|
764
|
+
| Table not found | `Table not found: Z_NONEXISTENT` |
|
|
765
|
+
| CDS View not found | `CDS View not found: Z_NONEXISTENT` |
|
|
766
|
+
| Access denied | `Access denied to table: SFLIGHT` |
|
|
767
|
+
| Invalid WHERE clause | `Invalid WHERE clause: <reason>` |
|
|
768
|
+
|
|
769
|
+
### Auto-Detection Rules
|
|
770
|
+
|
|
771
|
+
| Object Name Pattern | Default Type |
|
|
772
|
+
|---------------------|--------------|
|
|
773
|
+
| `ZC_*` or `zc_*` | DDLS (CDS View) |
|
|
774
|
+
| Other | TABL (Table) |
|
|
775
|
+
|
|
582
776
|
## Status Check
|
|
583
777
|
|
|
584
778
|
### Description
|
|
@@ -629,6 +823,7 @@ Create `.abapGitAgent` in repository root:
|
|
|
629
823
|
| `language` | SAP language | EN |
|
|
630
824
|
| `gitUsername` | Git username/token | Optional |
|
|
631
825
|
| `gitPassword` | Git password/token | Optional |
|
|
826
|
+
| `transport` | Default transport request for pull | Optional |
|
|
632
827
|
|
|
633
828
|
### Environment Variables
|
|
634
829
|
```bash
|
|
@@ -640,8 +835,42 @@ export ABAP_PASSWORD="your-password"
|
|
|
640
835
|
export ABAP_LANGUAGE="EN"
|
|
641
836
|
export GIT_USERNAME="git-username"
|
|
642
837
|
export GIT_PASSWORD="git-token"
|
|
838
|
+
export ABAP_TRANSPORT="DEVK900001"
|
|
643
839
|
```
|
|
644
840
|
|
|
841
|
+
### Transport Request Precedence
|
|
842
|
+
|
|
843
|
+
When running `pull` command, the transport request is determined in this order:
|
|
844
|
+
|
|
845
|
+
| Priority | Source | Example |
|
|
846
|
+
|----------|--------|---------|
|
|
847
|
+
| 1 | CLI `--transport` argument | `--transport DEVK900001` |
|
|
848
|
+
| 2 | Config file `transport` | `"transport": "DEVK900001"` |
|
|
849
|
+
| 3 | Environment variable `ABAP_TRANSPORT` | `export ABAP_TRANSPORT="DEVK900001"` |
|
|
850
|
+
| 4 (default) | Not set | abapGit creates/uses default |
|
|
851
|
+
|
|
852
|
+
## Troubleshooting
|
|
853
|
+
|
|
854
|
+
**Pull fails with "Error updating where-used list":**
|
|
855
|
+
- This means SYNTAX ERROR in the object
|
|
856
|
+
- Run `abapgit-agent inspect --files <file>` for detailed errors
|
|
857
|
+
|
|
858
|
+
**Pull shows "Failed Objects" > 0:**
|
|
859
|
+
- Objects failed to activate - check the error messages
|
|
860
|
+
- Fix syntax errors and pull again
|
|
861
|
+
|
|
862
|
+
**Preview/View command fails:**
|
|
863
|
+
- Check table/view exists in the ABAP system
|
|
864
|
+
- Verify credentials in `.abapGitAgent`
|
|
865
|
+
|
|
866
|
+
**"Table or view not found":**
|
|
867
|
+
- Table may not exist or may have different name
|
|
868
|
+
- Use `view` command to check available tables
|
|
869
|
+
|
|
870
|
+
**Terminal width issues with preview:**
|
|
871
|
+
- Use `--columns` to specify exact columns
|
|
872
|
+
- Use `--vertical` for wide tables
|
|
873
|
+
|
|
645
874
|
## Development Workflow
|
|
646
875
|
|
|
647
876
|
### Exploring Unknown ABAP Objects
|
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
|
|
@@ -115,6 +124,7 @@ abapgit-agent health
|
|
|
115
124
|
# Check integration status
|
|
116
125
|
abapgit-agent status
|
|
117
126
|
```
|
|
127
|
+
Note: All ABAP commands automatically check CLI/ABAP API version compatibility.
|
|
118
128
|
|
|
119
129
|
## Local Development
|
|
120
130
|
|
|
@@ -143,6 +153,7 @@ npm run pull -- --url <git-url> --branch main
|
|
|
143
153
|
| unit Command | [docs/unit-command.md](docs/unit-command.md) |
|
|
144
154
|
| tree Command | [docs/tree-command.md](docs/tree-command.md) |
|
|
145
155
|
| view Command | [docs/view-command.md](docs/view-command.md) |
|
|
156
|
+
| preview Command | [docs/preview-command.md](docs/preview-command.md) |
|
|
146
157
|
| REST API Reference | [API.md](API.md) |
|
|
147
158
|
| Error Handling | [ERROR_HANDLING.md](ERROR_HANDLING.md) |
|
|
148
159
|
| ABAP Coding Guidelines | [abap/CLAUDE.md](abap/CLAUDE.md) |
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
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
|
+
|
|
3
47
|
## v1.3.0
|
|
4
48
|
|
|
5
49
|
### New Features
|