Read ABAP object
abap_readRetrieve ABAP object source, package listings, and detailed views like history, diff, definition, and lineage directly from your SAP system.
Instructions
Read an ABAP object: source, pseudo-DDL, a DEVC/K package listing, or (SUSO/B, TABL/DI) a read-only catalog render; view= selects docu/digest/history/diff/definition/lineage/footprint. A CLAS/INTF/PROG/FUGR source above 150 lines or 8k chars answers with its outline by default — then method=, pattern= (regex, with context), offset/limit, or full=true. To learn a method's signature, use method= with include="definitions" (declaration only); method= also finds inherited members (superclasses and interfaces) and reports foundOn. Returns an etag; capped ~15k tokens, truncation marked. Example: {"object":"ZCL_FOO","type":"CLAS/OC"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | diff: newer side, same forms as `from`. | |
| from | No | diff: older side — version, transport, or "active". | |
| full | No | Whole source even above the default-outline threshold. | |
| line | No | 1-based source line. Required with view="definition"; refused otherwise. | |
| type | No | ADT type to disambiguate. DEVC/K: package listing (types/depth filter it). SUSO/B: renders the object's DEFINITION (fields, permitted activities) from the catalog — NOT who holds it, no AGR_*/UST* table is read. TABL/DI: <TABLE>/<INDEX> renders one index, bare <TABLE> lists them all. Not readable: PROG/PS PROG/PC PROG/PT. | |
| view | No | history: versions. diff: hunks. definition: element at line/column. lineage: CDS sources down to base tables. footprint: database writes and commits. docu: SAP documentation (type="SIMG" + object=<abap_img activity id> for an IMG activity). digest: one-page overview. Omit for a normal read. | |
| depth | No | DEVC/K: subpackage nesting depth, default 1, max 3. view="lineage": levels of underlying views, default 5, max 10. | |
| field | No | view="lineage" only: trace one field back to its base columns. | |
| limit | No | Max lines (chars if format=raw). | |
| types | No | DEVC/K only: filter package contents to these kind codes, e.g. ["CLAS","DDLS"]. | |
| column | No | 0-based column. Default 0. Only meaningful with view="definition"; refused otherwise. | |
| format | No | raw: XML, not pseudo-DDL (DTEL/DE DOMA/DD TTYP/DA MSAG/N ENQU/DL SRVB/SVB only). | |
| method | No | Only this method/component. | |
| object | Yes | Name, "class X", "table Y", or ADT URI. | |
| offset | No | 1-based first line (chars if format=raw). | |
| context | No | Lines around each pattern match (default 2) or per diff hunk (default 3). | |
| include | No | CLAS/OC only: which class include to read ("testclasses"=Unit tests; default "main"). Ignored, with a note, for every other type. | |
| outline | No | Component list with line ranges. Default for CLAS/INTF/PROG/FUGR above 150 lines or 8000 chars unless method/include/offset/limit/pattern/full is given. | |
| pattern | No | Regex (case-insensitive): only matching lines, numbered, with `context` lines around each (like grep -n -C). Max 50 matches unless limit= is given; offset= sets the first line scanned. | |
| version | No | Default: current (active or newest inactive). | |
| enhancements | No | BAdI/plug-in/enhancement-spot decode (ENHO/XH,XHH,ENHS), not source. |