Skip to main content

adt source

Read (get) or write (put) the main ABAP source of an object by name. This is the generic, type-agnostic counterpart to adt class write, adt program read, etc. — it resolves the object type automatically.

Subcommands

adt source get <objectName> [--type <type>] [--json]
adt source put <objectName> <file> [--type <type>] [--transport <tr>] [--json]

Options

get

Argument / FlagDescription
<objectName>ABAP object name.
--type <type>Object type hint (e.g. CLAS, PROG, INTF).
--jsonOutput result as JSON.

put

Argument / FlagDescription
<objectName>ABAP object name.
<file>Path to the source file to upload.
--type <type>Object type hint (e.g. CLAS, PROG, INTF).
--transport <transport>Transport request number for transportable objects.
--jsonOutput result as JSON.

Examples

# Read any object's source to stdout
adt source get ZCL_DEMO > zcl_demo.abap
adt source get ZDEMO_PROG --type PROG

# Update source in-place
adt source put ZCL_DEMO zcl_demo.abap --transport DEVK900001

# Machine-readable response
adt source put ZCL_DEMO zcl_demo.abap --transport DEVK900001 --json

See also

  • objects — typed CRUD (adt class write, ...)
  • lockput handles locking implicitly; use adt lock for batch scenarios