abapgit-agent 1.19.1 → 1.19.2
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.
|
@@ -6,9 +6,9 @@ parent: ABAP Coding Guidelines
|
|
|
6
6
|
grand_parent: ABAP Development
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# abapGit XML Metadata — XML-Only Objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG, SUSO)
|
|
9
|
+
# abapGit XML Metadata — XML-Only Objects (TABL, STRU, DTEL, TTYP, DOMA, MSAG, SUSO, PINF)
|
|
10
10
|
|
|
11
|
-
XML templates for ABAP Dictionary objects that have no `.abap` source file — TABL, STRU, DTEL, TTYP, DOMA, message classes (MSAG),
|
|
11
|
+
XML templates for ABAP Dictionary objects that have no `.abap` source file — TABL, STRU, DTEL, TTYP, DOMA, message classes (MSAG), authorization objects (SUSO), and package interfaces (PINF).
|
|
12
12
|
|
|
13
13
|
> **CRITICAL: Always write XML files with a UTF-8 BOM (`\ufeff`) as the very first character**, before `<?xml ...`.
|
|
14
14
|
> Without the BOM, abapGit shows the object as **"M" (modified)** after every pull.
|
|
@@ -19,7 +19,7 @@ XML templates for ABAP Dictionary objects that have no `.abap` source file — T
|
|
|
19
19
|
> **For CLAS, INTF, PROG, DDLS, DCLS, FUGR** (have source files): see `abapgit-agent ref --topic abapgit`
|
|
20
20
|
> **For DDLS, DCLS** (CDS — have source files): also see `abapgit-agent ref --topic abapgit`
|
|
21
21
|
|
|
22
|
-
**Searchable keywords**: table xml, structure xml, data element xml, table type xml, domain xml, message class xml, tabl, stru, dtel, ttyp, doma, msag, suso, authorization object, dictionary
|
|
22
|
+
**Searchable keywords**: table xml, structure xml, data element xml, table type xml, domain xml, message class xml, tabl, stru, dtel, ttyp, doma, msag, suso, authorization object, dictionary, pinf, package interface
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -511,3 +511,52 @@ abapGit uses the view `DD01V` as the root element (not `DD01L`). The serializer
|
|
|
511
511
|
**Note**: Authorization objects (SUSO) are the SU21 objects that group authorization fields (AUTH/SU20)
|
|
512
512
|
together. An object like `AUD_SCOPEM` uses fields `ACTVT`, `BO_SERVICE`, and `AUD_GROUP`.
|
|
513
513
|
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
### Package Interface (PINF)
|
|
517
|
+
|
|
518
|
+
**Filename**: `src/zmy_pinf.pinf.xml`
|
|
519
|
+
|
|
520
|
+
> Pull with: `pull --files src/zmy_pinf.pinf.xml`
|
|
521
|
+
>
|
|
522
|
+
> View with: `view --objects ZMY_PINF --type PINF`
|
|
523
|
+
|
|
524
|
+
A package interface declares which objects a package makes visible to other packages — it is the "API" of an ABAP package. Packages that use these objects must depend on the package that owns the interface.
|
|
525
|
+
|
|
526
|
+
```xml
|
|
527
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
528
|
+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_PINF" serializer_version="v1.0.0">
|
|
529
|
+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
|
530
|
+
<asx:values>
|
|
531
|
+
<PINF>
|
|
532
|
+
<ATTRIBUTES>
|
|
533
|
+
<INTF_NAME>ZMY_PINF</INTF_NAME>
|
|
534
|
+
<DESCRIPT>Package interface for ZMY</DESCRIPT>
|
|
535
|
+
</ATTRIBUTES>
|
|
536
|
+
<ELEMENTS>
|
|
537
|
+
<SCOMELDTLN>
|
|
538
|
+
<INTF_NAME>ZMY_PINF</INTF_NAME>
|
|
539
|
+
<ELEM_TYPE>CLAS</ELEM_TYPE>
|
|
540
|
+
<ELEM_KEY>ZCL_MY_CLASS</ELEM_KEY>
|
|
541
|
+
</SCOMELDTLN>
|
|
542
|
+
<SCOMELDTLN>
|
|
543
|
+
<INTF_NAME>ZMY_PINF</INTF_NAME>
|
|
544
|
+
<ELEM_TYPE>INTF</ELEM_TYPE>
|
|
545
|
+
<ELEM_KEY>ZIF_MY_INTERFACE</ELEM_KEY>
|
|
546
|
+
</SCOMELDTLN>
|
|
547
|
+
</ELEMENTS>
|
|
548
|
+
</PINF>
|
|
549
|
+
</asx:values>
|
|
550
|
+
</asx:abap>
|
|
551
|
+
</abapGit>
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
**Key Fields**:
|
|
555
|
+
- `ATTRIBUTES/INTF_NAME`: Package interface name (max 30 chars, stored in `SCOMPARAMET.INTF_NAME`)
|
|
556
|
+
- `ATTRIBUTES/DESCRIPT`: Description text
|
|
557
|
+
- `ELEMENTS/SCOMELDTLN`: One entry per exported object; each has:
|
|
558
|
+
- `INTF_NAME`: Same as the interface name (repeated on every row)
|
|
559
|
+
- `ELEM_TYPE`: Object type — `CLAS`, `INTF`, `DTEL`, `TABL`, `STRU`, `TTYP`, `DOMA`, `SUSO`, `ENQU`, `STOB`, `VIEW`
|
|
560
|
+
- `ELEM_KEY`: Object name
|
|
561
|
+
|
|
562
|
+
**Note**: No UTF-8 BOM — unlike TABL/DTEL/MSAG, the PINF serializer (`LCL_OBJECT_PINF`) does not write a BOM. Do not add `\ufeff` before `<?xml ...>`.
|
|
@@ -42,6 +42,8 @@ grand_parent: ABAP Development
|
|
|
42
42
|
| Local variable name | **30** |
|
|
43
43
|
| Local type/class name | **30** |
|
|
44
44
|
| Test class name (local) | **30** |
|
|
45
|
+
| Package Interface name (PINF) | **30** |
|
|
46
|
+
| **Authorization Object name (SUSO)** | **10** |
|
|
45
47
|
|
|
46
48
|
---
|
|
47
49
|
|
|
@@ -150,6 +152,8 @@ These limits come from the ABAP Dictionary (DDIC) and ABAP kernel:
|
|
|
150
152
|
| 40 chars (CDS names) | CDS objects stored in `DD02L.TABNAME CHAR(40)` — intentionally larger for CDS |
|
|
151
153
|
| 20 chars (MSAG) | Message class name stored in `T100A.ARBGB CHAR(20)` |
|
|
152
154
|
| 26 chars (FUGR) | Function group internally prefixed with `SAPL` (4 chars) for the main include |
|
|
155
|
+
| **10 chars (SUSO)** | Authorization object name stored in `TOBJ.OBJCT CHAR(10)` — notably shorter than other types |
|
|
156
|
+
| 30 chars (PINF) | Package interface name stored in `SCOMPARAMET.INTF_NAME CHAR(30)` |
|
|
153
157
|
|
|
154
158
|
---
|
|
155
159
|
|
package/package.json
CHANGED
package/src/commands/drop.js
CHANGED
|
@@ -8,7 +8,8 @@ const { printHttpError } = require('../utils/format-error');
|
|
|
8
8
|
const EXT_TO_TYPE = {
|
|
9
9
|
clas: 'CLAS', intf: 'INTF', prog: 'PROG', fugr: 'FUGR',
|
|
10
10
|
tabl: 'TABL', dtel: 'DTEL', ttyp: 'TTYP', doma: 'DOMA',
|
|
11
|
-
ddls: 'DDLS', dcls: 'DCLS', msag: 'MSAG', stru: 'STRU', enho: 'ENHO'
|
|
11
|
+
ddls: 'DDLS', dcls: 'DCLS', msag: 'MSAG', stru: 'STRU', enho: 'ENHO',
|
|
12
|
+
suso: 'SUSO'
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
/**
|
package/src/commands/inspect.js
CHANGED
|
@@ -429,6 +429,20 @@ Examples:
|
|
|
429
429
|
|
|
430
430
|
let filesSyntaxCheck = [...new Set(args[filesArgIndex + 1].split(',').map(f => f.trim()))];
|
|
431
431
|
|
|
432
|
+
// Skip XML-only object types that have no ABAP source to inspect
|
|
433
|
+
const XML_ONLY_EXTENSIONS = [
|
|
434
|
+
'.pinf.xml', '.suso.xml', '.msag.xml', '.doma.xml',
|
|
435
|
+
'.dtel.xml', '.ttyp.xml', '.tabl.xml',
|
|
436
|
+
];
|
|
437
|
+
const beforeXmlOnly = filesSyntaxCheck.length;
|
|
438
|
+
filesSyntaxCheck = filesSyntaxCheck.filter(f => {
|
|
439
|
+
const lower = pathModule.basename(f).toLowerCase();
|
|
440
|
+
return !XML_ONLY_EXTENSIONS.some(ext => lower.endsWith(ext));
|
|
441
|
+
});
|
|
442
|
+
if (beforeXmlOnly > filesSyntaxCheck.length && !args.includes('--json')) {
|
|
443
|
+
console.log(` Skipped ${beforeXmlOnly - filesSyntaxCheck.length} XML-only file(s) (no source to inspect)`);
|
|
444
|
+
}
|
|
445
|
+
|
|
432
446
|
// Parse optional --variant parameter; fall back to project config
|
|
433
447
|
const variantArgIndex = args.indexOf('--variant');
|
|
434
448
|
const variantArg = variantArgIndex !== -1 ? args[variantArgIndex + 1] : null;
|
package/src/commands/view.js
CHANGED
|
@@ -593,6 +593,50 @@ Examples:
|
|
|
593
593
|
console.log(` ${desc}`);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
+
} else if (objType === 'PINF' || objType === 'Package Interface') {
|
|
597
|
+
// PINF: description box, then members grouped by type
|
|
598
|
+
const description = obj.DESCRIPTION || obj.description || '';
|
|
599
|
+
const devclass = obj.DEVCLASS || obj.devclass || '';
|
|
600
|
+
const boxWidth = 50;
|
|
601
|
+
const boxTop = ' ┌' + '─'.repeat(boxWidth) + '┐';
|
|
602
|
+
const boxBot = ' └' + '─'.repeat(boxWidth) + '┘';
|
|
603
|
+
const boxRow = (text) => ' │ ' + String(text || '').substring(0, boxWidth - 2).padEnd(boxWidth - 2) + ' │';
|
|
604
|
+
|
|
605
|
+
console.log(` PACKAGE INTERFACE ${objName}:`);
|
|
606
|
+
console.log(boxTop);
|
|
607
|
+
if (description) console.log(boxRow(description));
|
|
608
|
+
if (devclass) console.log(boxRow(`Package: ${devclass}`));
|
|
609
|
+
console.log(boxBot);
|
|
610
|
+
|
|
611
|
+
// Parse components: DESCRIPTION = "ELEM_TYPE: ELEM_KEY"
|
|
612
|
+
const members = components.map(c => {
|
|
613
|
+
const desc = String(c.DESCRIPTION || c.description || '');
|
|
614
|
+
const colonIdx = desc.indexOf(': ');
|
|
615
|
+
return colonIdx !== -1
|
|
616
|
+
? { type: desc.substring(0, colonIdx), key: desc.substring(colonIdx + 2) }
|
|
617
|
+
: { type: '?', key: desc };
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
if (members.length > 0) {
|
|
621
|
+
// Group by type, preserving order of first occurrence
|
|
622
|
+
const groups = [];
|
|
623
|
+
const seen = new Map();
|
|
624
|
+
for (const m of members) {
|
|
625
|
+
if (!seen.has(m.type)) { seen.set(m.type, []); groups.push(m.type); }
|
|
626
|
+
seen.get(m.type).push(m.key);
|
|
627
|
+
}
|
|
628
|
+
console.log('');
|
|
629
|
+
console.log(` Members (${members.length}):`);
|
|
630
|
+
for (const type of groups) {
|
|
631
|
+
for (const key of seen.get(type)) {
|
|
632
|
+
console.log(` ${type.padEnd(6)} ${key}`);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
} else {
|
|
636
|
+
console.log('');
|
|
637
|
+
console.log(' (no members)');
|
|
638
|
+
}
|
|
639
|
+
|
|
596
640
|
} else if (objType === 'SUSO' || objType === 'Authorization Object') {
|
|
597
641
|
// SUSO: property box for object class + fields, then activities list
|
|
598
642
|
const classComp = components.filter(c => String(c.FIELD || c.field || '').startsWith('OCLSS'));
|