read_abap_source
Retrieve the full ABAP source code of a program, class, or function module. Automatically picks ADT or RFC transport and falls back on failure, so you get the source without choosing a method.
Instructions
Read the full ABAP source of a program, class, or function module.
Automatically uses ADT (one call, most reliable — especially for
classes, which need several RFC calls otherwise) when it's enabled and
reachable, and transparently falls back to RFC (RPY_PROGRAM_READ /
RPY_FUNCTIONMODULE_READ) otherwise — including on a live ADT failure,
not just when it's disabled. You never need to choose the transport
yourself; check the returned via field if you want to know which one
actually served the read. function_group is required when
object_type='function_module'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_name | Yes | Name of the program, class, or function module to read source for. | |
| object_type | Yes | Kind of ABAP object to read source for. | |
| function_group | No | Function group the function module belongs to. Required when object_type='function_module', ignored otherwise. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | Yes | ||
| source | Yes | ||
| object_name | Yes | ||
| object_type | Yes | ||
| function_group | No |