@mcp-abap-adt/core 6.5.1 → 6.8.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/CHANGELOG.md +38 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClass.d.ts +111 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClass.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClass.js +141 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClass.js.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts +22 -1
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.d.ts.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js +32 -1
- package/dist/handlers/system/readonly/handleRuntimeRunClassWithProfiling.js.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeRunProgram.d.ts +90 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgram.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgram.js +109 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgram.js.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.d.ts +1 -1
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js +1 -1
- package/dist/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.js.map +1 -1
- package/dist/handlers/system/readonly/handleSearchSource.d.ts +40 -0
- package/dist/handlers/system/readonly/handleSearchSource.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleSearchSource.js +127 -0
- package/dist/handlers/system/readonly/handleSearchSource.js.map +1 -0
- package/dist/lib/handlers/groups/SearchHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/SearchHandlersGroup.js +5 -0
- package/dist/lib/handlers/groups/SearchHandlersGroup.js.map +1 -1
- package/dist/lib/handlers/groups/SystemHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/SystemHandlersGroup.js +10 -0
- package/dist/lib/handlers/groups/SystemHandlersGroup.js.map +1 -1
- package/dist/lib/search-source/lineScanner.d.ts +17 -0
- package/dist/lib/search-source/lineScanner.d.ts.map +1 -0
- package/dist/lib/search-source/lineScanner.js +51 -0
- package/dist/lib/search-source/lineScanner.js.map +1 -0
- package/dist/lib/search-source/orchestrator.d.ts +52 -0
- package/dist/lib/search-source/orchestrator.d.ts.map +1 -0
- package/dist/lib/search-source/orchestrator.js +165 -0
- package/dist/lib/search-source/orchestrator.js.map +1 -0
- package/dist/lib/search-source/packageEnumerator.d.ts +25 -0
- package/dist/lib/search-source/packageEnumerator.d.ts.map +1 -0
- package/dist/lib/search-source/packageEnumerator.js +0 -0
- package/dist/lib/search-source/packageEnumerator.js.map +1 -0
- package/dist/lib/search-source/packageResolver.d.ts +13 -0
- package/dist/lib/search-source/packageResolver.d.ts.map +1 -0
- package/dist/lib/search-source/packageResolver.js +63 -0
- package/dist/lib/search-source/packageResolver.js.map +1 -0
- package/dist/lib/search-source/sourceReader.d.ts +25 -0
- package/dist/lib/search-source/sourceReader.d.ts.map +1 -0
- package/dist/lib/search-source/sourceReader.js +128 -0
- package/dist/lib/search-source/sourceReader.js.map +1 -0
- package/docs/user-guide/AVAILABLE_TOOLS.md +77 -5
- package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +21 -3
- package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +76 -4
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HandlerContext } from '../handlers/interfaces';
|
|
2
|
+
export type ScanObjectType = 'PROG' | 'FUGR' | 'CLAS';
|
|
3
|
+
export interface PackageContentItem {
|
|
4
|
+
name: string;
|
|
5
|
+
adtType: string;
|
|
6
|
+
packageName: string;
|
|
7
|
+
isPackage: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface EnumeratedObject {
|
|
10
|
+
devclass: string;
|
|
11
|
+
object_type: ScanObjectType;
|
|
12
|
+
object_name: string;
|
|
13
|
+
}
|
|
14
|
+
export interface EnumerateInput {
|
|
15
|
+
packages: string[];
|
|
16
|
+
include_subpackages: boolean;
|
|
17
|
+
object_filter?: string;
|
|
18
|
+
object_types: readonly ScanObjectType[];
|
|
19
|
+
}
|
|
20
|
+
export type PackageContentsFetcher = (packageName: string, options: {
|
|
21
|
+
includeSubpackages: boolean;
|
|
22
|
+
}) => Promise<PackageContentItem[]>;
|
|
23
|
+
export declare function enumerateScanTargets(fetch: PackageContentsFetcher, input: EnumerateInput): Promise<EnumeratedObject[]>;
|
|
24
|
+
export declare function createPackageContentsFetcher(ctx: HandlerContext): PackageContentsFetcher;
|
|
25
|
+
//# sourceMappingURL=packageEnumerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageEnumerator.d.ts","sourceRoot":"","sources":["../../../src/lib/search-source/packageEnumerator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,cAAc,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,SAAS,cAAc,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,sBAAsB,GAAG,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;IAAE,kBAAkB,EAAE,OAAO,CAAA;CAAE,KACrC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAkBnC,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAoC7B;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,cAAc,GAClB,sBAAsB,CAOxB"}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageEnumerator.js","sourceRoot":"","sources":["../../../src/lib/search-source/packageEnumerator.ts"],"names":[],"mappings":";;AA8CA,oDAuCC;AAED,oEASC;AAhGD,wCAA6C;AA8B7C,MAAM,kBAAkB,GAAmC;IACzD,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;CAClB,CAAC;AAEF,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACtB,IAAI,EAAE,KAAK,GAAG;YAAE,OAAO,IAAI,IAAI,CAAC;aAC3B,IAAI,EAAE,KAAK,GAAG;YAAE,OAAO,IAAI,GAAG,CAAC;;YAC/B,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACxC,KAA6B,EAC7B,KAAqB;IAErB,MAAM,cAAc,GAAG,IAAI,GAAG,CAAiB,KAAK,CAAC,YAAY,CAAC,CAAC;IACnE,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AQ;YAAE,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;YACjC,OAAO,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChD,OAAO,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,4BAA4B,CAC1C,GAAmB;IAEnB,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE,CAC9B,KAAK,CAAC,sBAAsB,CAAC,WAAW,EAAE;QACxC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;KAC/C,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HandlerContext } from '../handlers/interfaces';
|
|
2
|
+
export interface SearchObjectsArgs {
|
|
3
|
+
query: string;
|
|
4
|
+
objectType: 'DEVC';
|
|
5
|
+
maxResults: number;
|
|
6
|
+
}
|
|
7
|
+
export type SearchObjectsFn = (args: SearchObjectsArgs) => Promise<string[]>;
|
|
8
|
+
export interface PackageResolverDeps {
|
|
9
|
+
searchObjects: SearchObjectsFn;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolvePackagePatterns(deps: PackageResolverDeps, entries: string[]): Promise<string[]>;
|
|
12
|
+
export declare function createPackagePatternResolver(ctx: HandlerContext): SearchObjectsFn;
|
|
13
|
+
//# sourceMappingURL=packageResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageResolver.d.ts","sourceRoot":"","sources":["../../../src/lib/search-source/packageResolver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAE7E,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,eAAe,CAAC;CAChC;AAQD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC,CAwBnB;AAED,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,cAAc,GAClB,eAAe,CAyBjB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvePackagePatterns = resolvePackagePatterns;
|
|
4
|
+
exports.createPackagePatternResolver = createPackagePatternResolver;
|
|
5
|
+
const clients_1 = require("../clients");
|
|
6
|
+
const WILDCARD_RE = /[*+]/;
|
|
7
|
+
function isPattern(entry) {
|
|
8
|
+
return WILDCARD_RE.test(entry);
|
|
9
|
+
}
|
|
10
|
+
async function resolvePackagePatterns(deps, entries) {
|
|
11
|
+
const exact = [];
|
|
12
|
+
const resolved = [];
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
if (isPattern(entry)) {
|
|
15
|
+
const names = await deps.searchObjects({
|
|
16
|
+
query: entry,
|
|
17
|
+
objectType: 'DEVC',
|
|
18
|
+
maxResults: 1000,
|
|
19
|
+
});
|
|
20
|
+
resolved.push(...names);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
exact.push(entry);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const seen = new Set();
|
|
27
|
+
const out = [];
|
|
28
|
+
for (const name of [...exact, ...resolved]) {
|
|
29
|
+
const key = name.toUpperCase();
|
|
30
|
+
if (seen.has(key))
|
|
31
|
+
continue;
|
|
32
|
+
seen.add(key);
|
|
33
|
+
out.push(name);
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
function createPackagePatternResolver(ctx) {
|
|
38
|
+
const client = (0, clients_1.createAdtClient)(ctx.connection, ctx.logger);
|
|
39
|
+
const utils = client.getUtils();
|
|
40
|
+
return async ({ query, objectType, maxResults }) => {
|
|
41
|
+
const response = await utils.searchObjects({
|
|
42
|
+
query,
|
|
43
|
+
objectType,
|
|
44
|
+
maxResults,
|
|
45
|
+
});
|
|
46
|
+
const status = response?.status;
|
|
47
|
+
if (status && status !== 200) {
|
|
48
|
+
throw new Error(`ADT request failed (status ${status})`);
|
|
49
|
+
}
|
|
50
|
+
const xml = typeof response?.data === 'string'
|
|
51
|
+
? response.data
|
|
52
|
+
: String(response?.data ?? '');
|
|
53
|
+
const names = [];
|
|
54
|
+
for (const m of xml.matchAll(/<adtcore:objectReference\s+([^>]*)\/>/g)) {
|
|
55
|
+
const attrs = m[1];
|
|
56
|
+
const name = attrs.match(/adtcore:name="([^"]*)"/)?.[1];
|
|
57
|
+
if (name)
|
|
58
|
+
names.push(name);
|
|
59
|
+
}
|
|
60
|
+
return names;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=packageResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageResolver.js","sourceRoot":"","sources":["../../../src/lib/search-source/packageResolver.ts"],"names":[],"mappings":";;AAqBA,wDA2BC;AAED,oEA2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AAC,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE;QACjD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC;YACzC,KAAK;YACL,UAAU;YACV,UAAU;SACX,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,CAAC;QAChC,IAAI,MAAM,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,GAAG,CAAC,CAAC;QAC3D,CAAC;QACD,MAAM,GAAG,GACP,OAAO,QAAQ,EAAE,IAAI,KAAK,QAAQ;YAChC,CAAC,CAAC,QAAQ,CAAC,IAAI;YACf,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;QACnC,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,wCAAwC,CAAC,EAAE,CAAC;YACvE,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACxD,IAAI,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HandlerContext } from '../handlers/interfaces';
|
|
2
|
+
import type { EnumeratedObject } from './packageEnumerator';
|
|
3
|
+
export type SourceVersion = 'active' | 'inactive';
|
|
4
|
+
export interface SourceUnit {
|
|
5
|
+
include: string;
|
|
6
|
+
lines: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface FugrChild {
|
|
9
|
+
objecttype: string;
|
|
10
|
+
objectname: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ReadSourceUnitsDeps {
|
|
13
|
+
readProgram(programName: string, version: SourceVersion): Promise<string | null>;
|
|
14
|
+
readInclude(includeName: string): Promise<string | null>;
|
|
15
|
+
readClassMain(className: string, version: SourceVersion): Promise<string | null>;
|
|
16
|
+
fetchFugrStructure(fugrName: string): Promise<FugrChild[]>;
|
|
17
|
+
readFugrFm(fugrName: string, fmName: string): Promise<string | null>;
|
|
18
|
+
logger?: {
|
|
19
|
+
debug?: (msg: string) => void;
|
|
20
|
+
warn?: (msg: string) => void;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare function readSourceUnits(deps: ReadSourceUnitsDeps, target: EnumeratedObject, version?: SourceVersion): AsyncGenerator<SourceUnit>;
|
|
24
|
+
export declare function createSourceReaderDeps(ctx: HandlerContext): ReadSourceUnitsDeps;
|
|
25
|
+
//# sourceMappingURL=sourceReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceReader.d.ts","sourceRoot":"","sources":["../../../src/lib/search-source/sourceReader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzD,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3D,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC1E;AA+BD,wBAAuB,eAAe,CACpC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,aAAwB,GAChC,cAAc,CAAC,UAAU,CAAC,CA+D5B;AA6BD,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,cAAc,GAClB,mBAAmB,CAuCrB"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readSourceUnits = readSourceUnits;
|
|
4
|
+
exports.createSourceReaderDeps = createSourceReaderDeps;
|
|
5
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
6
|
+
const clients_1 = require("../clients");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
function splitLines(text) {
|
|
9
|
+
return text.split(/\r?\n/);
|
|
10
|
+
}
|
|
11
|
+
async function safe(op, logger, desc) {
|
|
12
|
+
try {
|
|
13
|
+
return await op();
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
logger?.debug?.(`[search-source] ${desc} failed: ${e?.message ?? e}`);
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function isViewFm(name) {
|
|
21
|
+
return name.length >= 4 && name.slice(0, 4).toUpperCase() === 'VIEW';
|
|
22
|
+
}
|
|
23
|
+
function sortFugrChildren(children) {
|
|
24
|
+
return [...children].sort((a, b) => {
|
|
25
|
+
if (a.objecttype !== b.objecttype)
|
|
26
|
+
return a.objecttype < b.objecttype ? -1 : 1;
|
|
27
|
+
return a.objectname < b.objectname ? -1 : 1;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async function* readSourceUnits(deps, target, version = 'active') {
|
|
31
|
+
const logger = deps.logger;
|
|
32
|
+
switch (target.object_type) {
|
|
33
|
+
case 'PROG': {
|
|
34
|
+
const src = await safe(() => deps.readProgram(target.object_name, version), logger, `read PROG ${target.object_name}`);
|
|
35
|
+
if (src !== null && src !== undefined) {
|
|
36
|
+
yield { include: target.object_name, lines: splitLines(src) };
|
|
37
|
+
}
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
case 'CLAS': {
|
|
41
|
+
const src = await safe(() => deps.readClassMain(target.object_name, version), logger, `read CLAS ${target.object_name}`);
|
|
42
|
+
if (src !== null && src !== undefined) {
|
|
43
|
+
yield { include: target.object_name, lines: splitLines(src) };
|
|
44
|
+
}
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
case 'FUGR': {
|
|
48
|
+
const children = await safe(() => deps.fetchFugrStructure(target.object_name), logger, `fetch FUGR structure ${target.object_name}`);
|
|
49
|
+
if (!children)
|
|
50
|
+
return;
|
|
51
|
+
const seen = new Set();
|
|
52
|
+
const filtered = [];
|
|
53
|
+
for (const c of children) {
|
|
54
|
+
if (c.objecttype === 'FUGR/FF' && isViewFm(c.objectname))
|
|
55
|
+
continue;
|
|
56
|
+
if (!c.objecttype.startsWith('FUGR/'))
|
|
57
|
+
continue;
|
|
58
|
+
const key = `${c.objecttype}|${c.objectname}`;
|
|
59
|
+
if (seen.has(key))
|
|
60
|
+
continue;
|
|
61
|
+
seen.add(key);
|
|
62
|
+
filtered.push(c);
|
|
63
|
+
}
|
|
64
|
+
const ordered = sortFugrChildren(filtered);
|
|
65
|
+
for (const c of ordered) {
|
|
66
|
+
const src = c.objecttype === 'FUGR/FF'
|
|
67
|
+
? await safe(() => deps.readFugrFm(target.object_name, c.objectname), logger, `read FUGR/FF ${target.object_name}/${c.objectname}`)
|
|
68
|
+
: await safe(() => deps.readInclude(c.objectname), logger, `read FUGR include ${c.objectname}`);
|
|
69
|
+
if (src !== null && src !== undefined) {
|
|
70
|
+
yield { include: c.objectname, lines: splitLines(src) };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function parseFugrChildrenFromXml(xml) {
|
|
78
|
+
const parser = new fast_xml_parser_1.XMLParser({
|
|
79
|
+
ignoreAttributes: false,
|
|
80
|
+
attributeNamePrefix: '',
|
|
81
|
+
});
|
|
82
|
+
const parsed = parser.parse(xml);
|
|
83
|
+
let nodes = parsed?.['projectexplorer:objectstructure']?.['projectexplorer:node'];
|
|
84
|
+
if (!nodes)
|
|
85
|
+
return [];
|
|
86
|
+
if (!Array.isArray(nodes))
|
|
87
|
+
nodes = [nodes];
|
|
88
|
+
const out = [];
|
|
89
|
+
for (const node of nodes) {
|
|
90
|
+
if (!node.objecttype || !node.objectname)
|
|
91
|
+
continue;
|
|
92
|
+
if (!node.objecttype.startsWith('FUGR/'))
|
|
93
|
+
continue;
|
|
94
|
+
out.push({ objecttype: node.objecttype, objectname: node.objectname });
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
function createSourceReaderDeps(ctx) {
|
|
99
|
+
const client = (0, clients_1.createAdtClient)(ctx.connection, ctx.logger);
|
|
100
|
+
return {
|
|
101
|
+
async readProgram(programName, version) {
|
|
102
|
+
const r = await client.getProgram().read({ programName }, version);
|
|
103
|
+
const data = r?.readResult?.data;
|
|
104
|
+
return typeof data === 'string' ? data : null;
|
|
105
|
+
},
|
|
106
|
+
async readInclude(includeName) {
|
|
107
|
+
const r = await (0, utils_1.makeAdtRequestWithTimeout)(ctx.connection, `/sap/bc/adt/programs/includes/${(0, utils_1.encodeSapObjectName)(includeName)}/source/main`, 'GET', 'default');
|
|
108
|
+
return typeof r?.data === 'string' ? r.data : null;
|
|
109
|
+
},
|
|
110
|
+
async readClassMain(className, version) {
|
|
111
|
+
const r = await client.getClass().read({ className }, version);
|
|
112
|
+
const data = r?.readResult?.data;
|
|
113
|
+
return typeof data === 'string' ? data : null;
|
|
114
|
+
},
|
|
115
|
+
async fetchFugrStructure(fugrName) {
|
|
116
|
+
const r = await client.getUtils().getObjectStructure('FUGR/F', fugrName);
|
|
117
|
+
return typeof r?.data === 'string'
|
|
118
|
+
? parseFugrChildrenFromXml(r.data)
|
|
119
|
+
: [];
|
|
120
|
+
},
|
|
121
|
+
async readFugrFm(fugrName, fmName) {
|
|
122
|
+
const r = await (0, utils_1.makeAdtRequestWithTimeout)(ctx.connection, `/sap/bc/adt/functions/groups/${(0, utils_1.encodeSapObjectName)(fugrName.toLowerCase())}/fmodules/${(0, utils_1.encodeSapObjectName)(fmName.toLowerCase())}/source/main`, 'GET', 'default');
|
|
123
|
+
return typeof r?.data === 'string' ? r.data : null;
|
|
124
|
+
},
|
|
125
|
+
logger: ctx.logger,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=sourceReader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceReader.js","sourceRoot":"","sources":["../../../src/lib/search-source/sourceReader.ts"],"names":[],"mappings":";;AA8DA,0CAmEC;AA6BD,wDAyCC;AAvMD,qDAA4C;AAC5C,wCAA6C;AAE7C,oCAA0E;AA8B1E,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,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I,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACrD,CAAC;QACD,MAAM,EAAE,GAAG,CAAC,MAAM;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -4,8 +4,8 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
4
4
|
|
|
5
5
|
## Summary
|
|
6
6
|
|
|
7
|
-
- Total tools:
|
|
8
|
-
- Read-only tools:
|
|
7
|
+
- Total tools: 307
|
|
8
|
+
- Read-only tools: 56
|
|
9
9
|
- High-level tools: 127
|
|
10
10
|
- Low-level tools: 124
|
|
11
11
|
|
|
@@ -86,8 +86,11 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
86
86
|
- [RuntimeListFeeds](#runtimelistfeeds-read-only-system)
|
|
87
87
|
- [RuntimeListProfilerTraceFiles](#runtimelistprofilertracefiles-read-only-system)
|
|
88
88
|
- [RuntimeListSystemMessages](#runtimelistsystemmessages-read-only-system)
|
|
89
|
+
- [RuntimeRunClass](#runtimerunclass-read-only-system)
|
|
89
90
|
- [RuntimeRunClassWithProfiling](#runtimerunclasswithprofiling-read-only-system)
|
|
91
|
+
- [RuntimeRunProgram](#runtimerunprogram-read-only-system)
|
|
90
92
|
- [RuntimeRunProgramWithProfiling](#runtimerunprogramwithprofiling-read-only-system)
|
|
93
|
+
- [SearchSource](#searchsource-read-only-system)
|
|
91
94
|
- [Table](#read-only-table)
|
|
92
95
|
- [GetTableContents](#gettablecontents-read-only-table)
|
|
93
96
|
- [ReadTable](#readtable-read-only-table)
|
|
@@ -1033,9 +1036,38 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
1033
1036
|
|
|
1034
1037
|
---
|
|
1035
1038
|
|
|
1039
|
+
<a id="runtimerunclass-read-only-system"></a>
|
|
1040
|
+
#### RuntimeRunClass (Read-Only / System)
|
|
1041
|
+
**Description:** [runtime] Execute an ABAP class implementing if_oo_adt_classrun and return its output. Set profile=true to also capture a profiler trace (returns profilerId/traceId alongside output).
|
|
1042
|
+
|
|
1043
|
+
**Source:** `src/handlers/system/readonly/handleRuntimeRunClass.ts`
|
|
1044
|
+
|
|
1045
|
+
**Parameters:**
|
|
1046
|
+
- `aggregate` (boolean, optional) -
|
|
1047
|
+
- `all_db_events` (boolean, optional) -
|
|
1048
|
+
- `all_dynpro_events` (boolean, optional) -
|
|
1049
|
+
- `all_internal_table_events` (boolean, optional) -
|
|
1050
|
+
- `all_misc_abap_statements` (boolean, optional) -
|
|
1051
|
+
- `all_procedural_units` (boolean, optional) -
|
|
1052
|
+
- `all_system_kernel_events` (boolean, optional) -
|
|
1053
|
+
- `amdp_trace` (boolean, optional) -
|
|
1054
|
+
- `class_name` (string, required) - ABAP class name to execute.
|
|
1055
|
+
- `description` (string, optional) - Profiler trace description (only used when profile=true).
|
|
1056
|
+
- `explicit_on_off` (boolean, optional) -
|
|
1057
|
+
- `max_size_for_trace_file` (number, optional) -
|
|
1058
|
+
- `max_time_for_tracing` (number, optional) -
|
|
1059
|
+
- `max_trace_attempts` (integer, optional) - Max polling attempts to resolve traceId after execution (default 5). Only used when profile=true.
|
|
1060
|
+
- `profile` (boolean, optional) - When true, run with the profiler and resolve the resulting traceId. Default false.
|
|
1061
|
+
- `sql_trace` (boolean, optional) -
|
|
1062
|
+
- `trace_lookup_uris` (array, optional) - Additional URIs to consult when resolving the trace (advanced, profile=true).
|
|
1063
|
+
- `trace_retry_delay_ms` (integer, optional) - Delay in ms between trace polling attempts (default 2000). Only used when profile=true.
|
|
1064
|
+
- `with_rfc_tracing` (boolean, optional) -
|
|
1065
|
+
|
|
1066
|
+
---
|
|
1067
|
+
|
|
1036
1068
|
<a id="runtimerunclasswithprofiling-read-only-system"></a>
|
|
1037
1069
|
#### RuntimeRunClassWithProfiling (Read-Only / System)
|
|
1038
|
-
**Description:** [runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.
|
|
1070
|
+
**Description:** [runtime][deprecated] Execute ABAP class with profiler enabled and return created profilerId + traceId. Prefer RuntimeRunClass with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.
|
|
1039
1071
|
|
|
1040
1072
|
**Source:** `src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts`
|
|
1041
1073
|
|
|
@@ -1053,6 +1085,35 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
1053
1085
|
- `explicit_on_off` (boolean, optional) -
|
|
1054
1086
|
- `max_size_for_trace_file` (number, optional) -
|
|
1055
1087
|
- `max_time_for_tracing` (number, optional) -
|
|
1088
|
+
- `max_trace_attempts` (integer, optional) - Max polling attempts to resolve traceId after execution (default 5). Increase for slow systems (e.g. SAP trial cloud).
|
|
1089
|
+
- `sql_trace` (boolean, optional) -
|
|
1090
|
+
- `trace_lookup_uris` (array, optional) - Additional URIs to consult when resolving the trace (advanced).
|
|
1091
|
+
- `trace_retry_delay_ms` (integer, optional) - Delay in ms between trace polling attempts (default 2000).
|
|
1092
|
+
- `with_rfc_tracing` (boolean, optional) -
|
|
1093
|
+
|
|
1094
|
+
---
|
|
1095
|
+
|
|
1096
|
+
<a id="runtimerunprogram-read-only-system"></a>
|
|
1097
|
+
#### RuntimeRunProgram (Read-Only / System)
|
|
1098
|
+
**Description:** [runtime] Execute an ABAP program (report) and return its output. Set profile=true to also start a profiler trace; use RuntimeListProfilerTraceFiles afterwards to locate the trace (program execution is fire-and-forget, so traceId is not returned synchronously).
|
|
1099
|
+
|
|
1100
|
+
**Source:** `src/handlers/system/readonly/handleRuntimeRunProgram.ts`
|
|
1101
|
+
|
|
1102
|
+
**Parameters:**
|
|
1103
|
+
- `aggregate` (boolean, optional) -
|
|
1104
|
+
- `all_db_events` (boolean, optional) -
|
|
1105
|
+
- `all_dynpro_events` (boolean, optional) -
|
|
1106
|
+
- `all_internal_table_events` (boolean, optional) -
|
|
1107
|
+
- `all_misc_abap_statements` (boolean, optional) -
|
|
1108
|
+
- `all_procedural_units` (boolean, optional) -
|
|
1109
|
+
- `all_system_kernel_events` (boolean, optional) -
|
|
1110
|
+
- `amdp_trace` (boolean, optional) -
|
|
1111
|
+
- `description` (string, optional) - Profiler trace description (only used when profile=true).
|
|
1112
|
+
- `explicit_on_off` (boolean, optional) -
|
|
1113
|
+
- `max_size_for_trace_file` (number, optional) -
|
|
1114
|
+
- `max_time_for_tracing` (number, optional) -
|
|
1115
|
+
- `profile` (boolean, optional) - When true, run with the profiler. Default false. Trace must be located afterwards via RuntimeListProfilerTraceFiles — program execution does not return traceId synchronously.
|
|
1116
|
+
- `program_name` (string, required) - ABAP program name to execute.
|
|
1056
1117
|
- `sql_trace` (boolean, optional) -
|
|
1057
1118
|
- `with_rfc_tracing` (boolean, optional) -
|
|
1058
1119
|
|
|
@@ -1060,7 +1121,7 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
1060
1121
|
|
|
1061
1122
|
<a id="runtimerunprogramwithprofiling-read-only-system"></a>
|
|
1062
1123
|
#### RuntimeRunProgramWithProfiling (Read-Only / System)
|
|
1063
|
-
**Description:** [runtime] Execute ABAP program with profiler enabled and return created profilerId
|
|
1124
|
+
**Description:** [runtime][deprecated] Execute ABAP program with profiler enabled and return created profilerId. Prefer RuntimeRunProgram with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.
|
|
1064
1125
|
|
|
1065
1126
|
**Source:** `src/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.ts`
|
|
1066
1127
|
|
|
@@ -1083,6 +1144,17 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
1083
1144
|
|
|
1084
1145
|
---
|
|
1085
1146
|
|
|
1147
|
+
<a id="searchsource-read-only-system"></a>
|
|
1148
|
+
#### SearchSource (Read-Only / System)
|
|
1149
|
+
**Description:** [read-only] Search ABAP source text inside one or more packages (programs, function groups, classes). Onprem-only (cloud lacks an indexed source-search endpoint). `packages` accepts `*` masks (Z*, ZFI_*, /NS/Z*) alongside exact names; mask resolution is best-effort and scoped to the ADT repository-search result window — there is no guarantee that every matching package is scanned. If you need certainty, pass concrete package names. When using masks, narrow the mask itself and use `object_types`, `object_filter`, and `max_objects` as scan-target controls that apply after package resolution. Comments are searched by default; set exclude_comments=true to drop col-1 `*` and full-line `
|
|
1150
|
+
|
|
1151
|
+
**Source:** `src/handlers/system/readonly/handleSearchSource.ts`
|
|
1152
|
+
|
|
1153
|
+
**Parameters:**
|
|
1154
|
+
- None
|
|
1155
|
+
|
|
1156
|
+
---
|
|
1157
|
+
|
|
1086
1158
|
<a id="read-only-table"></a>
|
|
1087
1159
|
### Read-Only / Table
|
|
1088
1160
|
|
|
@@ -4879,4 +4951,4 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
4879
4951
|
|
|
4880
4952
|
---
|
|
4881
4953
|
|
|
4882
|
-
*Last updated: 2026-
|
|
4954
|
+
*Last updated: 2026-05-15*
|
|
@@ -5,8 +5,8 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
5
5
|
Tools available on legacy SAP systems (BASIS < 7.50).
|
|
6
6
|
Legacy systems support a subset of tools — primarily Class, Interface, View, Program, Function Group/Module, Package (read/update/delete), Include, Unit Test, and common utilities.
|
|
7
7
|
|
|
8
|
-
- Total tools:
|
|
9
|
-
- Read-Only:
|
|
8
|
+
- Total tools: 130
|
|
9
|
+
- Read-Only: 12
|
|
10
10
|
- High-Level: 58
|
|
11
11
|
- Low-Level: 60
|
|
12
12
|
|
|
@@ -30,6 +30,8 @@ Legacy systems support a subset of tools — primarily Class, Interface, View, P
|
|
|
30
30
|
- [Program](#read-only-program)
|
|
31
31
|
- [GetProgFullCode](#getprogfullcode-read-only-program)
|
|
32
32
|
- [ReadProgram](#readprogram-read-only-program)
|
|
33
|
+
- [System](#read-only-system)
|
|
34
|
+
- [SearchSource](#searchsource-read-only-system)
|
|
33
35
|
- [View](#read-only-view)
|
|
34
36
|
- [ReadView](#readview-read-only-view)
|
|
35
37
|
- [High-Level Group](#high-level-group)
|
|
@@ -337,6 +339,22 @@ Legacy systems support a subset of tools — primarily Class, Interface, View, P
|
|
|
337
339
|
|
|
338
340
|
---
|
|
339
341
|
|
|
342
|
+
<a id="read-only-system"></a>
|
|
343
|
+
### Read-Only / System
|
|
344
|
+
|
|
345
|
+
<a id="searchsource-read-only-system"></a>
|
|
346
|
+
#### SearchSource (Read-Only / System)
|
|
347
|
+
**Description:** [read-only] Search ABAP source text inside one or more packages (programs, function groups, classes). Onprem-only (cloud lacks an indexed source-search endpoint). `packages` accepts `*` masks (Z*, ZFI_*, /NS/Z*) alongside exact names; mask resolution is best-effort and scoped to the ADT repository-search result window — there is no guarantee that every matching package is scanned. If you need certainty, pass concrete package names. When using masks, narrow the mask itself and use `object_types`, `object_filter`, and `max_objects` as scan-target controls that apply after package resolution. Comments are searched by default; set exclude_comments=true to drop col-1 `*` and full-line `
|
|
348
|
+
|
|
349
|
+
**Source:** `src/handlers/system/readonly/handleSearchSource.ts`
|
|
350
|
+
|
|
351
|
+
**Available in:** `onprem`, `legacy`
|
|
352
|
+
|
|
353
|
+
**Parameters:**
|
|
354
|
+
- None
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
340
358
|
<a id="read-only-view"></a>
|
|
341
359
|
### Read-Only / View
|
|
342
360
|
|
|
@@ -2253,4 +2271,4 @@ Legacy systems support a subset of tools — primarily Class, Interface, View, P
|
|
|
2253
2271
|
|
|
2254
2272
|
---
|
|
2255
2273
|
|
|
2256
|
-
*Last updated: 2026-
|
|
2274
|
+
*Last updated: 2026-05-15*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Generated from code in `src/handlers/**` (not from docs).
|
|
4
4
|
|
|
5
5
|
- Level: Read-Only
|
|
6
|
-
- Total tools:
|
|
6
|
+
- Total tools: 56
|
|
7
7
|
|
|
8
8
|
## Navigation
|
|
9
9
|
|
|
@@ -72,8 +72,11 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
72
72
|
- [RuntimeListFeeds](#runtimelistfeeds-read-only-system)
|
|
73
73
|
- [RuntimeListProfilerTraceFiles](#runtimelistprofilertracefiles-read-only-system)
|
|
74
74
|
- [RuntimeListSystemMessages](#runtimelistsystemmessages-read-only-system)
|
|
75
|
+
- [RuntimeRunClass](#runtimerunclass-read-only-system)
|
|
75
76
|
- [RuntimeRunClassWithProfiling](#runtimerunclasswithprofiling-read-only-system)
|
|
77
|
+
- [RuntimeRunProgram](#runtimerunprogram-read-only-system)
|
|
76
78
|
- [RuntimeRunProgramWithProfiling](#runtimerunprogramwithprofiling-read-only-system)
|
|
79
|
+
- [SearchSource](#searchsource-read-only-system)
|
|
77
80
|
- [Table](#read-only-table)
|
|
78
81
|
- [GetTableContents](#gettablecontents-read-only-table)
|
|
79
82
|
- [ReadTable](#readtable-read-only-table)
|
|
@@ -725,9 +728,38 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
725
728
|
|
|
726
729
|
---
|
|
727
730
|
|
|
731
|
+
<a id="runtimerunclass-read-only-system"></a>
|
|
732
|
+
#### RuntimeRunClass (Read-Only / System)
|
|
733
|
+
**Description:** [runtime] Execute an ABAP class implementing if_oo_adt_classrun and return its output. Set profile=true to also capture a profiler trace (returns profilerId/traceId alongside output).
|
|
734
|
+
|
|
735
|
+
**Source:** `src/handlers/system/readonly/handleRuntimeRunClass.ts`
|
|
736
|
+
|
|
737
|
+
**Parameters:**
|
|
738
|
+
- `aggregate` (boolean, optional) -
|
|
739
|
+
- `all_db_events` (boolean, optional) -
|
|
740
|
+
- `all_dynpro_events` (boolean, optional) -
|
|
741
|
+
- `all_internal_table_events` (boolean, optional) -
|
|
742
|
+
- `all_misc_abap_statements` (boolean, optional) -
|
|
743
|
+
- `all_procedural_units` (boolean, optional) -
|
|
744
|
+
- `all_system_kernel_events` (boolean, optional) -
|
|
745
|
+
- `amdp_trace` (boolean, optional) -
|
|
746
|
+
- `class_name` (string, required) - ABAP class name to execute.
|
|
747
|
+
- `description` (string, optional) - Profiler trace description (only used when profile=true).
|
|
748
|
+
- `explicit_on_off` (boolean, optional) -
|
|
749
|
+
- `max_size_for_trace_file` (number, optional) -
|
|
750
|
+
- `max_time_for_tracing` (number, optional) -
|
|
751
|
+
- `max_trace_attempts` (integer, optional) - Max polling attempts to resolve traceId after execution (default 5). Only used when profile=true.
|
|
752
|
+
- `profile` (boolean, optional) - When true, run with the profiler and resolve the resulting traceId. Default false.
|
|
753
|
+
- `sql_trace` (boolean, optional) -
|
|
754
|
+
- `trace_lookup_uris` (array, optional) - Additional URIs to consult when resolving the trace (advanced, profile=true).
|
|
755
|
+
- `trace_retry_delay_ms` (integer, optional) - Delay in ms between trace polling attempts (default 2000). Only used when profile=true.
|
|
756
|
+
- `with_rfc_tracing` (boolean, optional) -
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
728
760
|
<a id="runtimerunclasswithprofiling-read-only-system"></a>
|
|
729
761
|
#### RuntimeRunClassWithProfiling (Read-Only / System)
|
|
730
|
-
**Description:** [runtime] Execute ABAP class with profiler enabled and return created profilerId + traceId.
|
|
762
|
+
**Description:** [runtime][deprecated] Execute ABAP class with profiler enabled and return created profilerId + traceId. Prefer RuntimeRunClass with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.
|
|
731
763
|
|
|
732
764
|
**Source:** `src/handlers/system/readonly/handleRuntimeRunClassWithProfiling.ts`
|
|
733
765
|
|
|
@@ -745,6 +777,35 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
745
777
|
- `explicit_on_off` (boolean, optional) -
|
|
746
778
|
- `max_size_for_trace_file` (number, optional) -
|
|
747
779
|
- `max_time_for_tracing` (number, optional) -
|
|
780
|
+
- `max_trace_attempts` (integer, optional) - Max polling attempts to resolve traceId after execution (default 5). Increase for slow systems (e.g. SAP trial cloud).
|
|
781
|
+
- `sql_trace` (boolean, optional) -
|
|
782
|
+
- `trace_lookup_uris` (array, optional) - Additional URIs to consult when resolving the trace (advanced).
|
|
783
|
+
- `trace_retry_delay_ms` (integer, optional) - Delay in ms between trace polling attempts (default 2000).
|
|
784
|
+
- `with_rfc_tracing` (boolean, optional) -
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
788
|
+
<a id="runtimerunprogram-read-only-system"></a>
|
|
789
|
+
#### RuntimeRunProgram (Read-Only / System)
|
|
790
|
+
**Description:** [runtime] Execute an ABAP program (report) and return its output. Set profile=true to also start a profiler trace; use RuntimeListProfilerTraceFiles afterwards to locate the trace (program execution is fire-and-forget, so traceId is not returned synchronously).
|
|
791
|
+
|
|
792
|
+
**Source:** `src/handlers/system/readonly/handleRuntimeRunProgram.ts`
|
|
793
|
+
|
|
794
|
+
**Parameters:**
|
|
795
|
+
- `aggregate` (boolean, optional) -
|
|
796
|
+
- `all_db_events` (boolean, optional) -
|
|
797
|
+
- `all_dynpro_events` (boolean, optional) -
|
|
798
|
+
- `all_internal_table_events` (boolean, optional) -
|
|
799
|
+
- `all_misc_abap_statements` (boolean, optional) -
|
|
800
|
+
- `all_procedural_units` (boolean, optional) -
|
|
801
|
+
- `all_system_kernel_events` (boolean, optional) -
|
|
802
|
+
- `amdp_trace` (boolean, optional) -
|
|
803
|
+
- `description` (string, optional) - Profiler trace description (only used when profile=true).
|
|
804
|
+
- `explicit_on_off` (boolean, optional) -
|
|
805
|
+
- `max_size_for_trace_file` (number, optional) -
|
|
806
|
+
- `max_time_for_tracing` (number, optional) -
|
|
807
|
+
- `profile` (boolean, optional) - When true, run with the profiler. Default false. Trace must be located afterwards via RuntimeListProfilerTraceFiles — program execution does not return traceId synchronously.
|
|
808
|
+
- `program_name` (string, required) - ABAP program name to execute.
|
|
748
809
|
- `sql_trace` (boolean, optional) -
|
|
749
810
|
- `with_rfc_tracing` (boolean, optional) -
|
|
750
811
|
|
|
@@ -752,7 +813,7 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
752
813
|
|
|
753
814
|
<a id="runtimerunprogramwithprofiling-read-only-system"></a>
|
|
754
815
|
#### RuntimeRunProgramWithProfiling (Read-Only / System)
|
|
755
|
-
**Description:** [runtime] Execute ABAP program with profiler enabled and return created profilerId
|
|
816
|
+
**Description:** [runtime][deprecated] Execute ABAP program with profiler enabled and return created profilerId. Prefer RuntimeRunProgram with profile=true; this tool is kept for backward compatibility and will be removed in a future major release.
|
|
756
817
|
|
|
757
818
|
**Source:** `src/handlers/system/readonly/handleRuntimeRunProgramWithProfiling.ts`
|
|
758
819
|
|
|
@@ -775,6 +836,17 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
775
836
|
|
|
776
837
|
---
|
|
777
838
|
|
|
839
|
+
<a id="searchsource-read-only-system"></a>
|
|
840
|
+
#### SearchSource (Read-Only / System)
|
|
841
|
+
**Description:** [read-only] Search ABAP source text inside one or more packages (programs, function groups, classes). Onprem-only (cloud lacks an indexed source-search endpoint). `packages` accepts `*` masks (Z*, ZFI_*, /NS/Z*) alongside exact names; mask resolution is best-effort and scoped to the ADT repository-search result window — there is no guarantee that every matching package is scanned. If you need certainty, pass concrete package names. When using masks, narrow the mask itself and use `object_types`, `object_filter`, and `max_objects` as scan-target controls that apply after package resolution. Comments are searched by default; set exclude_comments=true to drop col-1 `*` and full-line `
|
|
842
|
+
|
|
843
|
+
**Source:** `src/handlers/system/readonly/handleSearchSource.ts`
|
|
844
|
+
|
|
845
|
+
**Parameters:**
|
|
846
|
+
- None
|
|
847
|
+
|
|
848
|
+
---
|
|
849
|
+
|
|
778
850
|
<a id="read-only-table"></a>
|
|
779
851
|
### Read-Only / Table
|
|
780
852
|
|
|
@@ -844,4 +916,4 @@ Generated from code in `src/handlers/**` (not from docs).
|
|
|
844
916
|
|
|
845
917
|
---
|
|
846
918
|
|
|
847
|
-
*Last updated: 2026-
|
|
919
|
+
*Last updated: 2026-05-15*
|