patch_class
Modify part of an ABAP class by replacing an exact existing string once, then lock, write, unlock, and optionally activate it—without resending the full source. Refuses production writes.
Instructions
Modify PART of an existing ABAP class without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Prefer this over update_class for small edits like changing one method body. Refuses to run on production profiles.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"className": "<className>",
"oldString": "<oldString>",
"newString": "<newString>"
},
"name": "patch_class"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activate | No | Activate after writing. Default false. | |
| className | Yes | Class name, e.g. ZCL_ABL_PLANT_EMAIL | |
| newString | Yes | Replacement text | |
| oldString | Yes | Exact existing text to replace. Must occur exactly once - include enough context to be unique. | |
| transport | No | Transport request. Omit only for local/$TMP objects. |