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/API.md
DELETED
|
@@ -1,710 +0,0 @@
|
|
|
1
|
-
# REST API Reference
|
|
2
|
-
|
|
3
|
-
The ABAP system exposes these endpoints via SICF handler: `sap/bc/z_abapgit_agent`
|
|
4
|
-
|
|
5
|
-
## Endpoints
|
|
6
|
-
|
|
7
|
-
| Method | Endpoint | Description |
|
|
8
|
-
|--------|----------|-------------|
|
|
9
|
-
| GET | `/health` | Health check (also fetches CSRF token) |
|
|
10
|
-
| POST | `/pull` | Pull and activate repository |
|
|
11
|
-
| POST | `/inspect` | Inspect source file for issues |
|
|
12
|
-
| POST | `/unit` | Execute unit tests (AUnit) |
|
|
13
|
-
| POST | `/tree` | Display package hierarchy tree |
|
|
14
|
-
| POST | `/view` | View ABAP object definitions |
|
|
15
|
-
| POST | `/preview` | Preview table/CDS view data |
|
|
16
|
-
|
|
17
|
-
## GET /health
|
|
18
|
-
|
|
19
|
-
Health check endpoint - also used to fetch CSRF token for POST requests.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl "https://your-system:44300/sap/bc/z_abapgit_agent/health" \
|
|
23
|
-
-u USER:PASSWORD \
|
|
24
|
-
-H "sap-client: 100"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Response:
|
|
28
|
-
```json
|
|
29
|
-
{"status":"OK","version":"1.0.0"}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## POST /pull
|
|
33
|
-
|
|
34
|
-
Pull and activate repository from git.
|
|
35
|
-
|
|
36
|
-
### Request
|
|
37
|
-
|
|
38
|
-
Requires CSRF token. First fetch from `/health`:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# 1. Get CSRF token and cookies
|
|
42
|
-
curl -c cookies.txt -D headers.txt -X GET "https://your-system:44300/sap/bc/z_abapgit_agent/health" \
|
|
43
|
-
-u USER:PASSWORD \
|
|
44
|
-
-H "sap-client: 100" \
|
|
45
|
-
-H "X-CSRF-Token: fetch"
|
|
46
|
-
|
|
47
|
-
# 2. Extract CSRF token
|
|
48
|
-
CSRF=$(grep -i "x-csrf-token" headers.txt | awk '{print $2}' | tr -d '\r')
|
|
49
|
-
|
|
50
|
-
# 3. Pull repository
|
|
51
|
-
curl -X POST "https://your-system:44300/sap/bc/z_abapgit_agent/pull" \
|
|
52
|
-
-H "Content-Type: application/json" \
|
|
53
|
-
-H "sap-client: 100" \
|
|
54
|
-
-H "X-CSRF-Token: $CSRF" \
|
|
55
|
-
-b cookies.txt \
|
|
56
|
-
-u USER:PASSWORD \
|
|
57
|
-
-d '{"url": "https://github.com/user/repo.git", "branch": "main"}'
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Request Body
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"url": "https://github.com/user/repo.git",
|
|
65
|
-
"branch": "main",
|
|
66
|
-
"username": "git-username",
|
|
67
|
-
"password": "git-token",
|
|
68
|
-
"transport_request": "DEVK900001",
|
|
69
|
-
"files": ["zcl_my_class.clas.abap", "zcl_other.clas.abap"]
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### File Format
|
|
74
|
-
|
|
75
|
-
Files are parsed to extract `(obj_type, obj_name)`:
|
|
76
|
-
- `zcl_my_class.clas.abap` → CLAS, ZCL_MY_CLASS
|
|
77
|
-
- `src/zcl_my_class.clas.abap` → CLAS, ZCL_MY_CLASS (subdirectory support)
|
|
78
|
-
|
|
79
|
-
### Transport Request
|
|
80
|
-
|
|
81
|
-
The optional `transport_request` field specifies a transport request number to use for activation:
|
|
82
|
-
- If provided, objects are activated in the specified transport
|
|
83
|
-
- If omitted, abapGit creates/uses a default transport
|
|
84
|
-
|
|
85
|
-
### Response (success)
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"success": "X",
|
|
90
|
-
"job_id": "CAIS20260208115649",
|
|
91
|
-
"message": "Pull completed successfully",
|
|
92
|
-
"transport_request": "DEVK900001",
|
|
93
|
-
"activated_count": 10,
|
|
94
|
-
"failed_count": 0,
|
|
95
|
-
"activated_objects": [...],
|
|
96
|
-
"failed_objects": [...]
|
|
97
|
-
}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Response (with activation errors)
|
|
101
|
-
|
|
102
|
-
```json
|
|
103
|
-
{
|
|
104
|
-
"success": "",
|
|
105
|
-
"job_id": "CAIS20260209041349",
|
|
106
|
-
"message": "Pull completed with errors",
|
|
107
|
-
"error_detail": "CLAS ZCL_MY_CLASS: Syntax error\nException: The statement...",
|
|
108
|
-
"transport_request": "DEVK900001",
|
|
109
|
-
"activated_count": 9,
|
|
110
|
-
"failed_count": 2,
|
|
111
|
-
"activated_objects": [...],
|
|
112
|
-
"failed_objects": [
|
|
113
|
-
{
|
|
114
|
-
"type": "E",
|
|
115
|
-
"text": "The statement METHOD is unexpected",
|
|
116
|
-
"obj_type": "CLAS",
|
|
117
|
-
"obj_name": "ZCL_MY_CLASS",
|
|
118
|
-
"exception": "The statement METHOD is unexpected"
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## POST /inspect
|
|
125
|
-
|
|
126
|
-
Inspect source file for issues (currently runs syntax check via Code Inspector).
|
|
127
|
-
|
|
128
|
-
### Request Body
|
|
129
|
-
|
|
130
|
-
```json
|
|
131
|
-
{
|
|
132
|
-
"source_name": "ZCL_MY_CLASS.CLASS.ABAP"
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
The endpoint parses the file name to extract `obj_type` and `obj_name`:
|
|
137
|
-
- `zcl_my_class.clas.abap` → CLAS, ZCL_MY_CLASS
|
|
138
|
-
- `src/zcl_my_class.clas.abap` → CLAS, ZCL_MY_CLASS
|
|
139
|
-
|
|
140
|
-
### Response (success)
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"success": "X",
|
|
145
|
-
"object_type": "CLAS",
|
|
146
|
-
"object_name": "ZCL_MY_CLASS",
|
|
147
|
-
"error_count": 0,
|
|
148
|
-
"errors": []
|
|
149
|
-
}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Response (with errors)
|
|
153
|
-
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"success": "",
|
|
157
|
-
"object_type": "CLAS",
|
|
158
|
-
"object_name": "ZCL_MY_CLASS",
|
|
159
|
-
"error_count": 2,
|
|
160
|
-
"errors": [
|
|
161
|
-
{
|
|
162
|
-
"line": "15",
|
|
163
|
-
"column": "12",
|
|
164
|
-
"text": "\"MESSAGE\" is not a declaration"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"line": "20",
|
|
168
|
-
"column": "5",
|
|
169
|
-
"text": "Variable \"LV_TEST\" not found"
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## POST /unit
|
|
176
|
-
|
|
177
|
-
Execute unit tests (AUnit) for test class files.
|
|
178
|
-
|
|
179
|
-
### Request Body
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{
|
|
183
|
-
"files": ["zcl_my_test.clas.testclasses.abap", "zcl_other_test.clas.testclasses.abap"]
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
The endpoint parses file names to extract `obj_type` and `obj_name`, then runs AUnit tests using `CL_SUT_AUNIT_RUNNER`.
|
|
188
|
-
|
|
189
|
-
### Response (success)
|
|
190
|
-
|
|
191
|
-
```json
|
|
192
|
-
{
|
|
193
|
-
"success": "X",
|
|
194
|
-
"test_count": 10,
|
|
195
|
-
"passed_count": 10,
|
|
196
|
-
"failed_count": 0,
|
|
197
|
-
"message": "All 10 tests passed",
|
|
198
|
-
"errors": []
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Response (with failures)
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"success": "",
|
|
207
|
-
"test_count": 5,
|
|
208
|
-
"passed_count": 3,
|
|
209
|
-
"failed_count": 2,
|
|
210
|
-
"message": "2 of 5 tests failed",
|
|
211
|
-
"errors": [
|
|
212
|
-
{
|
|
213
|
-
"class_name": "ZCL_MY_TEST",
|
|
214
|
-
"method_name": "TEST_METHOD_1",
|
|
215
|
-
"error_kind": "ERROR",
|
|
216
|
-
"error_text": "Expected X but got Y"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"class_name": "ZCL_MY_TEST",
|
|
220
|
-
"method_name": "TEST_METHOD_2",
|
|
221
|
-
"error_kind": "FAILURE",
|
|
222
|
-
"error_text": "Reference is initial"
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## POST /tree
|
|
229
|
-
|
|
230
|
-
Display package hierarchy tree from ABAP system.
|
|
231
|
-
|
|
232
|
-
### Request Body
|
|
233
|
-
|
|
234
|
-
```json
|
|
235
|
-
{
|
|
236
|
-
"package": "$MY_PACKAGE",
|
|
237
|
-
"depth": 3,
|
|
238
|
-
"include_objects": true
|
|
239
|
-
}
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
| Field | Type | Description |
|
|
243
|
-
|-------|------|-------------|
|
|
244
|
-
| `package` | String | Package name (required) |
|
|
245
|
-
| `depth` | Integer | Maximum depth (default: 3, max: 10) |
|
|
246
|
-
| `include_objects` | Boolean | Include object counts by type |
|
|
247
|
-
|
|
248
|
-
### Response (success)
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"success": true,
|
|
253
|
-
"command": "TREE",
|
|
254
|
-
"package": "$MY_PACKAGE",
|
|
255
|
-
"message": "Tree retrieved successfully",
|
|
256
|
-
"parent_package": "$ZSAP_BASE",
|
|
257
|
-
"nodes": [
|
|
258
|
-
{
|
|
259
|
-
"package": "$MY_PACKAGE",
|
|
260
|
-
"parent": "",
|
|
261
|
-
"description": "$MY_PACKAGE",
|
|
262
|
-
"depth": 0,
|
|
263
|
-
"object_count": 10
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"package": "$MY_SUBPACKAGE",
|
|
267
|
-
"parent": "$MY_PACKAGE",
|
|
268
|
-
"description": "$MY_SUBPACKAGE",
|
|
269
|
-
"depth": 1,
|
|
270
|
-
"object_count": 5
|
|
271
|
-
}
|
|
272
|
-
],
|
|
273
|
-
"total_packages": 2,
|
|
274
|
-
"total_objects": 15,
|
|
275
|
-
"objects": [
|
|
276
|
-
{ "object": "CLAS", "count": 8 },
|
|
277
|
-
{ "object": "INTF", "count": 2 },
|
|
278
|
-
{ "object": "TABL", "count": 5 }
|
|
279
|
-
],
|
|
280
|
-
"error": ""
|
|
281
|
-
}
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### Response (error)
|
|
285
|
-
|
|
286
|
-
```json
|
|
287
|
-
{
|
|
288
|
-
"success": false,
|
|
289
|
-
"command": "TREE",
|
|
290
|
-
"package": "$NONEXISTENT",
|
|
291
|
-
"error": "Package $NONEXISTENT does not exist"
|
|
292
|
-
}
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## POST /view
|
|
296
|
-
|
|
297
|
-
View ABAP object definitions directly from ABAP system.
|
|
298
|
-
|
|
299
|
-
### Request Body
|
|
300
|
-
|
|
301
|
-
```json
|
|
302
|
-
{
|
|
303
|
-
"objects": ["ZCL_MY_CLASS", "ZIF_MY_INTERFACE", "SFLIGHT"],
|
|
304
|
-
"type": "CLAS"
|
|
305
|
-
}
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
| Field | Type | Description |
|
|
309
|
-
|-------|------|-------------|
|
|
310
|
-
| `objects` | Array | List of object names (required) |
|
|
311
|
-
| `type` | String | Object type (CLAS, INTF, TABL, STRU, DTEL). Auto-detected if not specified |
|
|
312
|
-
|
|
313
|
-
### Supported Object Types
|
|
314
|
-
|
|
315
|
-
| Type | Description |
|
|
316
|
-
|------|-------------|
|
|
317
|
-
| CLAS | Global ABAP class |
|
|
318
|
-
| INTF | Global interface |
|
|
319
|
-
| TABL | Database table |
|
|
320
|
-
| STRU | Structure type |
|
|
321
|
-
| DTEL | Data element |
|
|
322
|
-
|
|
323
|
-
### Response (success - class/interface)
|
|
324
|
-
|
|
325
|
-
```json
|
|
326
|
-
{
|
|
327
|
-
"success": true,
|
|
328
|
-
"command": "VIEW",
|
|
329
|
-
"message": "Retrieved object(s)",
|
|
330
|
-
"objects": [
|
|
331
|
-
{
|
|
332
|
-
"name": "ZCL_MY_CLASS",
|
|
333
|
-
"type": "CLAS",
|
|
334
|
-
"type_text": "Class",
|
|
335
|
-
"description": "Class ZCL_MY_CLASS in $PACKAGE",
|
|
336
|
-
"source": "CLASS zcl_my_class DEFINITION PUBLIC.\n PUBLIC SECTION.\n ...",
|
|
337
|
-
"not_found": false,
|
|
338
|
-
"components": []
|
|
339
|
-
}
|
|
340
|
-
],
|
|
341
|
-
"summary": {
|
|
342
|
-
"total": 1,
|
|
343
|
-
"by_type": ["CLAS"]
|
|
344
|
-
},
|
|
345
|
-
"error": ""
|
|
346
|
-
}
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Response (success - table)
|
|
350
|
-
|
|
351
|
-
```json
|
|
352
|
-
{
|
|
353
|
-
"success": true,
|
|
354
|
-
"command": "VIEW",
|
|
355
|
-
"message": "Retrieved object(s)",
|
|
356
|
-
"objects": [
|
|
357
|
-
{
|
|
358
|
-
"name": "SFLIGHT",
|
|
359
|
-
"type": "TABL",
|
|
360
|
-
"type_text": "Table",
|
|
361
|
-
"description": "Table SFLIGHT in SAPBC_DATAMODEL",
|
|
362
|
-
"source": "",
|
|
363
|
-
"not_found": false,
|
|
364
|
-
"components": [
|
|
365
|
-
{
|
|
366
|
-
"field": "MANDT",
|
|
367
|
-
"key": true,
|
|
368
|
-
"type": "CLNT",
|
|
369
|
-
"length": 3,
|
|
370
|
-
"dataelement": "MANDT",
|
|
371
|
-
"description": "Client"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"field": "CARRID",
|
|
375
|
-
"key": true,
|
|
376
|
-
"type": "CHAR",
|
|
377
|
-
"length": 3,
|
|
378
|
-
"dataelement": "S_CARR_ID",
|
|
379
|
-
"description": "Airline Code"
|
|
380
|
-
}
|
|
381
|
-
]
|
|
382
|
-
}
|
|
383
|
-
],
|
|
384
|
-
"summary": {
|
|
385
|
-
"total": 1,
|
|
386
|
-
"by_type": ["TABL"]
|
|
387
|
-
},
|
|
388
|
-
"error": ""
|
|
389
|
-
}
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
### Response (success - data element)
|
|
393
|
-
|
|
394
|
-
```json
|
|
395
|
-
{
|
|
396
|
-
"success": true,
|
|
397
|
-
"command": "VIEW",
|
|
398
|
-
"message": "Retrieved object(s)",
|
|
399
|
-
"objects": [
|
|
400
|
-
{
|
|
401
|
-
"name": "S_CARR_ID",
|
|
402
|
-
"type": "DTEL",
|
|
403
|
-
"type_text": "Data Element",
|
|
404
|
-
"description": "Airline Code",
|
|
405
|
-
"domain": "S_CARR_ID",
|
|
406
|
-
"domain_type": "CHAR",
|
|
407
|
-
"domain_length": 3,
|
|
408
|
-
"domain_decimals": 0,
|
|
409
|
-
"not_found": false,
|
|
410
|
-
"components": []
|
|
411
|
-
}
|
|
412
|
-
],
|
|
413
|
-
"summary": {
|
|
414
|
-
"total": 1,
|
|
415
|
-
"by_type": ["DTEL"]
|
|
416
|
-
},
|
|
417
|
-
"error": ""
|
|
418
|
-
}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
### Response (not found)
|
|
422
|
-
|
|
423
|
-
```json
|
|
424
|
-
{
|
|
425
|
-
"success": true,
|
|
426
|
-
"command": "VIEW",
|
|
427
|
-
"message": "Retrieved object(s)",
|
|
428
|
-
"objects": [
|
|
429
|
-
{
|
|
430
|
-
"name": "ZIF_NONEXISTENT",
|
|
431
|
-
"type": "",
|
|
432
|
-
"type_text": "Unknown",
|
|
433
|
-
"not_found": true,
|
|
434
|
-
"components": []
|
|
435
|
-
}
|
|
436
|
-
],
|
|
437
|
-
"summary": {
|
|
438
|
-
"total": 1,
|
|
439
|
-
"by_type": [""]
|
|
440
|
-
},
|
|
441
|
-
"error": ""
|
|
442
|
-
}
|
|
443
|
-
```
|
|
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
|
|
597
|
-
|
|
598
|
-
### Pull Response Fields
|
|
599
|
-
|
|
600
|
-
| Field | Type | Description |
|
|
601
|
-
|-------|------|-------------|
|
|
602
|
-
| `success` | String | 'X' for success, '' for errors |
|
|
603
|
-
| `job_id` | String | Job identifier |
|
|
604
|
-
| `message` | String | Status message |
|
|
605
|
-
| `error_detail` | String | Error details (if any) |
|
|
606
|
-
| `activated_count` | Integer | Number of activated objects |
|
|
607
|
-
| `failed_count` | Integer | Number of failed object entries |
|
|
608
|
-
| `started_at` | Timestamp | Start time of operation |
|
|
609
|
-
| `finished_at` | Timestamp | End time of operation |
|
|
610
|
-
| `log_messages` | Array | All log messages |
|
|
611
|
-
| `activated_objects` | Array | Unique successfully activated objects |
|
|
612
|
-
| `failed_objects` | Array | All error log entries |
|
|
613
|
-
|
|
614
|
-
### Syntax Check Response Fields
|
|
615
|
-
|
|
616
|
-
| Field | Type | Description |
|
|
617
|
-
|-------|------|-------------|
|
|
618
|
-
| `success` | String | 'X' for no errors, '' for errors |
|
|
619
|
-
| `object_type` | String | ABAP object type (e.g., 'CLAS', 'PROG') |
|
|
620
|
-
| `object_name` | String | ABAP object name |
|
|
621
|
-
| `error_count` | Integer | Number of syntax errors found |
|
|
622
|
-
| `errors` | Array | List of errors with line, column, text |
|
|
623
|
-
|
|
624
|
-
### Unit Test Response Fields
|
|
625
|
-
|
|
626
|
-
| Field | Type | Description |
|
|
627
|
-
|-------|------|-------------|
|
|
628
|
-
| `success` | String | 'X' for all tests passed, '' for failures |
|
|
629
|
-
| `test_count` | Integer | Total number of tests |
|
|
630
|
-
| `passed_count` | Integer | Number of passed tests |
|
|
631
|
-
| `failed_count` | Integer | Number of failed tests |
|
|
632
|
-
| `message` | String | Status message |
|
|
633
|
-
| `errors` | Array | Failed test details (empty if all tests pass) |
|
|
634
|
-
|
|
635
|
-
### Tree Response Fields
|
|
636
|
-
|
|
637
|
-
| Field | Type | Description |
|
|
638
|
-
|-------|------|-------------|
|
|
639
|
-
| `success` | Boolean | Whether the request succeeded |
|
|
640
|
-
| `command` | String | Command name ("TREE") |
|
|
641
|
-
| `package` | String | Root package name |
|
|
642
|
-
| `message` | String | Status message |
|
|
643
|
-
| `parent_package` | String | Parent package (empty if root) |
|
|
644
|
-
| `nodes` | Array | Flat list of all packages |
|
|
645
|
-
| `total_packages` | Integer | Total packages in tree |
|
|
646
|
-
| `total_objects` | Integer | Total objects in tree |
|
|
647
|
-
| `objects` | Array | Object counts by type |
|
|
648
|
-
| `error` | String | Error message (empty if success) |
|
|
649
|
-
|
|
650
|
-
### View Response Fields
|
|
651
|
-
|
|
652
|
-
| Field | Type | Description |
|
|
653
|
-
|-------|------|-------------|
|
|
654
|
-
| `success` | Boolean | Whether the request succeeded |
|
|
655
|
-
| `command` | String | Command name ("VIEW") |
|
|
656
|
-
| `message` | String | Status message |
|
|
657
|
-
| `objects` | Array | List of object information |
|
|
658
|
-
| `summary` | Object | Summary with total and by_type |
|
|
659
|
-
| `error` | String | Error message (empty if success) |
|
|
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
|
-
|
|
687
|
-
### Object Fields (for View)
|
|
688
|
-
|
|
689
|
-
| Field | Type | Description |
|
|
690
|
-
|-------|------|-------------|
|
|
691
|
-
| `name` | String | Object name |
|
|
692
|
-
| `type` | String | Object type (CLAS, INTF, TABL, STRU, DTEL) |
|
|
693
|
-
| `type_text` | String | Human-readable type |
|
|
694
|
-
| `description` | String | Object description |
|
|
695
|
-
| `source` | String | Source code (CLAS/INTF) |
|
|
696
|
-
| `domain` | String | Domain name (DTEL) |
|
|
697
|
-
| `domain_type` | String | Domain data type (DTEL) |
|
|
698
|
-
| `domain_length` | Integer | Domain length (DTEL) |
|
|
699
|
-
| `domain_decimals` | Integer | Domain decimals (DTEL) |
|
|
700
|
-
| `not_found` | Boolean | true if object does not exist |
|
|
701
|
-
| `components` | Array | Fields/components (TABL/STRU) |
|
|
702
|
-
|
|
703
|
-
### Error Item Fields
|
|
704
|
-
|
|
705
|
-
| Field | Type | Description |
|
|
706
|
-
|-------|------|-------------|
|
|
707
|
-
| `class_name` | String | Test class name |
|
|
708
|
-
| `method_name` | String | Failed test method name |
|
|
709
|
-
| `error_kind` | String | Error type (e.g., 'ERROR', 'FAILURE') |
|
|
710
|
-
| `error_text` | String | Detailed error message from AUnit |
|