patchObjectSource
Apply targeted edits to ABAP objects without full re-upload. Read, modify, and return a diff; use for small changes to avoid disrupting untouched code, with optional dry run.
Instructions
Change part of an ABAP object without re-uploading it. Reads the current source, applies the edits, writes the result and returns a unified diff of what changed. Use it instead of setObjectSource for a small change to a large object: setObjectSource replaces the whole object, so it costs the entire source and risks disturbing lines you never meant to touch. Pass dryRun to see the diff without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | Edits to apply. Every line number refers to the source as it is now, and edits must not overlap. Each edit is one of: {startLine, endLine?, replacement} to replace a line range ("" deletes it), {anchor, replacement, occurrence?} to replace exact text, {insertAfterLine, insertion} to insert (0 = at the top). | |
| dryRun | No | Compute and return the diff without writing anything. | |
| transport | No | Transport request for the change. | |
| lockHandle | No | Lock handle. Omit it and the handle recorded by lock for this object is used (see listLocks). | |
| objectSourceUrl | Yes | Source URL, e.g. /sap/bc/adt/oo/classes/zcl_app/source/main |