abapgit-agent 1.4.0 β 1.6.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/README.md +2 -0
- package/abap/guidelines/00_index.md +35 -0
- package/abap/guidelines/01_sql.md +72 -0
- package/abap/guidelines/02_exceptions.md +108 -0
- package/abap/guidelines/03_testing.md +252 -0
- package/abap/guidelines/04_cds.md +120 -0
- package/abap/guidelines/05_classes.md +50 -0
- package/abap/guidelines/06_objects.md +103 -0
- package/abap/guidelines/07_json.md +22 -0
- package/abap/guidelines/08_abapgit.md +193 -0
- package/bin/abapgit-agent +597 -44
- package/bin/abgagt +24 -0
- package/package.json +11 -3
- package/src/abap-client.js +65 -2
- package/src/agent.js +58 -4
- package/src/config.js +9 -2
- package/src/ref-search.js +989 -0
- package/.abapGitAgent.example +0 -11
- package/.github/workflows/release.yml +0 -57
- package/API.md +0 -710
- package/CLAUDE.md +0 -1031
- package/CLAUDE_MEM.md +0 -88
- package/ERROR_HANDLING.md +0 -30
- package/INSTALL.md +0 -155
- package/RELEASE_NOTES.md +0 -143
- package/abap/CLAUDE.md +0 -898
- package/abap/copilot-instructions.md +0 -79
- package/abap/package.devc.xml +0 -10
- package/abap/zcl_abgagt_agent.clas.abap +0 -420
- package/abap/zcl_abgagt_agent.clas.xml +0 -15
- package/abap/zcl_abgagt_cmd_factory.clas.abap +0 -48
- package/abap/zcl_abgagt_cmd_factory.clas.xml +0 -15
- package/abap/zcl_abgagt_command_create.clas.abap +0 -95
- package/abap/zcl_abgagt_command_create.clas.xml +0 -15
- package/abap/zcl_abgagt_command_import.clas.abap +0 -138
- package/abap/zcl_abgagt_command_import.clas.xml +0 -15
- package/abap/zcl_abgagt_command_inspect.clas.abap +0 -411
- package/abap/zcl_abgagt_command_inspect.clas.testclasses.abap +0 -121
- package/abap/zcl_abgagt_command_inspect.clas.xml +0 -16
- package/abap/zcl_abgagt_command_preview.clas.abap +0 -386
- package/abap/zcl_abgagt_command_preview.clas.xml +0 -15
- package/abap/zcl_abgagt_command_pull.clas.abap +0 -80
- package/abap/zcl_abgagt_command_pull.clas.testclasses.abap +0 -87
- package/abap/zcl_abgagt_command_pull.clas.xml +0 -16
- package/abap/zcl_abgagt_command_tree.clas.abap +0 -237
- package/abap/zcl_abgagt_command_tree.clas.xml +0 -15
- package/abap/zcl_abgagt_command_unit.clas.abap +0 -297
- package/abap/zcl_abgagt_command_unit.clas.xml +0 -15
- package/abap/zcl_abgagt_command_view.clas.abap +0 -240
- package/abap/zcl_abgagt_command_view.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_create.clas.abap +0 -71
- package/abap/zcl_abgagt_resource_create.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_health.clas.abap +0 -25
- package/abap/zcl_abgagt_resource_health.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_import.clas.abap +0 -66
- package/abap/zcl_abgagt_resource_import.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_inspect.clas.abap +0 -62
- package/abap/zcl_abgagt_resource_inspect.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_preview.clas.abap +0 -67
- package/abap/zcl_abgagt_resource_preview.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_pull.clas.abap +0 -71
- package/abap/zcl_abgagt_resource_pull.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_tree.clas.abap +0 -70
- package/abap/zcl_abgagt_resource_tree.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_unit.clas.abap +0 -64
- package/abap/zcl_abgagt_resource_unit.clas.xml +0 -15
- package/abap/zcl_abgagt_resource_view.clas.abap +0 -68
- package/abap/zcl_abgagt_resource_view.clas.xml +0 -15
- package/abap/zcl_abgagt_rest_handler.clas.abap +0 -32
- package/abap/zcl_abgagt_rest_handler.clas.xml +0 -15
- package/abap/zcl_abgagt_util.clas.abap +0 -93
- package/abap/zcl_abgagt_util.clas.testclasses.abap +0 -84
- package/abap/zcl_abgagt_util.clas.xml +0 -16
- package/abap/zcl_abgagt_viewer_clas.clas.abap +0 -58
- package/abap/zcl_abgagt_viewer_clas.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_ddls.clas.abap +0 -83
- package/abap/zcl_abgagt_viewer_ddls.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_dtel.clas.abap +0 -98
- package/abap/zcl_abgagt_viewer_dtel.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_factory.clas.abap +0 -41
- package/abap/zcl_abgagt_viewer_factory.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_intf.clas.abap +0 -58
- package/abap/zcl_abgagt_viewer_intf.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_stru.clas.abap +0 -59
- package/abap/zcl_abgagt_viewer_stru.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_tabl.clas.abap +0 -59
- package/abap/zcl_abgagt_viewer_tabl.clas.xml +0 -15
- package/abap/zcl_abgagt_viewer_ttyp.clas.abap +0 -93
- package/abap/zcl_abgagt_viewer_ttyp.clas.xml +0 -15
- package/abap/zif_abgagt_agent.intf.abap +0 -53
- package/abap/zif_abgagt_agent.intf.xml +0 -15
- package/abap/zif_abgagt_cmd_factory.intf.abap +0 -7
- package/abap/zif_abgagt_cmd_factory.intf.xml +0 -15
- package/abap/zif_abgagt_command.intf.abap +0 -26
- package/abap/zif_abgagt_command.intf.xml +0 -15
- package/abap/zif_abgagt_util.intf.abap +0 -28
- package/abap/zif_abgagt_util.intf.xml +0 -15
- package/abap/zif_abgagt_viewer.intf.abap +0 -12
- package/abap/zif_abgagt_viewer.intf.xml +0 -15
- package/docs/commands.md +0 -142
- package/docs/create-command.md +0 -129
- package/docs/health-command.md +0 -89
- package/docs/import-command.md +0 -195
- package/docs/init-command.md +0 -189
- package/docs/inspect-command.md +0 -158
- package/docs/preview-command.md +0 -528
- package/docs/pull-command.md +0 -188
- package/docs/status-command.md +0 -68
- package/docs/tree-command.md +0 -303
- package/docs/unit-command.md +0 -167
- package/docs/view-command.md +0 -501
- package/img/claude.png +0 -0
- package/scripts/claude-integration.js +0 -351
- package/scripts/release.sh +0 -60
- package/scripts/test-integration.js +0 -139
package/docs/preview-command.md
DELETED
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
# preview Command Requirements
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
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.
|
|
6
|
-
|
|
7
|
-
**This is the PRIMARY way to explore table and CDS view DATA.**
|
|
8
|
-
|
|
9
|
-
## Use Cases
|
|
10
|
-
|
|
11
|
-
- Inspect table data before writing reports
|
|
12
|
-
- Verify data in CDS views
|
|
13
|
-
- Check sample records in staging tables
|
|
14
|
-
- Explore unknown tables/views quickly
|
|
15
|
-
- Validate WHERE clause filters before using in code
|
|
16
|
-
|
|
17
|
-
## Command
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Preview table data (auto-detect type)
|
|
21
|
-
abapgit-agent preview --objects SFLIGHT
|
|
22
|
-
abapgit-agent preview --objects ZMY_TABLE
|
|
23
|
-
|
|
24
|
-
# Preview CDS view data
|
|
25
|
-
abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
|
|
26
|
-
|
|
27
|
-
# Preview with explicit type
|
|
28
|
-
abapgit-agent preview --objects SFLIGHT --type TABL
|
|
29
|
-
|
|
30
|
-
# Preview with row limit
|
|
31
|
-
abapgit-agent preview --objects SFLIGHT --limit 20
|
|
32
|
-
|
|
33
|
-
# Preview with WHERE clause filter
|
|
34
|
-
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA'"
|
|
35
|
-
|
|
36
|
-
# Preview specific columns only
|
|
37
|
-
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,FLDATE,PRICE
|
|
38
|
-
|
|
39
|
-
# Preview multiple tables/views
|
|
40
|
-
abapgit-agent preview --objects SFLIGHT,ZSCUSTOMER
|
|
41
|
-
|
|
42
|
-
# Vertical format (for wide tables)
|
|
43
|
-
abapgit-agent preview --objects SFLIGHT --vertical
|
|
44
|
-
|
|
45
|
-
# JSON output (for scripting/AI processing)
|
|
46
|
-
abapgit-agent preview --objects SFLIGHT --json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Prerequisite
|
|
50
|
-
|
|
51
|
-
- `.abapGitAgent` exists with valid credentials
|
|
52
|
-
- Table or CDS view must exist in the ABAP system
|
|
53
|
-
|
|
54
|
-
## Parameters
|
|
55
|
-
|
|
56
|
-
| Parameter | Required | Description |
|
|
57
|
-
|-----------|----------|-------------|
|
|
58
|
-
| `--objects` | Yes | Comma-separated list of table/view names |
|
|
59
|
-
| `--type` | No | Object type (TABL, DDLS). Auto-detected from TADIR if not specified |
|
|
60
|
-
| `--limit` | No | Maximum rows to return (default: 10, max: 100) |
|
|
61
|
-
| `--where` | No | WHERE clause filter (e.g., `CARRID = 'AA'`) |
|
|
62
|
-
| `--columns` | No | Comma-separated column names to display (e.g., `CARRID,CONNID,PRICE`) |
|
|
63
|
-
| `--vertical` | No | Show data in vertical format (one field per line) |
|
|
64
|
-
| `--compact` | No | Truncate values to fit columns (useful for wide tables) |
|
|
65
|
-
| `--json` | No | Output raw JSON only (for scripting) |
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Tasks
|
|
70
|
-
|
|
71
|
-
### 1. Validate Parameters
|
|
72
|
-
|
|
73
|
-
- `--objects` must be specified
|
|
74
|
-
- Object names are converted to uppercase automatically
|
|
75
|
-
- `--limit` must be between 1 and 100 (default: 10)
|
|
76
|
-
- `--type` accepts TABL or DDLS (case-insensitive)
|
|
77
|
-
|
|
78
|
-
### 2. Load Configuration
|
|
79
|
-
|
|
80
|
-
Read `.abapGitAgent` for credentials
|
|
81
|
-
|
|
82
|
-
### 3. Fetch CSRF Token
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
GET /health (with X-CSRF-Token: fetch)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### 4. Make Preview Request
|
|
89
|
-
|
|
90
|
-
**Endpoint:** `POST /preview`
|
|
91
|
-
|
|
92
|
-
**Request Body:**
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"objects": ["SFLIGHT", "ZC_CDS_VIEW"],
|
|
96
|
-
"type": "TABL",
|
|
97
|
-
"limit": 10,
|
|
98
|
-
"where": "CARRID = 'AA'",
|
|
99
|
-
"columns": ["CARRID", "CONNID", "PRICE"]
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### 5. Display Results
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Output
|
|
108
|
-
|
|
109
|
-
### Table Data - Default (Human-readable)
|
|
110
|
-
|
|
111
|
-
Displays all columns with row count:
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
π Preview: SFLIGHT (Table)
|
|
115
|
-
|
|
116
|
-
ββββββββββββ¬βββββββββ¬βββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββββββββ
|
|
117
|
-
β CARRID β CONNID β FLDATE β PRICE β CURRENCYβ PLANETYPEβ
|
|
118
|
-
ββββββββββββΌβββββββββΌβββββββββββΌββββββββββββΌββββββββββΌββββββββββ€
|
|
119
|
-
β AA β 0017 β 20240201 β 422.94 β USD β 747-400 β
|
|
120
|
-
β AA β 0017 β 20240202 β 422.94 β USD β 747-400 β
|
|
121
|
-
β AA β 0017 β 20240203 β 445.00 β USD β 747-400 β
|
|
122
|
-
β UA β 0938 β 20240201 β 350.00 β USD β 777-300 β
|
|
123
|
-
ββββββββββββ΄βββββββββ΄βββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββββββββ
|
|
124
|
-
|
|
125
|
-
Showing 4 of 10 rows
|
|
126
|
-
β οΈ Note: 3 more columns hidden (SEATSMAX, SEATSOCC, PAYMENTSUM)
|
|
127
|
-
Use --columns to select specific columns
|
|
128
|
-
Use --json for full data
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Table Data - All Columns Fit
|
|
132
|
-
|
|
133
|
-
When table has 6 or fewer columns, display all:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
π Preview: TADIR (Table)
|
|
137
|
-
|
|
138
|
-
ββββββββββββ¬βββββββββββ¬ββββββββ¬βββββββββ¬βββββββββ
|
|
139
|
-
β PGMID β OBJECT β OBJNAMβ DEVCLASSβ CTR β
|
|
140
|
-
ββββββββββββΌβββββββββββΌββββββββΌβββββββββΌβββββββββ€
|
|
141
|
-
β R3TR β CLAS β ZCL_A β ZABAPGITβ 000000 β
|
|
142
|
-
β R3TR β CLAS β ZCL_B β ZABAPGITβ 000000 β
|
|
143
|
-
ββββββββββββ΄βββββββββββ΄ββββββββ΄βββββββββ΄βββββββββ
|
|
144
|
-
|
|
145
|
-
Showing 2 of 10 rows
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### CDS View Data (Human-readable)
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
π Preview: ZC_FLIGHTS (CDS View)
|
|
152
|
-
|
|
153
|
-
ββββββββββββ¬βββββββββ¬ββββββββββββ¬βββββββββββββββββββββββ
|
|
154
|
-
β CARRID β CONNID β FLDATE β AIRLINENAME β
|
|
155
|
-
ββββββββββββΌβββββββββΌββββββββββββΌβββββββββββββββββββββββ€
|
|
156
|
-
β AA β 0017 β 20240201 β American Airlines β
|
|
157
|
-
β UA β 0938 β 20240201 β United Airlines β
|
|
158
|
-
ββββββββββββ΄βββββββββ΄ββββββββββββ΄βββββββββββββββββββββββ
|
|
159
|
-
|
|
160
|
-
Showing 2 of 10 rows
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### With WHERE Filter
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
π Preview: SFLIGHT (filtered, 5 rows)
|
|
167
|
-
|
|
168
|
-
ββββββββββββ¬βββββββββ¬βββββββββββ¬ββββββββββ¬ββββββββββ
|
|
169
|
-
β CARRID β CONNID β FLDATE β PRICE β CURRENCYβ
|
|
170
|
-
ββββββββββββΌβββββββββΌβββββββββββΌββββββββββΌββββββββββ€
|
|
171
|
-
β AA β 0017 β 20240201 β 422.94 β USD β
|
|
172
|
-
β AA β 0017 β 20240202 β 422.94 β USD β
|
|
173
|
-
ββββββββββββ΄βββββββββ΄βββββββββββ΄ββββββββββ΄ββββββββββ
|
|
174
|
-
|
|
175
|
-
WHERE: CARRID = 'AA'
|
|
176
|
-
Showing 2 of 2 rows
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Column Selection
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,FLDATE,PRICE
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
```
|
|
186
|
-
π Preview: SFLIGHT (Table)
|
|
187
|
-
|
|
188
|
-
ββββββββββββ¬βββββββββ¬βββββββββββ¬ββββββββββββ
|
|
189
|
-
β CARRID β CONNID β FLDATE β PRICE β
|
|
190
|
-
ββββββββββββΌβββββββββΌβββββββββββΌββββββββββββ€
|
|
191
|
-
β AA β 0017 β 20240201 β 422.94 β
|
|
192
|
-
β AA β 0017 β 20240202 β 422.94 β
|
|
193
|
-
ββββββββββββ΄βββββββββ΄βββββββββββ΄ββββββββββββ
|
|
194
|
-
|
|
195
|
-
Showing 2 of 10 rows (columns: CARRID, CONNID, FLDATE, PRICE)
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Vertical Format
|
|
199
|
-
|
|
200
|
-
Useful for tables with many columns:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
abapgit-agent preview --objects SFLIGHT --vertical
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
Previewing 1 object(s)
|
|
208
|
-
|
|
209
|
-
Retrieved data
|
|
210
|
-
|
|
211
|
-
π Preview: SFLIGHT (Table)
|
|
212
|
-
|
|
213
|
-
Row 1:
|
|
214
|
-
ββββββββββββββββββββββββββββββ
|
|
215
|
-
MANDT: 100
|
|
216
|
-
CARRID: AA
|
|
217
|
-
CONNID: 17
|
|
218
|
-
FLDATE: 2024-10-24
|
|
219
|
-
PRICE: 422.94
|
|
220
|
-
CURRENCY: USD
|
|
221
|
-
PLANETYPE: 747-400
|
|
222
|
-
SEATSMAX: 385
|
|
223
|
-
SEATSOCC: 372
|
|
224
|
-
PAYMENTSUM: 192556.43
|
|
225
|
-
|
|
226
|
-
Row 2:
|
|
227
|
-
ββββββββββββββββββββββββββββββ
|
|
228
|
-
MANDT: 100
|
|
229
|
-
CARRID: AA
|
|
230
|
-
CONNID: 17
|
|
231
|
-
FLDATE: 2024-11-25
|
|
232
|
-
PRICE: 422.94
|
|
233
|
-
CURRENCY: USD
|
|
234
|
-
PLANETYPE: 747-400
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Compact Mode
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
abapgit-agent preview --objects SFLIGHT --compact
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
```
|
|
244
|
-
Previewing 1 object(s)
|
|
245
|
-
|
|
246
|
-
Retrieved data
|
|
247
|
-
|
|
248
|
-
π Preview: SPFLI (Table)
|
|
249
|
-
βββββββββ¬βββββββββ¬βββββββββ¬ββββββββββββ¬βββββββββββ¬βββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββ¬βββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββ¬βββββββββ¬βββββββββ
|
|
250
|
-
β MANDT β CARRID β CONNID β COUNTRYFR β CITYFROM β AIRPFROM β COUNTRYTO β CITYTO β AIRPTO β FLTIME β DEPTIME β ARRTIME β DISTANCE β DISTID β FLTYPE β PERIOD β
|
|
251
|
-
βββββββββΌβββββββββΌβββββββββΌββββββββββββΌβββββββββββΌβββββββββββΌββββββββββββΌβββββββββββββΌβββββββββΌβββββββββΌβββββββββββΌβββββββββββΌβββββββββββΌβββββββββΌβββββββββΌβββββββββ€
|
|
252
|
-
β 100 β AA β 17 β US β NEW YORK β JFK β US β SAN FRA... β SFO β 361 β 11:00:00 β 14:01:00 β 2572 β MI β β β
|
|
253
|
-
βββββββββ΄βββββββββ΄βββββββββ΄ββββββββββββ΄βββββββββββ΄βββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββ΄βββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββ΄βββββββββ΄βββββββββ
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Multiple Objects
|
|
257
|
-
|
|
258
|
-
```
|
|
259
|
-
π Preview: 2 Objects
|
|
260
|
-
|
|
261
|
-
1οΈβ£ SFLIGHT (Table)
|
|
262
|
-
ββββββββββββ¬βββββββββ¬ββββββββββββ
|
|
263
|
-
β CARRID β CONNID β FLDATE β
|
|
264
|
-
ββββββββββββΌβββββββββΌββββββββββββ€
|
|
265
|
-
β AA β 0017 β 20240201 β
|
|
266
|
-
ββββββββββββ΄βββββββββ΄ββββββββββββ
|
|
267
|
-
1 row
|
|
268
|
-
|
|
269
|
-
2οΈβ£ ZC_CUST (CDS View)
|
|
270
|
-
ββββββββββββ¬βββββββββββ¬ββββββββββββ
|
|
271
|
-
β KUNNR β NAME β CITY β
|
|
272
|
-
ββββββββββββΌβββββββββββΌββββββββββββ€
|
|
273
|
-
β 000001 β Customer1β New York β
|
|
274
|
-
ββββββββββββ΄βββββββββββ΄ββββββββββββ
|
|
275
|
-
1 row
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### JSON Output
|
|
279
|
-
|
|
280
|
-
```json
|
|
281
|
-
{
|
|
282
|
-
"SUCCESS": true,
|
|
283
|
-
"COMMAND": "PREVIEW",
|
|
284
|
-
"MESSAGE": "Retrieved 2 object(s)",
|
|
285
|
-
"OBJECTS": [
|
|
286
|
-
{
|
|
287
|
-
"NAME": "SFLIGHT",
|
|
288
|
-
"TYPE": "TABL",
|
|
289
|
-
"TYPE_TEXT": "Table",
|
|
290
|
-
"ROW_COUNT": 4,
|
|
291
|
-
"ROWS": [
|
|
292
|
-
{
|
|
293
|
-
"CARRID": "AA",
|
|
294
|
-
"CONNID": "0017",
|
|
295
|
-
"FLDATE": "20240201",
|
|
296
|
-
"PRICE": "422.94",
|
|
297
|
-
"CURRENCY": "USD",
|
|
298
|
-
"PLANETYPE": "747-400",
|
|
299
|
-
"SEATSMAX": "400",
|
|
300
|
-
"SEATSOCC": "350",
|
|
301
|
-
"PAYMENTSUM": "145000"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"CARRID": "AA",
|
|
305
|
-
"CONNID": "0017",
|
|
306
|
-
"FLDATE": "20240202",
|
|
307
|
-
"PRICE": "422.94",
|
|
308
|
-
"CURRENCY": "USD",
|
|
309
|
-
"PLANETYPE": "747-400",
|
|
310
|
-
"SEATSMAX": "400",
|
|
311
|
-
"SEATSOCC": "380",
|
|
312
|
-
"PAYMENTSUM": "155000"
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"FIELDS": [
|
|
316
|
-
{ "FIELD": "CARRID", "TYPE": "CHAR", "LENGTH": 3 },
|
|
317
|
-
{ "FIELD": "CONNID", "TYPE": "NUMC", "LENGTH": 4 },
|
|
318
|
-
{ "FIELD": "FLDATE", "TYPE": "DATS", "LENGTH": 8 },
|
|
319
|
-
{ "FIELD": "PRICE", "TYPE": "CURR", "LENGTH": 16 },
|
|
320
|
-
{ "FIELD": "CURRENCY", "TYPE": "CUKY", "LENGTH": 5 },
|
|
321
|
-
{ "FIELD": "PLANETYPE", "TYPE": "CHAR", "LENGTH": 15 },
|
|
322
|
-
{ "FIELD": "SEATSMAX", "TYPE": "NUMC", "LENGTH": 4 },
|
|
323
|
-
{ "FIELD": "SEATSOCC", "TYPE": "NUMC", "LENGTH": 4 },
|
|
324
|
-
{ "FIELD": "PAYMENTSUM", "TYPE": "CURR", "LENGTH": 16 }
|
|
325
|
-
],
|
|
326
|
-
"TOTAL_ROWS": 10,
|
|
327
|
-
"COLUMNS_DISPLAYED": 6,
|
|
328
|
-
"COLUMNS_HIDDEN": ["SEATSMAX", "SEATSOCC", "PAYMENTSUM"],
|
|
329
|
-
"NOT_FOUND": false,
|
|
330
|
-
"ACCESS_DENIED": false
|
|
331
|
-
}
|
|
332
|
-
],
|
|
333
|
-
"SUMMARY": {
|
|
334
|
-
"TOTAL_OBJECTS": 1,
|
|
335
|
-
"TOTAL_ROWS": 4
|
|
336
|
-
},
|
|
337
|
-
"ERROR": ""
|
|
338
|
-
}
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
## Response Structure
|
|
344
|
-
|
|
345
|
-
### JSON Response Schema
|
|
346
|
-
|
|
347
|
-
```json
|
|
348
|
-
{
|
|
349
|
-
"SUCCESS": boolean,
|
|
350
|
-
"COMMAND": "PREVIEW",
|
|
351
|
-
"MESSAGE": "string",
|
|
352
|
-
"OBJECTS": [
|
|
353
|
-
{
|
|
354
|
-
"NAME": "string",
|
|
355
|
-
"TYPE": "TABL|DDLS",
|
|
356
|
-
"TYPE_TEXT": "Table|CDS View",
|
|
357
|
-
"ROW_COUNT": number,
|
|
358
|
-
"TOTAL_ROWS": number,
|
|
359
|
-
"ROWS": [
|
|
360
|
-
{ "FIELD_NAME": "value", ... }
|
|
361
|
-
],
|
|
362
|
-
"FIELDS": [
|
|
363
|
-
{
|
|
364
|
-
"FIELD": "string",
|
|
365
|
-
"TYPE": "string",
|
|
366
|
-
"LENGTH": number
|
|
367
|
-
}
|
|
368
|
-
],
|
|
369
|
-
"COLUMNS_DISPLAYED": number,
|
|
370
|
-
"COLUMNS_HIDDEN": ["string"],
|
|
371
|
-
"NOT_FOUND": boolean,
|
|
372
|
-
"ACCESS_DENIED": boolean
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
"SUMMARY": {
|
|
376
|
-
"TOTAL_OBJECTS": number,
|
|
377
|
-
"TOTAL_ROWS": number
|
|
378
|
-
},
|
|
379
|
-
"ERROR": "string"
|
|
380
|
-
}
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
## Error Handling
|
|
386
|
-
|
|
387
|
-
| Error | Message |
|
|
388
|
-
|-------|---------|
|
|
389
|
-
| Table not found | `Table not found: Z_NONEXISTENT` |
|
|
390
|
-
| CDS View not found | `CDS View not found: Z_NONEXISTENT` |
|
|
391
|
-
| Access denied | `Access denied to table: SFLIGHT` |
|
|
392
|
-
| Invalid WHERE clause | `Invalid WHERE clause: <reason>` |
|
|
393
|
-
| Invalid object type | `Unsupported object type: CLAS` |
|
|
394
|
-
| Invalid column name | `Invalid column: INVALID_NAME` |
|
|
395
|
-
|
|
396
|
-
### Error Output
|
|
397
|
-
|
|
398
|
-
```
|
|
399
|
-
β Table not found: Z_NONEXISTENT
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
```
|
|
403
|
-
β Access denied to table: SFLIGHT
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
---
|
|
407
|
-
|
|
408
|
-
## Object Type Detection
|
|
409
|
-
|
|
410
|
-
### Auto-Detection Rules
|
|
411
|
-
|
|
412
|
-
| Object Name Pattern | Default Type |
|
|
413
|
-
|---------------------|--------------|
|
|
414
|
-
| `ZC_*` or `zc_*` | DDLS (CDS View) |
|
|
415
|
-
| `Z*` | TABL (Table) - fallback |
|
|
416
|
-
| Other | TABL (Table) |
|
|
417
|
-
|
|
418
|
-
### Supported Object Types
|
|
419
|
-
|
|
420
|
-
| Type Code | Type Text | Description |
|
|
421
|
-
|-----------|-----------|-------------|
|
|
422
|
-
| `TABL` | Table | Database table |
|
|
423
|
-
| `DDLS` | CDS View | CDS View/Entity |
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
## Implementation
|
|
428
|
-
|
|
429
|
-
### ABAP Tables/Classes Used
|
|
430
|
-
|
|
431
|
-
| Table/Class | Purpose |
|
|
432
|
-
|-------------|---------|
|
|
433
|
-
| **TADIR** | Object directory (verify object exists) |
|
|
434
|
-
| **DD02L** | Table/structure definitions |
|
|
435
|
-
| **DD03L** | Table/structure fields |
|
|
436
|
-
| **DD02V** | Table view with delivery class |
|
|
437
|
-
| **CL_DD_DDL_HANDLER_FACTORY** | Read CDS view data |
|
|
438
|
-
|
|
439
|
-
### Table Data Retrieval (TABL)
|
|
440
|
-
|
|
441
|
-
```abap
|
|
442
|
-
" Get table fields from DD03L
|
|
443
|
-
SELECT fieldname, datatype, leng
|
|
444
|
-
FROM dd03l
|
|
445
|
-
INTO TABLE lt_fields
|
|
446
|
-
WHERE tabname = iv_name
|
|
447
|
-
AND as4local = 'A'
|
|
448
|
-
ORDER BY position.
|
|
449
|
-
|
|
450
|
-
" Build SELECT query
|
|
451
|
-
" Use OPEN SQL with limited fields
|
|
452
|
-
SELECT UP TO lv_limit (lt_fields)
|
|
453
|
-
FROM (iv_name)
|
|
454
|
-
INTO TABLE lt_result
|
|
455
|
-
WHERE (lv_where_clause).
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
### CDS View Data Retrieval (DDLS)
|
|
459
|
-
|
|
460
|
-
```abap
|
|
461
|
-
" Use CDS view directly with OPEN SQL
|
|
462
|
-
" First verify CDS view exists in TADIR
|
|
463
|
-
SELECT SINGLE obj_name FROM tadir
|
|
464
|
-
INTO lv_obj_name
|
|
465
|
-
WHERE obj_name = iv_name
|
|
466
|
-
AND object = 'DDLS'.
|
|
467
|
-
|
|
468
|
-
" Read data from CDS view
|
|
469
|
-
SELECT UP TO lv_limit (lt_fields)
|
|
470
|
-
FROM (iv_name)
|
|
471
|
-
INTO TABLE lt_result
|
|
472
|
-
WHERE (lv_where_clause).
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### Column Width Calculation
|
|
476
|
-
|
|
477
|
-
```abap
|
|
478
|
-
" Calculate column width based on:
|
|
479
|
-
" 1. Field length from DD03L
|
|
480
|
-
" 2. Max value length in result set
|
|
481
|
-
" 3. Field description length
|
|
482
|
-
" Minimum width: 3 characters
|
|
483
|
-
" Maximum width: 20 characters (truncate with ...)
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
## Examples
|
|
489
|
-
|
|
490
|
-
```bash
|
|
491
|
-
# Preview a table with default settings
|
|
492
|
-
abapgit-agent preview --objects SFLIGHT
|
|
493
|
-
|
|
494
|
-
# Preview with more rows
|
|
495
|
-
abapgit-agent preview --objects SFLIGHT --limit 50
|
|
496
|
-
|
|
497
|
-
# Preview with filter
|
|
498
|
-
abapgit-agent preview --objects SFLIGHT --where "CARRID = 'AA' AND CONNID = '0017'"
|
|
499
|
-
|
|
500
|
-
# Preview specific columns
|
|
501
|
-
abapgit-agent preview --objects SFLIGHT --columns CARRID,CONNID,FLDATE,PRICE,CURRENCY
|
|
502
|
-
|
|
503
|
-
# Preview CDS view
|
|
504
|
-
abapgit-agent preview --objects ZC_MY_CDS_VIEW
|
|
505
|
-
|
|
506
|
-
# Vertical format for wide tables
|
|
507
|
-
abapgit-agent preview --objects SFLIGHT --vertical
|
|
508
|
-
|
|
509
|
-
# Compact mode
|
|
510
|
-
abapgit-agent preview --objects SFLIGHT --compact
|
|
511
|
-
|
|
512
|
-
# JSON for programmatic use
|
|
513
|
-
abapgit-agent preview --objects SFLIGHT --json
|
|
514
|
-
|
|
515
|
-
# Preview multiple objects
|
|
516
|
-
abapgit-agent preview --objects SFLIGHT,ZSCUSTOMER,ZCF_MY_VIEW
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
---
|
|
520
|
-
|
|
521
|
-
## Security Considerations
|
|
522
|
-
|
|
523
|
-
- **Read-only access**: Preview only reads data, no modifications
|
|
524
|
-
- **WHERE clause validation**: Sanitize input to prevent SQL injection
|
|
525
|
-
- Allow only: `=`, `<>`, `>`, `<`, `>=`, `<=`, `LIKE`, `IN`, `AND`, `OR`, `(`, `)`
|
|
526
|
-
- Block: `DELETE`, `UPDATE`, `INSERT`, `DROP`, `TABLE`
|
|
527
|
-
- **Column name validation**: Validate column names against DD03L
|
|
528
|
-
- **Row limit**: Enforce maximum of 100 rows to prevent large result sets
|
package/docs/pull-command.md
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
# pull Command Requirements
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Pull and activate ABAP objects from git repository.
|
|
6
|
-
|
|
7
|
-
## Command
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Auto-detect git remote and branch from current directory
|
|
11
|
-
abapgit-agent pull
|
|
12
|
-
|
|
13
|
-
# Pull specific files only (fast)
|
|
14
|
-
abapgit-agent pull --files zcl_my_class.clas.abap,zcl_other.clas.abap
|
|
15
|
-
|
|
16
|
-
# Pull from specific branch
|
|
17
|
-
abapgit-agent pull --branch develop
|
|
18
|
-
|
|
19
|
-
# Pull from specific URL
|
|
20
|
-
abapgit-agent pull --url https://github.com/org/repo.git
|
|
21
|
-
|
|
22
|
-
# With transport request
|
|
23
|
-
abapgit-agent pull --transport DEVK900001
|
|
24
|
-
|
|
25
|
-
# Combined options
|
|
26
|
-
abapgit-agent pull --branch develop --files src/zcl_my_class.clas.abap --transport DEVK900001
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Prerequisite
|
|
30
|
-
|
|
31
|
-
- Current folder is git repo root (unless `--url` specified)
|
|
32
|
-
- Git remote is configured (unless `--url` specified)
|
|
33
|
-
- `.abapGitAgent` exists with valid credentials
|
|
34
|
-
|
|
35
|
-
## Parameters
|
|
36
|
-
|
|
37
|
-
| Parameter | Required | Description |
|
|
38
|
-
|-----------|----------|-------------|
|
|
39
|
-
| `--url` | No | Git repository URL (auto-detected if not specified) |
|
|
40
|
-
| `--branch` | No | Branch name (default: current branch) |
|
|
41
|
-
| `--files` | No | Comma-separated list of files to pull |
|
|
42
|
-
| `--transport` | No | Transport request for activation |
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Tasks
|
|
47
|
-
|
|
48
|
-
### 1. Detect Git Remote URL
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
git remote get-url origin
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Detect Current Branch
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
git branch --show-current
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Or from `.git/HEAD`
|
|
61
|
-
|
|
62
|
-
### 3. Load Configuration
|
|
63
|
-
|
|
64
|
-
Read `.abapGitAgent` for credentials
|
|
65
|
-
|
|
66
|
-
### 4. Fetch CSRF Token
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
GET /health (with X-CSRF-Token: fetch)
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 5. Make Pull Request
|
|
73
|
-
|
|
74
|
-
**Endpoint:** `POST /pull`
|
|
75
|
-
|
|
76
|
-
**Request Body:**
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"url": "https://github.com/org/repo.git",
|
|
80
|
-
"branch": "main",
|
|
81
|
-
"username": "git-user",
|
|
82
|
-
"password": "git-token",
|
|
83
|
-
"files": ["zcl_my_class.clas.abap"],
|
|
84
|
-
"transport_request": "DEVK900001"
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### 6. Display Results
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Output
|
|
93
|
-
|
|
94
|
-
### Success
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
β
Pull completed successfully!
|
|
98
|
-
Job ID: CAIS20260208115649
|
|
99
|
-
Message: Pull completed successfully
|
|
100
|
-
|
|
101
|
-
π Pull Log (N messages):
|
|
102
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
103
|
-
Icon βObject βMessage
|
|
104
|
-
ββββββΌβββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββ
|
|
105
|
-
β
βCLAS ZCL_MY_CLASS βObject ZCL_MY_CLASS imported
|
|
106
|
-
...
|
|
107
|
-
|
|
108
|
-
π¦ Activated Objects (N):
|
|
109
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
110
|
-
β
CLAS ZCL_MY_CLASS
|
|
111
|
-
...
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### With Errors
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
β Pull completed with errors!
|
|
118
|
-
Job ID: CAIS20260208115649
|
|
119
|
-
Message: Pull completed with errors
|
|
120
|
-
|
|
121
|
-
π Error Details:
|
|
122
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
123
|
-
CLAS ZCL_MY_CLASS: Error updating where-used list
|
|
124
|
-
|
|
125
|
-
π Pull Log (N messages):
|
|
126
|
-
...
|
|
127
|
-
|
|
128
|
-
β Failed Objects Log (M entries):
|
|
129
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
130
|
-
β CLAS ZCL_MY_CLASS: Error message text
|
|
131
|
-
Exception: Exception details
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## File Format
|
|
137
|
-
|
|
138
|
-
Files are parsed to extract `(obj_type, obj_name)`:
|
|
139
|
-
|
|
140
|
-
| File Pattern | Object Type | Object Name |
|
|
141
|
-
|--------------|-------------|-------------|
|
|
142
|
-
| `zcl_my_class.clas.abap` | CLAS | ZCL_MY_CLASS |
|
|
143
|
-
| `zif_my_intf.intf.abap` | INTF | ZIF_MY_INTF |
|
|
144
|
-
| `src/zcl_my_class.clas.abap` | CLAS | ZCL_MY_CLASS |
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Response Structure
|
|
149
|
-
|
|
150
|
-
```json
|
|
151
|
-
{
|
|
152
|
-
"success": "X",
|
|
153
|
-
"job_id": "CAIS20260208115649",
|
|
154
|
-
"message": "Pull completed successfully",
|
|
155
|
-
"activated_count": 15,
|
|
156
|
-
"failed_count": 1,
|
|
157
|
-
"activated_objects": [
|
|
158
|
-
{ "obj_type": "CLAS", "obj_name": "ZCL_MY_CLASS" }
|
|
159
|
-
],
|
|
160
|
-
"failed_objects": [
|
|
161
|
-
{ "obj_type": "CLAS", "obj_name": "ZCL_OTHER", "text": "Error message" }
|
|
162
|
-
],
|
|
163
|
-
"log_messages": [...]
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Key Behaviors
|
|
170
|
-
|
|
171
|
-
1. **Activated Objects** - Only includes objects that completed successfully (no errors in log)
|
|
172
|
-
2. **Failed Objects Log** - Shows all error messages (duplicates allowed for multiple errors per object)
|
|
173
|
-
3. **Error Details** - When errors occur, displays error detail section at the top
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Example
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Full pull
|
|
181
|
-
abapgit-agent pull
|
|
182
|
-
|
|
183
|
-
# Fast pull - specific files
|
|
184
|
-
abapgit-agent pull --files abap/zcl_my_class.clas.abap
|
|
185
|
-
|
|
186
|
-
# With transport
|
|
187
|
-
abapgit-agent pull --files abap/zcl_my_class.clas.abap --transport DEVK900001
|
|
188
|
-
```
|