get_transaction
Fetch ABAP transaction details (package, application component) from SAP systems by providing a transaction code. Optionally specify the system ID to target a specific SAP system.
Instructions
Fetch ABAP transaction details (package, application component) from SAP system
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Transaction code (e.g. VA01) | |
| system_id | No | SAP system ID (e.g. DEV). Omit to use default system. |
Implementation Reference
- src/mcp-server.ts:415-423 (registration)Tool registration for 'get_transaction' in the ListToolsRequestSchema handler - defines the tool name, description, and input schema.
{ name: "get_transaction", description: "Fetch ABAP transaction details (package, application component) from SAP system", inputSchema: { type: "object" as const, properties: { name: { type: "string", description: "Transaction code (e.g. VA01)" }, ...SYSTEM_ID_PROP }, required: ["name"], }, }, - src/mcp-server.ts:1081-1085 (handler)Handler implementation for 'get_transaction' tool - parses the name argument and calls client.getTransactionDetails().
case "get_transaction": { const { name: txName } = NameSchema.parse(args); const details = await client.getTransactionDetails(txName); return { content: [{ type: "text", text: details }] }; } - src/adt-client.ts:100-107 (helper)Helper method AdtClient.getTransactionDetails() - makes an HTTP GET request to the SAP ADT object properties API to fetch transaction details (package, application component).
async getTransactionDetails(name: string): Promise<string> { const adtUri = `/sap/bc/adt/vit/wb/object_type/trant/object_name/${encodeURIComponent(name.toUpperCase())}`; const response = await this.http.get<string>( `/sap/bc/adt/repository/informationsystem/objectproperties/values?uri=${encodeURIComponent(adtUri)}&facet=package&facet=appl`, { headers: { Accept: "*/*" }, responseType: "text" } ); return response.data; }