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.
Files changed (115) hide show
  1. package/README.md +2 -0
  2. package/abap/guidelines/00_index.md +35 -0
  3. package/abap/guidelines/01_sql.md +72 -0
  4. package/abap/guidelines/02_exceptions.md +108 -0
  5. package/abap/guidelines/03_testing.md +252 -0
  6. package/abap/guidelines/04_cds.md +120 -0
  7. package/abap/guidelines/05_classes.md +50 -0
  8. package/abap/guidelines/06_objects.md +103 -0
  9. package/abap/guidelines/07_json.md +22 -0
  10. package/abap/guidelines/08_abapgit.md +193 -0
  11. package/bin/abapgit-agent +597 -44
  12. package/bin/abgagt +24 -0
  13. package/package.json +11 -3
  14. package/src/abap-client.js +65 -2
  15. package/src/agent.js +58 -4
  16. package/src/config.js +9 -2
  17. package/src/ref-search.js +989 -0
  18. package/.abapGitAgent.example +0 -11
  19. package/.github/workflows/release.yml +0 -57
  20. package/API.md +0 -710
  21. package/CLAUDE.md +0 -1031
  22. package/CLAUDE_MEM.md +0 -88
  23. package/ERROR_HANDLING.md +0 -30
  24. package/INSTALL.md +0 -155
  25. package/RELEASE_NOTES.md +0 -143
  26. package/abap/CLAUDE.md +0 -898
  27. package/abap/copilot-instructions.md +0 -79
  28. package/abap/package.devc.xml +0 -10
  29. package/abap/zcl_abgagt_agent.clas.abap +0 -420
  30. package/abap/zcl_abgagt_agent.clas.xml +0 -15
  31. package/abap/zcl_abgagt_cmd_factory.clas.abap +0 -48
  32. package/abap/zcl_abgagt_cmd_factory.clas.xml +0 -15
  33. package/abap/zcl_abgagt_command_create.clas.abap +0 -95
  34. package/abap/zcl_abgagt_command_create.clas.xml +0 -15
  35. package/abap/zcl_abgagt_command_import.clas.abap +0 -138
  36. package/abap/zcl_abgagt_command_import.clas.xml +0 -15
  37. package/abap/zcl_abgagt_command_inspect.clas.abap +0 -411
  38. package/abap/zcl_abgagt_command_inspect.clas.testclasses.abap +0 -121
  39. package/abap/zcl_abgagt_command_inspect.clas.xml +0 -16
  40. package/abap/zcl_abgagt_command_preview.clas.abap +0 -386
  41. package/abap/zcl_abgagt_command_preview.clas.xml +0 -15
  42. package/abap/zcl_abgagt_command_pull.clas.abap +0 -80
  43. package/abap/zcl_abgagt_command_pull.clas.testclasses.abap +0 -87
  44. package/abap/zcl_abgagt_command_pull.clas.xml +0 -16
  45. package/abap/zcl_abgagt_command_tree.clas.abap +0 -237
  46. package/abap/zcl_abgagt_command_tree.clas.xml +0 -15
  47. package/abap/zcl_abgagt_command_unit.clas.abap +0 -297
  48. package/abap/zcl_abgagt_command_unit.clas.xml +0 -15
  49. package/abap/zcl_abgagt_command_view.clas.abap +0 -240
  50. package/abap/zcl_abgagt_command_view.clas.xml +0 -15
  51. package/abap/zcl_abgagt_resource_create.clas.abap +0 -71
  52. package/abap/zcl_abgagt_resource_create.clas.xml +0 -15
  53. package/abap/zcl_abgagt_resource_health.clas.abap +0 -25
  54. package/abap/zcl_abgagt_resource_health.clas.xml +0 -15
  55. package/abap/zcl_abgagt_resource_import.clas.abap +0 -66
  56. package/abap/zcl_abgagt_resource_import.clas.xml +0 -15
  57. package/abap/zcl_abgagt_resource_inspect.clas.abap +0 -62
  58. package/abap/zcl_abgagt_resource_inspect.clas.xml +0 -15
  59. package/abap/zcl_abgagt_resource_preview.clas.abap +0 -67
  60. package/abap/zcl_abgagt_resource_preview.clas.xml +0 -15
  61. package/abap/zcl_abgagt_resource_pull.clas.abap +0 -71
  62. package/abap/zcl_abgagt_resource_pull.clas.xml +0 -15
  63. package/abap/zcl_abgagt_resource_tree.clas.abap +0 -70
  64. package/abap/zcl_abgagt_resource_tree.clas.xml +0 -15
  65. package/abap/zcl_abgagt_resource_unit.clas.abap +0 -64
  66. package/abap/zcl_abgagt_resource_unit.clas.xml +0 -15
  67. package/abap/zcl_abgagt_resource_view.clas.abap +0 -68
  68. package/abap/zcl_abgagt_resource_view.clas.xml +0 -15
  69. package/abap/zcl_abgagt_rest_handler.clas.abap +0 -32
  70. package/abap/zcl_abgagt_rest_handler.clas.xml +0 -15
  71. package/abap/zcl_abgagt_util.clas.abap +0 -93
  72. package/abap/zcl_abgagt_util.clas.testclasses.abap +0 -84
  73. package/abap/zcl_abgagt_util.clas.xml +0 -16
  74. package/abap/zcl_abgagt_viewer_clas.clas.abap +0 -58
  75. package/abap/zcl_abgagt_viewer_clas.clas.xml +0 -15
  76. package/abap/zcl_abgagt_viewer_ddls.clas.abap +0 -83
  77. package/abap/zcl_abgagt_viewer_ddls.clas.xml +0 -15
  78. package/abap/zcl_abgagt_viewer_dtel.clas.abap +0 -98
  79. package/abap/zcl_abgagt_viewer_dtel.clas.xml +0 -15
  80. package/abap/zcl_abgagt_viewer_factory.clas.abap +0 -41
  81. package/abap/zcl_abgagt_viewer_factory.clas.xml +0 -15
  82. package/abap/zcl_abgagt_viewer_intf.clas.abap +0 -58
  83. package/abap/zcl_abgagt_viewer_intf.clas.xml +0 -15
  84. package/abap/zcl_abgagt_viewer_stru.clas.abap +0 -59
  85. package/abap/zcl_abgagt_viewer_stru.clas.xml +0 -15
  86. package/abap/zcl_abgagt_viewer_tabl.clas.abap +0 -59
  87. package/abap/zcl_abgagt_viewer_tabl.clas.xml +0 -15
  88. package/abap/zcl_abgagt_viewer_ttyp.clas.abap +0 -93
  89. package/abap/zcl_abgagt_viewer_ttyp.clas.xml +0 -15
  90. package/abap/zif_abgagt_agent.intf.abap +0 -53
  91. package/abap/zif_abgagt_agent.intf.xml +0 -15
  92. package/abap/zif_abgagt_cmd_factory.intf.abap +0 -7
  93. package/abap/zif_abgagt_cmd_factory.intf.xml +0 -15
  94. package/abap/zif_abgagt_command.intf.abap +0 -26
  95. package/abap/zif_abgagt_command.intf.xml +0 -15
  96. package/abap/zif_abgagt_util.intf.abap +0 -28
  97. package/abap/zif_abgagt_util.intf.xml +0 -15
  98. package/abap/zif_abgagt_viewer.intf.abap +0 -12
  99. package/abap/zif_abgagt_viewer.intf.xml +0 -15
  100. package/docs/commands.md +0 -142
  101. package/docs/create-command.md +0 -129
  102. package/docs/health-command.md +0 -89
  103. package/docs/import-command.md +0 -195
  104. package/docs/init-command.md +0 -189
  105. package/docs/inspect-command.md +0 -158
  106. package/docs/preview-command.md +0 -528
  107. package/docs/pull-command.md +0 -188
  108. package/docs/status-command.md +0 -68
  109. package/docs/tree-command.md +0 -303
  110. package/docs/unit-command.md +0 -167
  111. package/docs/view-command.md +0 -501
  112. package/img/claude.png +0 -0
  113. package/scripts/claude-integration.js +0 -351
  114. package/scripts/release.sh +0 -60
  115. package/scripts/test-integration.js +0 -139
@@ -1,501 +0,0 @@
1
- # view Command Requirements
2
-
3
- ## Overview
4
-
5
- View ABAP object source code directly from the ABAP system. This command retrieves and displays source code for objects that may not exist locally in your git repository, enabling developers to understand class definitions, method signatures, structure components, and data element types without pulling the entire object.
6
-
7
- **This is the PRIMARY way to explore unfamiliar ABAP objects.**
8
-
9
- ## Use Cases
10
-
11
- - **Understand unfamiliar code**: View a class definition from a dependency package
12
- - **Check method signatures**: See method parameters and return types before calling
13
- - **Inspect data structures**: View table or structure field definitions
14
- - **Review interface definitions**: Check interface methods and constants
15
- - **Quick reference**: Look up definitions without opening SE80 or ADT
16
-
17
- ## Command
18
-
19
- ```bash
20
- # View single object (auto-detect type from TADIR)
21
- abapgit-agent view --objects ZCL_MY_CLASS
22
- abapgit-agent view --objects ZIF_MY_INTERFACE
23
- abapgit-agent view --objects ZMY_TABLE
24
-
25
- # View with explicit type
26
- abapgit-agent view --objects ZCL_MY_CLASS --type CLAS
27
- abapgit-agent view --objects ZIF_MY_INT --type INTF
28
- abapgit-agent view --objects ZMY_STRUCT --type STRU
29
- abapgit-agent view --objects ZMY_TABLE --type TABL
30
- abapgit-agent view --objects ZMY_DTEL --type DTEL
31
- abapgit-agent view --objects ZMY_TTYP --type TTYP
32
- abapgit-agent view --objects ZC_MY_CDS_VIEW --type DDLS
33
-
34
- # View multiple objects
35
- abapgit-agent view --objects ZCL_CLASS1,ZCL_CLASS2,ZIF_INTERFACE1
36
-
37
- # Lowercase names and types are supported
38
- abapgit-agent view --objects zcl_my_class --type clas
39
-
40
- # Output as JSON (for scripting/AI processing)
41
- abapgit-agent view --objects ZCL_MY_CLASS --json
42
- ```
43
-
44
- ## Prerequisite
45
-
46
- - `.abapGitAgent` exists with valid credentials
47
- - Object must exist in the ABAP system
48
-
49
- ## Parameters
50
-
51
- | Parameter | Required | Description |
52
- |-----------|----------|-------------|
53
- | `--objects` | Yes | Comma-separated list of object names (e.g., `ZCL_MY_CLASS,ZIF_MY_INTERFACE`) |
54
- | `--type` | No | Object type for all objects (CLAS, INTF, TABL, STRU, DTEL, TTYP, DDLS). Auto-detected from TADIR if not specified |
55
- | `--json` | No | Output raw JSON only (for scripting) |
56
-
57
- ---
58
-
59
- ## Tasks
60
-
61
- ### 1. Validate Parameters
62
-
63
- - `--objects` must be specified
64
- - Object names are converted to uppercase automatically
65
-
66
- ### 2. Load Configuration
67
-
68
- Read `.abapGitAgent` for credentials
69
-
70
- ### 3. Fetch CSRF Token
71
-
72
- ```bash
73
- GET /health (with X-CSRF-Token: fetch)
74
- ```
75
-
76
- ### 4. Make View Request
77
-
78
- **Endpoint:** `POST /view`
79
-
80
- **Request Body:**
81
- ```json
82
- {
83
- "objects": ["ZCL_MY_CLASS", "ZIF_MY_INTERFACE"],
84
- "type": "CLAS"
85
- }
86
- ```
87
-
88
- ### 5. Display Results
89
-
90
- ---
91
-
92
- ## Output
93
-
94
- ### Class Definition (CLAS)
95
-
96
- ```
97
- 📖 ZCL_MY_CLASS (Class)
98
- Class ZCL_MY_CLASS in $PACKAGE_NAME
99
-
100
- CLASS zcl_my_class DEFINITION PUBLIC.
101
-
102
- PUBLIC SECTION.
103
- INTERFACES: if_interface.
104
-
105
- METHODS:
106
- constructor
107
- IMPORTING
108
- !iv_name TYPE string OPTIONAL,
109
- get_value
110
- RETURNING
111
- VALUE(rv_result) TYPE string.
112
- ENDCLASS.
113
- ```
114
-
115
- ### Interface Definition (INTF)
116
-
117
- ```
118
- 📖 ZIF_MY_INTERFACE (Interface)
119
- Interface ZIF_MY_INTERFACE in $PACKAGE_NAME
120
-
121
- INTERFACE zif_my_interface PUBLIC.
122
-
123
- CONSTANTS:
124
- gc_value TYPE string VALUE 'test'.
125
-
126
- METHODS:
127
- process
128
- IMPORTING
129
- !iv_data TYPE any
130
- RETURNING
131
- VALUE(rv_result) TYPE abap_bool,
132
- get_status
133
- RETURNING
134
- VALUE(rv_status) TYPE string.
135
-
136
- ENDINTERFACE.
137
- ```
138
-
139
- ### Table Definition (TABL)
140
-
141
- ```
142
- 📖 SFLIGHT (Table)
143
- Table SFLIGHT in SAPBC_DATAMODEL
144
-
145
- TABLE SFLIGHT:
146
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
147
- | Field | Key | Type | Length | Data Elem | Description |
148
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
149
- | MANDT | X | CLNT | 3 | MANDT | Client |
150
- | CARRID | X | CHAR | 3 | S_CARR_ID | Airline Code |
151
- | CONNID | X | NUMC | 4 | S_CONN_ID | Connection Number |
152
- | FLDATE | X | DATS | 8 | S_DATE | Flight Date |
153
- | PRICE | | CURR | 16 | S_PRICE | Airfare |
154
- | CURRENCY | | CUKY | 5 | S_CURR | Airline Currency |
155
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
156
- ```
157
-
158
- ### Structure Definition (STRU)
159
-
160
- ```
161
- 📖 SFLIGHT (Structure)
162
- Structure SFLIGHT in SAPBC_DATAMODEL
163
-
164
- STRUCTURE SFLIGHT:
165
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
166
- | Field | Key | Type | Length | Data Elem | Description |
167
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
168
- | MANDT | X | CLNT | 3 | MANDT | Client |
169
- | CARRID | X | CHAR | 3 | S_CARR_ID | Airline Code |
170
- |------------------+-----+----------+----------+--------------------------------+--------------------------------------------------------------|
171
- ```
172
-
173
- ### Data Element Definition (DTEL)
174
-
175
- ```
176
- 📖 S_CARR_ID (Data Element)
177
- Airline Code
178
-
179
- DATA ELEMENT S_CARR_ID:
180
- ┌────────────────────┬──────────────────────────────────────────┐
181
- │ Property │ Value │
182
- ├────────────────────┼──────────────────────────────────────────┤
183
- │ Data Type │ CHAR │
184
- │ Length │ 3 │
185
- │ Description │ Airline Code │
186
- │ Domain │ S_CARR_ID │
187
- └────────────────────┴──────────────────────────────────────────┘
188
- ```
189
-
190
- ### Table Type Definition (TTYP)
191
-
192
- ```
193
- 📖 DDL2DDICWARNINGS (Table Type)
194
- Table Type DDL2DDICWARNINGS in SDDL_BASIC_FUNCTIONS
195
-
196
- Line Type: DDL2DDICERR
197
- Access Mode: STANDARD
198
- Key Definition: WITH KEY
199
- ```
200
-
201
- ### CDS View Definition (DDLS)
202
-
203
- ```
204
- 📖 ZC_MY_CDS_VIEW (CDS View)
205
- CDS View ZC_MY_CDS_VIEW in $PACKAGE
206
-
207
- @AbapCatalog.sqlViewName: 'ZCMYVIEW'
208
- @AbapCatalog.compiler.compareFilter: true
209
- @AccessControl.authorizationCheck: #NOT_REQUIRED
210
- @EndUserText.label: 'My CDS View'
211
- define view ZC_MY_CDS_VIEW as select from tdevc
212
- {
213
- key devclass as Devclass,
214
- parentcl as ParentPackage,
215
- ctext as Description
216
- }
217
- where devclass not like '$%'
218
- ```
219
-
220
- ### Multiple Objects
221
-
222
- ```
223
- 📖 Viewing 3 Objects
224
-
225
- 1️⃣ ZCL_CLASS1 (Class)
226
- └─ Class ZCL_CLASS1 in $PACKAGE
227
-
228
- 2️⃣ ZIF_INTERFACE1 (Interface)
229
- └─ Interface ZIF_INTERFACE1 in $PACKAGE
230
-
231
- 3️⃣ ZMY_TABLE (Table)
232
- └─ Table ZMY_TABLE in $PACKAGE
233
- ```
234
-
235
- ### JSON Output (Pure Scripting)
236
-
237
- ```json
238
- {
239
- "SUCCESS": true,
240
- "COMMAND": "VIEW",
241
- "MESSAGE": "Retrieved 1 object(s)",
242
- "OBJECTS": [
243
- {
244
- "NAME": "ZCL_MY_CLASS",
245
- "TYPE": "CLAS",
246
- "TYPE_TEXT": "Class",
247
- "DESCRIPTION": "Class ZCL_MY_CLASS in $PACKAGE",
248
- "SOURCE": "CLASS zcl_my_class DEFINITION PUBLIC.\n ...",
249
- "DEFINITION": "",
250
- "COMPONENTS": []
251
- }
252
- ],
253
- "SUMMARY": {
254
- "TOTAL": 1,
255
- "BY_TYPE": ["CLAS"]
256
- },
257
- "ERROR": ""
258
- }
259
- ```
260
-
261
- ---
262
-
263
- ## Response Structure
264
-
265
- ### JSON Response Schema
266
-
267
- ```json
268
- {
269
- "SUCCESS": boolean,
270
- "COMMAND": "VIEW",
271
- "MESSAGE": "string",
272
- "OBJECTS": [
273
- {
274
- "NAME": "string",
275
- "TYPE": "CLAS|INTF|TABL|STRU|DTEL|TTYP|DDLS",
276
- "TYPE_TEXT": "string",
277
- "DESCRIPTION": "string",
278
- "DOMAIN": "string", // For DTEL
279
- "DOMAIN_TYPE": "string", // For DTEL
280
- "DOMAIN_LENGTH": number, // For DTEL
281
- "DOMAIN_DECIMALS": number, // For DTEL
282
- "SOURCE": "string", // Full ABAP source (CLAS/INTF)
283
- "NOT_FOUND": boolean, // true if object does not exist
284
- "COMPONENTS": [ // For TABL/STRU
285
- {
286
- "FIELD": "string",
287
- "KEY": boolean,
288
- "TYPE": "string",
289
- "LENGTH": number,
290
- "DATAELEMENT": "string",
291
- "DESCRIPTION": "string"
292
- }
293
- ]
294
- }
295
- ],
296
- "SUMMARY": {
297
- "TOTAL": number,
298
- "BY_TYPE": ["string"]
299
- },
300
- "ERROR": "string"
301
- }
302
- ```
303
-
304
- ---
305
-
306
- ## Error Handling
307
-
308
- | Error | Message |
309
- |-------|---------|
310
- | Object not found | `Object not found: ZCL_NONEXISTENT` |
311
- | Invalid object type | `Unsupported object type: INVALID` |
312
-
313
- ### Error Output
314
-
315
- ```
316
- ❌ Object not found: ZCL_NONEXISTENT
317
- ```
318
-
319
- ---
320
-
321
- ## Object Type Detection
322
-
323
- ### Auto-Detection Rules
324
-
325
- | Object Name Pattern | Default Type |
326
- |---------------------|--------------|
327
- | `ZCL_*` or `zcl_*` | CLAS (Class) |
328
- | `ZIF_*` or `zif_*` | INTF (Interface) |
329
- | `ZTY_*` or `zty_*` | DTEL (Data Element) |
330
- | `ZS__*` or `zs__*` | DTEL (Data Element) |
331
- | Other `Z*` | CLAS (default fallback) |
332
-
333
- ### Supported Object Types
334
-
335
- | Type Code | Type Text | Description |
336
- |-----------|-----------|-------------|
337
- | `CLAS` | Class | Global ABAP class |
338
- | `INTF` | Interface | Global interface |
339
- | `TABL` | Table | Database table |
340
- | `STRU` | Structure | Structure type |
341
- | `DTEL` | Data Element | Data element/domain type |
342
- | `TTYP` | Table Type | Table type definition |
343
- | `DDLS` | CDS View | CDS View/Entity definition |
344
-
345
- ---
346
-
347
- ## Example
348
-
349
- ```bash
350
- # View a class definition
351
- abapgit-agent view --objects ZCL_ABGAGT_AGENT
352
-
353
- # View interface
354
- abapgit-agent view --objects ZIF_ABGAGT_COMMAND
355
-
356
- # View table structure
357
- abapgit-agent view --objects SFLIGHT --type TABL
358
-
359
- # View data element
360
- abapgit-agent view --objects S_CARR_ID --type DTEL
361
-
362
- # View CDS view definition
363
- abapgit-agent view --objects ZC_MY_CDS_VIEW --type DDLS
364
-
365
- # View multiple objects
366
- abapgit-agent view --objects ZCL_CONFIG,ZIF_LOGGER,ZCL_UTILS
367
-
368
- # JSON for programmatic use
369
- abapgit-agent view --objects ZCL_MY_CLASS --json
370
-
371
- # Lowercase support
372
- abapgit-agent view --objects zcl_my_class
373
- abapgit-agent view --objects sflight --type tabl
374
- ```
375
-
376
- ---
377
-
378
- ## Implementation
379
-
380
- ### ABAP Tables Used
381
-
382
- | Table | Purpose |
383
- |-------|---------|
384
- | **TADIR** | Object directory (devclass, object type) |
385
- | **SEOCLASS** | Class/interface metadata |
386
- | **SEOCOMPODF** | Component definitions |
387
- | **DD02L** | Table/structure definitions |
388
- | **DD03L** | Table/structure fields |
389
- | **DD04L** | Data element definitions |
390
- | **DD40L** | Table type definitions |
391
-
392
- ### Class Source Retrieval (CLAS)
393
-
394
- ```abap
395
- " Get class info from TADIR
396
- SELECT SINGLE obj_name, devclass FROM tadir
397
- INTO (lv_obj_name, lv_devclass)
398
- WHERE obj_name = iv_name
399
- AND object = 'CLAS'.
400
-
401
- " Get public section source
402
- CALL METHOD cl_oo_classname_service=>get_pubsec_name
403
- EXPORTING clsname = lv_name
404
- RECEIVING result = lv_prog.
405
-
406
- READ REPORT lv_prog INTO lt_source.
407
- ```
408
-
409
- ### Interface Source Retrieval (INTF)
410
-
411
- ```abap
412
- " Get interface info from TADIR
413
- SELECT SINGLE obj_name, devclass FROM tadir
414
- INTO (lv_obj_name, lv_devclass)
415
- WHERE obj_name = iv_name
416
- AND object = 'INTF'.
417
-
418
- " Get interface section source
419
- CALL METHOD cl_oo_classname_service=>get_intfsec_name
420
- EXPORTING clsname = lv_name
421
- RECEIVING result = lv_prog.
422
-
423
- READ REPORT lv_prog INTO lt_source.
424
- ```
425
-
426
- ### Table/Structure Retrieval (TABL/STRU)
427
-
428
- ```abap
429
- " Get fields from DD03L
430
- SELECT fieldname, keyflag AS key, datatype AS type, leng AS length,
431
- rollname AS dataelement, ddtext AS description
432
- FROM dd03l
433
- INTO TABLE lt_components
434
- WHERE tabname = iv_name
435
- AND as4local = 'A'
436
- ORDER BY position.
437
- ```
438
-
439
- ### Data Element Retrieval (DTEL)
440
-
441
- ```abap
442
- " Get domain info from DD04V
443
- SELECT SINGLE rollname, ddtext, datatype, leng, decimals
444
- FROM dd04v
445
- INTO (lv_domain, lv_desc, lv_type, lv_len, lv_decimals)
446
- WHERE rollname = iv_name.
447
- ```
448
-
449
- ### Table Type Retrieval (TTYP)
450
-
451
- ```abap
452
- " Get TTYP details from DD40L
453
- SELECT SINGLE rowtype accessmode keydef FROM dd40l
454
- INTO (lv_linetype, lv_tabprottype, lv_keydef)
455
- WHERE typename = iv_name
456
- AND as4local = 'A'.
457
-
458
- " Convert codes to text:
459
- " - Access mode: T=STANDARD, S=SORTED, H=HASHED
460
- " - Key definition: D=WITH KEY, N=NO KEY
461
- ```
462
-
463
- ### CDS View Retrieval (DDLS)
464
-
465
- ```abap
466
- " Use DDL handler to read CDS view source
467
- lo_handler = cl_dd_ddl_handler_factory=>create( ).
468
-
469
- " First try to read inactive version (get_state = 'M')
470
- TRY.
471
- lo_handler->read(
472
- EXPORTING
473
- name = lv_ddls_name
474
- get_state = 'M'
475
- IMPORTING
476
- ddddlsrcv_wa = ls_ddlsrcv ).
477
-
478
- IF ls_ddlsrcv-source IS NOT INITIAL.
479
- lv_found = abap_true.
480
- ENDIF.
481
-
482
- CATCH cx_dd_ddl_check.
483
- " Ignore - will try active version
484
- ENDTRY.
485
-
486
- " If no inactive version, try active version
487
- IF lv_found = abap_false.
488
- TRY.
489
- lo_handler->read(
490
- EXPORTING
491
- name = lv_ddls_name
492
- get_state = 'A'
493
- IMPORTING
494
- ddddlsrcv_wa = ls_ddlsrcv ).
495
- CATCH cx_dd_ddl_check.
496
- " Not found
497
- ENDTRY.
498
- ENDIF.
499
-
500
- " Source code is in ls_ddlsrcv-source
501
- ```
package/img/claude.png DELETED
Binary file