patch_program_source
Modify part of an existing ABAP program or include by replacing exact old text with new text; avoids resending untouched code and reduces corruption risk.
Instructions
Modify PART of an existing ABAP program or include without resending the whole object. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, optionally activates, and unlocks. Prefer this over update_program_source for edits - it removes any risk of corrupting the object by re-transmitting untouched code. 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": {
"programName": "<programName>",
"oldString": "<oldString>",
"newString": "<newString>"
},
"name": "patch_program_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activate | No | Activate after writing. Default false - activate in SE38/SE80 yourself. | |
| 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, e.g. D01K903926. Omit only for local/$TMP objects. | |
| programName | Yes | Program or include name, e.g. ZABLMMNF00002TOP |