abapgit-agent 1.15.1 → 1.15.3

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.
@@ -36,8 +36,14 @@ The folder is configured in `.abapGitAgent` (property: `folder`):
36
36
 
37
37
  Each ABAP object needs an XML metadata file. Local helper/test-double classes use separate `.locals_def.abap` / `.locals_imp.abap` files.
38
38
 
39
+ **Name length limits** (verify before naming anything):
40
+ - CLAS, INTF: name **30 chars** | method names: **30 chars**
41
+ - TABL, STRU: name **30 chars** | **field names: 16 chars** ← most common mistake
42
+ - DDLS (CDS view entity): **40 chars** | field alias: 30 | FUGR: 26 | MSAG: 20 | PROG/DTEL/DOMA/TTYP: 30
43
+
39
44
  ```bash
40
- abapgit-agent ref --topic object-creation # XML templates and local class setup
45
+ abapgit-agent ref --topic naming-limits # full length reference
46
+ abapgit-agent ref --topic object-creation # XML templates and local class setup
41
47
  ```
42
48
 
43
49
  ### 4. Use Syntax Command Before Commit (for CLAS, INTF, PROG, DDLS)
@@ -65,6 +71,24 @@ abapgit-agent ref --topic debug-session # full debug guide
65
71
  abapgit-agent ref --topic debug-dump # dump analysis guide
66
72
  ```
67
73
 
74
+ ### 7. Never Run `run` Command Proactively
75
+
76
+ Never call `abapgit-agent run` unless the user explicitly asks — it can modify data or trigger RFCs.
77
+
78
+ ### 8. Probe and PoC Objects — Always Z/Y, Never in SAP Packages
79
+
80
+ When `objects.local.md` shows SAP namespace (`CL_*`, `IF_*`, `/NAMESPACE/*`) and the user asks to create a new object, always ask first: *"Is this a production object, a PoC, or a probe?"*
81
+
82
+ → `abapgit-agent ref --topic probe-poc`
83
+
84
+ ### 9. abaplint — Optional, Project-Controlled
85
+
86
+ Only run if `.abaplint.json` exists. Run after `syntax`, before commit. Always check `ref --topic abaplint` before applying any quickfix.
87
+
88
+ ```bash
89
+ ls .abaplint.json 2>/dev/null && abapgit-agent lint
90
+ ```
91
+
68
92
  ---
69
93
 
70
94
  ## Development Workflow
@@ -77,6 +101,8 @@ Checked into the repository — applies to all developers. **Read this file at t
77
101
  |---------|--------|
78
102
  | `safeguards.requireFilesForPull: true` | Always include `--files` in every `pull` |
79
103
  | `safeguards.disablePull: true` | Do not run `abapgit-agent pull` at all |
104
+ | `safeguards.disableRun: true` | Do not run `abapgit-agent run` at all |
105
+ | `safeguards.disableProbeClasses: true` | Use `scratchWorkspace` for probe classes instead |
80
106
  | `conflictDetection.mode: "abort"` | Abort pull on conflict — inform user |
81
107
  | `transports.allowCreate/allowRelease: false` | Blocked — inform user |
82
108
 
@@ -97,10 +123,15 @@ abapgit-agent ref --topic branch-workflow
97
123
  ```
98
124
  Modified ABAP files?
99
125
  ├─ CLAS/INTF/PROG/DDLS files?
100
- │ ├─ Independent files? → syntax → commit → push → pull
101
- │ └─ Dependent files? → skip syntax → commit → push → pull
126
+ │ ├─ Independent files? → syntax → [abaplint] → commit → push → pull --sync-xml
127
+ │ └─ Dependent files? → skip syntax → [abaplint] → commit → push → pull --sync-xml
102
128
  └─ Other types (FUGR, TABL, etc.)?
103
- skip syntax commit push → pull → (if errors: inspect)
129
+ ├─ XML-only (TABL, STRU, DTEL, TTYP, DOMA, MSAG)?
130
+ │ → skip syntax → [abaplint] → commit → push → pull --files <name>.tabl.xml --sync-xml
131
+ └─ FUGR and others?
132
+ → skip syntax → [abaplint] → commit → push → pull --sync-xml → (if errors: inspect)
133
+
134
+ [abaplint] = run lint only if .abaplint.json exists; ref --topic abaplint before any quickfix
104
135
  ```
105
136
 
106
137
  ```bash
package/abap/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  layout: default
3
- title: Claude Code Instructions (Template)
3
+ title: AI Agent Instructions
4
4
  nav_order: 1
5
5
  parent: ABAP Development
6
6
  ---
7
7
 
8
- # Claude Code Instructions - Template
8
+ # AI Agent Instructions
9
9
 
10
10
  This file provides guidelines for **generating ABAP code** in abapGit repositories.
11
11
 
@@ -99,6 +99,20 @@ Never assume Z/Y prefix without checking.
99
99
  XML-only objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG) need ONLY the XML file
100
100
  ```
101
101
 
102
+ **Before choosing a name, verify the length limit for the object type:**
103
+
104
+ | Object type | Name limit | Field/sub-element limit |
105
+ |---|---|---|
106
+ | CLAS, INTF | **30 chars** | method names: **30 chars** |
107
+ | TABL, STRU | **30 chars** | **field names: 16 chars** |
108
+ | DDLS (CDS view entity) | **40 chars** | field alias: **30 chars** |
109
+ | DCLS (CDS access control) | **40 chars** | — (name must match its DDLS view) |
110
+ | FUGR (function group) | **26 chars** | function module name: **30 chars** |
111
+ | MSAG (message class) | **20 chars** | — |
112
+ | PROG, DTEL, DOMA, TTYP | **30 chars** | — |
113
+
114
+ → Full length reference: `abapgit-agent ref --topic naming-limits`
115
+
102
116
  Use the object name from `objects.local.md` (or `objects.md` as fallback) in place of `<name>`:
103
117
 
104
118
  | Object Type | Source File | XML File |
@@ -110,7 +124,7 @@ Use the object name from `objects.local.md` (or `objects.md` as fallback) in pla
110
124
  | CDS Access Control (DCLS) | `<name>.dcls.asdcls` | `<name>.dcls.xml` |
111
125
  | Function Group (FUGR) | `<name>.fugr.abap` + includes | `<name>.fugr.xml` |
112
126
  | Table (TABL) | *(none)* | `<name>.tabl.xml` |
113
- | Structure (STRU) | *(none)* | `<name>.stru.xml` |
127
+ | Structure (STRU) | *(none)* | `<name>.tabl.xml` ⚠️ NOT `.stru.xml` |
114
128
  | Data Element (DTEL) | *(none)* | `<name>.dtel.xml` |
115
129
  | Table Type (TTYP) | *(none)* | `<name>.ttyp.xml` |
116
130
  | Domain (DOMA) | *(none)* | `<name>.doma.xml` |
@@ -143,7 +157,7 @@ Anything else (SAP namespace object, or SAP-delivered package)?
143
157
 
144
158
  Object: <NAME> (<Type>)
145
159
  Package: <PACKAGE>
146
- Files: <folder>/<name>.<ext>.abap
160
+ Files: <folder>/<name>.<ext>.abap ← omit this line for XML-only types (TABL/STRU/DTEL/TTYP/DOMA/MSAG)
147
161
  <folder>/<name>.<ext>.xml
148
162
 
149
163
  Shall I proceed?"
@@ -157,10 +171,11 @@ Anything else (SAP namespace object, or SAP-delivered package)?
157
171
  ```
158
172
 
159
173
  > **Tip for project setup**: Add package rules to `objects.local.md` so Claude never
160
- > needs to ask. See `guidelines/objects.md` for examples.
174
+ > needs to ask. Run: `abapgit-agent ref --topic objects`
161
175
 
162
176
  → For exact XML templates: `abapgit-agent ref --topic abapgit` (CLAS/INTF/PROG/DDLS/DCLS/FUGR) or `abapgit-agent ref --topic abapgit-xml-only` (TABL/STRU/DTEL/TTYP/DOMA/MSAG)
163
177
  → For local helper/test-double class files: `abapgit-agent ref --topic object-creation`
178
+ → For documentation comment format (shorttext, @parameter, CDS): `abapgit-agent ref --topic comments`
164
179
 
165
180
  ---
166
181
 
@@ -213,9 +228,15 @@ abapgit-agent pull --files src/<intf_name>.intf.abap,src/<class_name>.clas.abap
213
228
 
214
229
  ### 5. Local Helper / Test-Double Classes
215
230
 
216
- See `guidelines/object-creation.md` run: `abapgit-agent ref --topic object-creation`
231
+ When a class needs local helper classes or test doubles, create separate include files alongside the main class file:
217
232
 
218
- **XML metadata when adding test classes:**
233
+ ```
234
+ <name>.clas.locals_def.abap ← local type/class definitions
235
+ <name>.clas.locals_imp.abap ← local class implementations
236
+ <name>.clas.testclasses.abap ← unit test classes (FOR TESTING)
237
+ ```
238
+
239
+ **XML metadata when adding these files:**
219
240
 
220
241
  ```
221
242
  Adding .clas.testclasses.abap to an existing class?
@@ -228,6 +249,7 @@ Adding .clas.locals_def.abap (local type definitions)?
228
249
  <CLSCCINCL>X</CLSCCINCL>
229
250
  ```
230
251
 
252
+ → For exact XML flag placement and test double class patterns: `abapgit-agent ref --topic object-creation`
231
253
  → For exact XML flag placement: `abapgit-agent ref --topic abapgit` (search "WITH_UNIT_TESTS")
232
254
 
233
255
  ---
@@ -330,8 +352,11 @@ AI thought process:
330
352
 
331
353
  ### 7. CDS Unit Tests
332
354
 
333
- Use `CL_CDS_TEST_ENVIRONMENT` for unit tests that read CDS views.
334
- → See `guidelines/cds-testing.md` — run: `abapgit-agent ref --topic cds-testing`
355
+ If a class under test reads a CDS view, use `CL_CDS_TEST_ENVIRONMENT` to provide test data — do **not** mock the database layer manually. Without this, test data setup is unreliable and tests may pass locally but fail on other systems.
356
+
357
+ **Trigger**: your class calls `SELECT FROM <cds_view>` directly or via a helper.
358
+
359
+ → For full setup pattern and test double configuration: `abapgit-agent ref --topic cds-testing`
335
360
 
336
361
  ---
337
362
 
@@ -369,10 +394,7 @@ DATA(lo_cut) = NEW zcl_my_class( io_agent = lo_agent ).
369
394
  DATA(ls_actual) = lo_cut->execute( ).
370
395
  ```
371
396
 
372
- Full API reference (EXPORT params, exceptions, inherited methods, common mistakes):
373
- `abapgit-agent ref --topic unit-testable-code`
374
-
375
- → For class design rules (constructor injection, interfaces for dependencies):
397
+ For full API reference (EXPORT params, exceptions, inherited methods, common mistakes) and class design rules (constructor injection, interfaces for dependencies):
376
398
  `abapgit-agent ref --topic unit-testable-code`
377
399
 
378
400
  #### Running tests — use `unit` command
@@ -435,7 +457,7 @@ Never assume — wait for the user's answer before proceeding.
435
457
  | HTTP 500 / runtime crash (ST22) | `dump` | Error already occurred |
436
458
  | Wrong output, no crash | `debug` | Need to trace logic |
437
459
 
438
- See `guidelines/debug-dump.md` — run: `abapgit-agent ref --topic debug-dump`
460
+ → `abapgit-agent ref --topic debug-dump`
439
461
 
440
462
  **Critical rules for `debug` sessions:**
441
463
 
@@ -496,7 +518,7 @@ abapgit-agent debug vars --json
496
518
  abapgit-agent debug step --type continue --json # 4. release
497
519
  ```
498
520
 
499
- See `guidelines/debug-session.md` — run: `abapgit-agent ref --topic debug-session`
521
+ → `abapgit-agent ref --topic debug-session`
500
522
 
501
523
  ---
502
524
 
@@ -546,7 +568,7 @@ Projects can add their own abaplint notes to `guidelines/abaplint-local.md` in t
546
568
  project repository. After running `abapgit-agent ref export`, the `ref` command
547
569
  surfaces both bundled and project-specific guidance together.
548
570
 
549
- See `guidelines/abaplint.md` — run: `abapgit-agent ref --topic abaplint`
571
+ → `abapgit-agent ref --topic abaplint`
550
572
 
551
573
  ---
552
574
 
@@ -600,7 +622,7 @@ git push origin feature/my-change --force-with-lease
600
622
  abapgit-agent pull --files src/<name>.clas.abap --sync-xml
601
623
  ```
602
624
 
603
- See `guidelines/branch-workflow.md` — run: `abapgit-agent ref --topic branch-workflow`
625
+ → `abapgit-agent ref --topic branch-workflow`
604
626
 
605
627
  ### Trunk Workflow (`"mode": "trunk"`)
606
628
 
@@ -708,6 +730,9 @@ Modified ABAP files?
708
730
  └─ Other types (FUGR, TABL, STRU, DTEL, TTYP, etc.)?
709
731
  ├─ XML-only objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG)?
710
732
  │ └─ ✅ Use: skip syntax → [abaplint] → commit → push → pull --files abap/ztable.tabl.xml --sync-xml
733
+ ├─ DCLS (CDS access control)?
734
+ │ └─ ✅ Use: skip syntax → [abaplint] → commit → push → pull --files abap/zc_view.dcls.xml --sync-xml
735
+ │ ⚠️ Pass the .xml file — pull --files does NOT accept .asdcls extensions
711
736
  └─ FUGR and other complex objects?
712
737
  └─ ✅ Use: skip syntax → [abaplint] → commit → push → pull --sync-xml → (if errors: inspect)
713
738
 
@@ -716,47 +741,39 @@ Modified ABAP files?
716
741
  ```
717
742
 
718
743
  → For creating new objects (what files to write): `abapgit-agent ref --topic object-creation`
719
- See `guidelines/workflow-detailed.md` run: `abapgit-agent ref --topic workflow-detailed`
744
+ For full workflow decision tree and error indicators: `abapgit-agent ref --topic workflow-detailed`
720
745
 
721
746
  ---
722
747
 
723
748
  ## Guidelines Index
724
749
 
725
- > **Note:** If the `guidelines/` folder doesn't exist in your repo, the `ref` command
726
- > automatically uses bundled guidelines from the package. Access them with:
727
- > ```bash
728
- > abapgit-agent ref --topic <topic> # e.g. ref --topic sql
729
- > abapgit-agent ref "<pattern>" # e.g. ref "SELECT"
730
- > ```
731
-
732
- Detailed guidelines are available in the `guidelines/` folder:
733
-
734
- | File | Topic |
735
- |------|-------|
736
- | `guidelines/index.md` | Overview and usage |
737
- | `guidelines/sql.md` | ABAP SQL Best Practices |
738
- | `guidelines/exceptions.md` | Exception Handling |
739
- | `guidelines/testing.md` | Unit Testing (including CDS) |
740
- | `guidelines/cds.md` | CDS Views |
741
- | `guidelines/classes.md` | ABAP Classes and Objects |
742
- | `guidelines/objects.md` | Object Naming Conventions (defaults) |
743
- | `guidelines/objects.local.md` | **Project** Naming Conventions — overrides `objects.md` (created by `init`, never overwritten) |
744
- | `guidelines/json.md` | JSON Handling |
745
- | `guidelines/abapgit.md` | abapGit XML Metadata Templates — CLAS, INTF, PROG, DDLS, DCLS, FUGR |
746
- | `guidelines/abapgit-xml-only.md` | abapGit XML Metadata Templates — XML-only objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG) |
747
- | `guidelines/unit-testable-code.md` | Unit Testable Code Guidelines (Dependency Injection) |
748
- | `guidelines/common-errors.md` | Common ABAP Errors - Quick Fixes |
749
- | `guidelines/debug-session.md` | Debug Session Guide |
750
- | `guidelines/debug-dump.md` | Dump Analysis Guide |
751
- | `guidelines/run-probe-classes.md` | run Command AI Guidelines (probe classes, scratchWorkspace) |
752
- | `guidelines/probe-poc.md` | Probe and PoC — Full Decision Flow |
753
- | `guidelines/branch-workflow.md` | Branch Workflow |
754
- | `guidelines/workflow-detailed.md` | Development Workflow (Detailed) |
755
- | `guidelines/object-creation.md` | Object Creation (XML metadata, local classes) |
756
- | `guidelines/cds-testing.md` | CDS Testing (Test Double Framework) |
757
- | `guidelines/abaplint.md` | abaplint Rule Guidelines (prefer_inline trap, safe patterns) |
758
-
759
- These guidelines are automatically searched by the `ref` command.
750
+ | Command | Topic |
751
+ |---------|-------|
752
+ | `ref --topic sql` | ABAP SQL Best Practices |
753
+ | `ref --topic exceptions` | Exception Handling |
754
+ | `ref --topic classes` | ABAP Classes and Objects |
755
+ | `ref --topic objects` | Object Naming Conventions (defaults) |
756
+ | `ref --topic naming-limits` | Naming Length Limits — 30/16/40 char rules per type (CRITICAL before naming anything) |
757
+ | `ref --topic comments` | Documentation Comments (ABAP DOC, shorttext, @parameter, CDS `//`, program `*&---`) |
758
+ | `ref --topic testing` | Unit Testing |
759
+ | `ref --topic unit-testable-code` | Unit Testable Code (Dependency Injection) |
760
+ | `ref --topic cds` | CDS Views |
761
+ | `ref --topic cds-testing` | CDS Testing (Test Double Framework) |
762
+ | `ref --topic json` | JSON Handling |
763
+ | `ref --topic common-errors` | Common ABAP Errors - Quick Fixes |
764
+ | `ref --topic abapgit` | abapGit XML Metadata — **use for CDS/DDLS XML**, also CLAS, INTF, PROG, DCLS, FUGR |
765
+ | `ref --topic abapgit-xml-only` | abapGit XML Metadata — XML-only objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG) |
766
+ | `ref --topic abapgit-fugr` | abapGit XML Metadata Function Group (FUGR) details |
767
+ | `ref --topic abaplint` | abaplint Rule Guidelines (prefer_inline trap, safe patterns) |
768
+ | `ref --topic debug-session` | Debug Session Guide |
769
+ | `ref --topic debug-dump` | Dump Analysis Guide |
770
+ | `ref --topic branch-workflow` | Branch Workflow |
771
+ | `ref --topic workflow-detailed` | Development Workflow (Detailed) |
772
+ | `ref --topic object-creation` | Object Creation (XML metadata, local classes) |
773
+ | `ref --topic run-probe-classes` | run Command AI Guidelines (probe classes, scratchWorkspace) |
774
+ | `ref --topic probe-poc` | Probe and PoC — Full Decision Flow |
775
+
776
+ > `objects.local.md` **Project** Naming Conventions (created by `init`, never overwritten). Read directly from `guidelines/objects.local.md` — no ref topic.
760
777
 
761
778
  ---
762
779
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: abapGit XML Metadata — Function Group (FUGR)
4
- nav_order: 11
4
+ nav_order: 15
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---
@@ -22,10 +22,13 @@ A FUGR with group name `ZMY_FUGR` and one FM `ZMY_MY_FUNCTION` requires these fi
22
22
  | `zmy_fugr.fugr.xml` | Main XML: group description, includes list, FM interfaces |
23
23
  | `zmy_fugr.fugr.lzmy_fugrtop.abap` | TOP include source |
24
24
  | `zmy_fugr.fugr.lzmy_fugrtop.xml` | TOP include metadata (`SUBC=I`) |
25
- | `zmy_fugr.fugr.saplzmy_fugr.abap` | Main include source |
25
+ | `zmy_fugr.fugr.saplzmy_fugr.abap` | Main include source (lists all U-includes) |
26
26
  | `zmy_fugr.fugr.saplzmy_fugr.xml` | Main include metadata (`SUBC=F`) |
27
+ | `zmy_fugr.fugr.lzmy_fugru01.abap` | FM implementation include (one per FM: U01, U02, …) |
27
28
  | `zmy_fugr.fugr.zmy_my_function.abap` | FM source (one file per FM, named after FM in lowercase) |
28
29
 
30
+ > **7 files total for one FM** (6 without the U01 include causes a pull error — the SAPL source references `LZMY_FUGRU01` which abapGit can't find). For a second FM, add `lzmy_fugru02.abap` and `zmy_second_function.abap`.
31
+
29
32
  ---
30
33
 
31
34
  ### `zmy_fugr.fugr.xml`
@@ -145,15 +148,28 @@ FUNCTION zmy_my_function.
145
148
  ENDFUNCTION.
146
149
  ```
147
150
 
151
+ ### `zmy_fugr.fugr.lzmy_fugru01.abap`
152
+
153
+ The FM implementation include — **always required**. The SAPL source references `INCLUDE LZMY_FUGRU01.` so this file must exist or the pull fails.
154
+
155
+ ```abap
156
+ *----------------------------------------------------------------------*
157
+ ***INCLUDE LZMY_FUGRU01.
158
+ *----------------------------------------------------------------------*
159
+ ```
160
+
161
+ For a second FM, create `zmy_fugr.fugr.lzmy_fugru02.abap` with the same pattern (replacing `U01` with `U02`).
162
+
148
163
  ---
149
164
 
150
165
  ## Key Rules
151
166
 
152
- - **Include naming**: TOP = `L<GROUP>TOP`, main = `SAPL<GROUP>` — uppercase in XML and filenames
167
+ - **Include naming**: TOP = `L<GROUP>TOP`, main = `SAPL<GROUP>`, FM implementation = `L<GROUP>U01` (U02, U03, …) — uppercase in XML and filenames
153
168
  - **FM source file**: named after the FM in **lowercase** (`zmy_my_function.abap`, not `ZMY_MY_FUNCTION.abap`)
169
+ - **U-include file required**: `lzmy_fugru01.abap` must exist — the SAPL source references it; missing it causes a pull error
154
170
  - **`INCLUDES` list** in the main XML: only lists TOP and SAPL includes — FM source includes are implicit
155
171
  - **`REMOTE_CALL>R`**: add only for RFC-enabled FMs; omit for local FMs
156
172
  - **Optional parameters**: include both `<OPTIONAL>X</OPTIONAL>` and `<DEFAULT>...</DEFAULT>`
157
- - **`DOCUMENTATION` section**: omit entirely if no parameter descriptions neededmissing docs cause no diff
173
+ - **`DOCUMENTATION` section**: the serializer always writes `<DOCUMENTATION>` with one `<RSFDO>` entry per parameter (containing only `<PARAMETER>` and `<KIND>P</KIND>`, no `<STEXT>`). Always include it omitting it causes a permanent "M" diff
158
174
  - **Screens/CUA**: omit `DYNPROS`/`CUA` sections for screenless function groups
159
175
  - **Multiple FMs**: add one `<item>` per FM in `FUNCTIONS`; add one `INCLUDE` line per FM in the SAPL source
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: abapGit XML Metadata — XML-Only Objects
4
- nav_order: 10
4
+ nav_order: 14
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---
@@ -170,6 +170,12 @@ A **text table** stores translatable texts for another table (the "main table").
170
170
 
171
171
  > Pull with: `pull --files src/zmy_dtel.dtel.xml`
172
172
 
173
+ **Two variants — choose based on whether the DTEL defines its own type or references a domain:**
174
+
175
+ #### Variant 1: Built-in type (no domain)
176
+
177
+ Use when the data element directly defines `DATATYPE` and `LENG` without referencing a domain.
178
+
173
179
  ```xml
174
180
  <?xml version="1.0" encoding="utf-8"?>
175
181
  <abapGit version="v1.0.0" serializer="LCL_OBJECT_DTEL" serializer_version="v1.0.0">
@@ -192,13 +198,38 @@ A **text table** stores translatable texts for another table (the "main table").
192
198
  </abapGit>
193
199
  ```
194
200
 
201
+ #### Variant 2: Domain reference
202
+
203
+ Use when the data element's type and length come from an existing domain (`DOMNAME`). Do **not** include `DATATYPE` or `LENG` — the domain owns those.
204
+
205
+ ```xml
206
+ <?xml version="1.0" encoding="utf-8"?>
207
+ <abapGit version="v1.0.0" serializer="LCL_OBJECT_DTEL" serializer_version="v1.0.0">
208
+ <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
209
+ <asx:values>
210
+ <DD04V>
211
+ <ROLLNAME>ZMY_DTEL</ROLLNAME>
212
+ <DDLANGUAGE>E</DDLANGUAGE>
213
+ <DDTEXT>Description of data element</DDTEXT>
214
+ <REPTEXT>Description</REPTEXT>
215
+ <SCRTEXT_S>Short text</SCRTEXT_S>
216
+ <SCRTEXT_M>Medium text</SCRTEXT_M>
217
+ <SCRTEXT_L>Long description text</SCRTEXT_L>
218
+ <DTELMASTER>E</DTELMASTER>
219
+ <DOMNAME>ZMY_DOMAIN</DOMNAME>
220
+ </DD04V>
221
+ </asx:values>
222
+ </asx:abap>
223
+ </abapGit>
224
+ ```
225
+
195
226
  **Key Fields**:
196
227
  - `ROLLNAME`: Data element name
197
228
  - `DDTEXT`: Description (**not** `DESCRIPT`)
198
229
  - `REPTEXT` / `SCRTEXT_S` / `SCRTEXT_M` / `SCRTEXT_L`: Field labels (report heading, short, medium, long)
199
230
  - `DTELMASTER`: Language key for label master (`E` for English)
200
- - `DATATYPE`: Data type (`CHAR`, `NUMC`, `DATS`, `TIMS`, `INT4`, etc.)
201
- - `LENG`: Length padded to 6 digits (e.g. `000010` for 10 characters)
231
+ - `DATATYPE` + `LENG`: Use for built-in type variant only (e.g. `CHAR` + `000010`)
232
+ - `DOMNAME`: Use for domain-reference variant only omit `DATATYPE` and `LENG` entirely
202
233
 
203
234
  **Omit `<PARAMID>`** unless you specifically need a SET/GET parameter ID — the serializer omits it when empty.
204
235
 
@@ -206,10 +237,14 @@ A **text table** stores translatable texts for another table (the "main table").
206
237
 
207
238
  ### Structure (STRU)
208
239
 
209
- **Filename**: `src/zmy_struct.stru.xml`
240
+ **Filename**: `src/zmy_struct.tabl.xml`
210
241
 
211
- > abapGit uses the same TABL serializer for STRU.
212
- > Pull with: `pull --files src/zmy_struct.stru.xml`
242
+ > ⚠️ **Use `.tabl.xml` extension, NOT `.stru.xml`** abapGit serializes structures with the TABL
243
+ > serializer and registers them as object type `TABL`. A `.stru.xml` filename causes
244
+ > "Step DDIC is only for DDIC objects" because abapGit treats it as object type `STRU`,
245
+ > which is not in its DDIC activation list.
246
+ >
247
+ > Pull with: `pull --files src/zmy_struct.tabl.xml`
213
248
 
214
249
  ```xml
215
250
  <?xml version="1.0" encoding="utf-8"?>
@@ -221,16 +256,37 @@ A **text table** stores translatable texts for another table (the "main table").
221
256
  <DDLANGUAGE>E</DDLANGUAGE>
222
257
  <TABCLASS>INTTAB</TABCLASS>
223
258
  <DDTEXT>Description of the structure</DDTEXT>
224
- <CONTFLAG>A</CONTFLAG>
259
+ <EXCLASS>1</EXCLASS>
225
260
  </DD02V>
261
+ <DD03P_TABLE>
262
+ <DD03P>
263
+ <FIELDNAME>FIELD1</FIELDNAME>
264
+ <ROLLNAME>S_CARR_ID</ROLLNAME>
265
+ <ADMINFIELD>0</ADMINFIELD>
266
+ <SHLPORIGIN>D</SHLPORIGIN>
267
+ <COMPTYPE>E</COMPTYPE>
268
+ </DD03P>
269
+ <DD03P>
270
+ <FIELDNAME>FIELD2</FIELDNAME>
271
+ <ROLLNAME>S_CARRNAME</ROLLNAME>
272
+ <ADMINFIELD>0</ADMINFIELD>
273
+ <COMPTYPE>E</COMPTYPE>
274
+ </DD03P>
275
+ </DD03P_TABLE>
226
276
  </asx:values>
227
277
  </asx:abap>
228
278
  </abapGit>
229
279
  ```
230
280
 
231
- **Key difference from TABL**: `TABCLASS` is `INTTAB` (internal table / structure) instead of `TRANSP`.
281
+ **Key differences from TABL**:
282
+ - `TABCLASS` is `INTTAB` instead of `TRANSP`
283
+ - No `<CONTFLAG>` — omit it (not written by serializer for structures)
284
+ - `<EXCLASS>1</EXCLASS>` — include it
285
+ - Include `<DD03P_TABLE>` with field definitions from the start (unlike TABL where it is optional on creation)
232
286
 
233
- **Note**: Like TABL, after the first pull abapGit expands the XML with `<DD03P_TABLE>` field definitions.
287
+ **`DD03P` field rules** (same as TABL):
288
+ - Fields with `ROLLNAME` (data element): include `ROLLNAME`, `ADMINFIELD>0`, `SHLPORIGIN` (when domain provides value help — `D` for domain fixed values), `COMPTYPE>E`
289
+ - Fields with raw type (no data element): include `ADMINFIELD>0`, `INTTYPE`, `INTLEN`, `DATATYPE`, `MASK` (before any text fields)
234
290
 
235
291
  ---
236
292
 
@@ -248,13 +304,13 @@ A **text table** stores translatable texts for another table (the "main table").
248
304
  <DD40V>
249
305
  <TYPENAME>ZMY_TTYP</TYPENAME>
250
306
  <DDLANGUAGE>E</DDLANGUAGE>
251
- <DDTEXT>Description of table type</DDTEXT>
252
307
  <ROWTYPE>ZMY_STRUCT</ROWTYPE>
253
308
  <ROWKIND>S</ROWKIND>
254
- <DATATYPE>TABLE_T</DATATYPE>
309
+ <DATATYPE>STRU</DATATYPE>
255
310
  <ACCESSMODE>T</ACCESSMODE>
256
311
  <KEYDEF>D</KEYDEF>
257
312
  <KEYKIND>N</KEYKIND>
313
+ <DDTEXT>Description of table type</DDTEXT>
258
314
  </DD40V>
259
315
  </asx:values>
260
316
  </asx:abap>
@@ -265,7 +321,7 @@ A **text table** stores translatable texts for another table (the "main table").
265
321
  - `TYPENAME`: Table type name
266
322
  - `ROWTYPE`: Row type (a structure or data element name)
267
323
  - `ROWKIND`: Row kind — `S`=Structure/Type, `D`=Data element, `R`=Reference
268
- - `DATATYPE`: Always `TABLE_T` for table types
324
+ - `DATATYPE`: `STRU` when row type is a structure (`ROWKIND=S`); `TABLE_T` only for elementary-type row types
269
325
  - `ACCESSMODE`: Table kind — `T`=Standard, `S`=Sorted, `H`=Hashed
270
326
  - `KEYDEF`: Key definition — `D`=Default (standard key), `K`=User-defined
271
327
  - `KEYKIND`: Key uniqueness — `N`=Non-unique, `U`=Unique
@@ -372,7 +428,7 @@ abapGit uses the view `DD01V` as the root element (not `DD01L`). The serializer
372
428
  <SPRSL>E</SPRSL>
373
429
  <ARBGB>ZMY_MSGS</ARBGB>
374
430
  <MSGNR>000</MSGNR>
375
- <TEXT>Object &1 not found</TEXT>
431
+ <TEXT>Object &amp;1 not found</TEXT>
376
432
  </T100>
377
433
  <T100>
378
434
  <SPRSL>E</SPRSL>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: abapGit XML Metadata
4
- nav_order: 9
4
+ nav_order: 13
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---
@@ -265,7 +265,7 @@ abapGit's serializer **omits fields that have their default value**. Writing ext
265
265
  - `SOURCE_TYPE W` → View Entity (`define view entity`, modern — **use by default**)
266
266
  - `SOURCE_TYPE V` → View (`define view` + `@AbapCatalog.sqlViewName`, legacy)
267
267
 
268
- → For DDL source syntax: `abapgit-agent ref --topic cds-abapgit`
268
+ → For DDL source syntax: `abapgit-agent ref --topic cds`
269
269
 
270
270
  ---
271
271
 
@@ -290,6 +290,7 @@ abapGit's serializer **omits fields that have their default value**. Writing ext
290
290
 
291
291
  - `DCLNAME` matches the CDS view name
292
292
  - Source file contains the DCL (`@MappingRole ... define role ...`)
293
+ - **Pull with the `.xml` file, not `.asdcls`**: `pull --files src/zc_my_view.dcls.xml` — the `pull --files` filter does not accept `.asdcls` extensions
293
294
 
294
295
  ---
295
296
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: abaplint Local Rules
4
- nav_order: 21
4
+ nav_order: 17
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: abaplint Rule Guidelines
4
- nav_order: 20
4
+ nav_order: 16
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  layout: default
3
3
  title: Branch Workflow
4
- nav_order: 17
4
+ nav_order: 20
5
5
  parent: ABAP Coding Guidelines
6
6
  grand_parent: ABAP Development
7
7
  ---