sap_read_code
Retrieve source code of ABAP programs, classes, or function groups. Specify ACTIVE or INACTIVE version; falls back to ACTIVE when no INACTIVE version exists.
Instructions
Retrieves the source code of an ABAP object (program, class, or function group). Optional version param ('ACTIVE' default, 'INACTIVE' for pending unactivated changes). When 'INACTIVE' is requested but no inactive version exists, returns the active version with fallback_reason='no_inactive_version'. The response includes a version field indicating which version was actually returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Which source version to read. ACTIVE = last activated source (default). INACTIVE = pending unactivated changes (falls back to ACTIVE with fallback_reason='no_inactive_version' if not present). | ACTIVE |
| object_name | Yes | Name of the object (case-insensitive) | |
| object_type | Yes | Type of ABAP object |