abap-parser
Parses ABAP code and tells what it does: classes, methods, forms and declarations; which database tables a statement reads or writes; which methods, function modules and forms it calls; and the logic of each procedure, from conditions and data flow to what it writes in the end, also through SUBMIT, ABAP memory and files. CDS views tell their data sources and the fields of each element. Sources come from a folder (abapGit layout or plain .abap files) or from an SAP system through the ADT REST API, SAP standard code and dictionary types included.
pip install abap-parser
Wheels for Windows x64, macOS x64 and arm64, Linux x64 and arm64 (manylinux), Python 3.9 and later. Other platforms build from the source distribution with Rust.
import abap_parser
source = open("zcl_orders.clas.abap", encoding="utf-8").read()
for c in abap_parser.symbols(source)["classes"]:
print(c["name"], [m["name"] for m in c["methods"]])
for a in abap_parser.db_access(source):
print(a["operation"], [t["name"] for t in a["tables"]])
for p in abap_parser.logic(source)["procedures"]:
print(p["block"]["name"], [(e["name"], e["inputs"]) for e in p["effects"]])
# whole objects, missing sources loaded from an SAP system
options = {
"src": ["./src"],
"cache": "./.abap-cache",
"adt": {"url": "https://host:44300", "user": os.environ["ABAP_ADT_USER"],
"password": os.environ["ABAP_ADT_PASSWORD"]},
}
graph = abap_parser.call_graph(["CLAS:ZCL_ORDERS"], options, depth=2)
logic = await abap_parser.logic_object_async("PROG:ZREPORT", options)
# compact text, e.g. for a language model
prompt = abap_parser.text("logic", source)
outline = await abap_parser.object_text_async("symbols", ["CLAS:ZCL_ORDERS"], options)
# a CDS view: sources, joins, associations, the fields of each element
view = abap_parser.cds(open("zi_orders.ddls.asddls", encoding="utf-8").read())
Every function has an ..._async variant for asyncio; the native code releases the GIL. The results are dictionaries typed by the TypedDicts in abap_parser.types. text and object_text give a compact form instead: definitions written like ABAP, one line per call or database access, per procedure its effects with statements and conditions. See the repository for what each result contains.
Metadata
Release files for abap-parser 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| abap_parser-0.2.0.tar.gz | 232.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| abap_parser-0.2.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| abap_parser-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| abap_parser-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| abap_parser-0.2.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| abap_parser-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 10.9 MB
Release files / abap_parser-0.2.0.tar.gz
| Download URL | abap_parser-0.2.0.tar.gz |
|---|---|
| Size | 232.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbea985aeedee4c049bedbdc9c1164c7c808509422d4f38d2ae7aad68ecdd88e
|
|
BLAKE2b-256 checksum How to use checksums |
20255dd2fa04d842b490d5d56aa0b49b1d9367f3b4efa5c557a3c5a837718d0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / abap_parser-0.2.0-cp39-abi3-win_amd64.whl
| Download URL | abap_parser-0.2.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e96b311b5790acd11d5a4ed033f5ec5957be61b0cd5deebf5076648631acbc59
|
|
BLAKE2b-256 checksum How to use checksums |
2d9ff8d709a56b2a33f70e57769623c8eb7c46e50e3c9aa0566cf15082a0906e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / abap_parser-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | abap_parser-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2424857bb0d639e48ea9e485ca9f46b28174764e3e36df1ed4861654c132726b
|
|
BLAKE2b-256 checksum How to use checksums |
db37b67e747feba2dce35f2cae551212b16c57708316ec964943023e7daede3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / abap_parser-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | abap_parser-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5c03b5ab974b07dabeeca3ba0e98c246a1270fce4938468314039678a162377c
|
|
BLAKE2b-256 checksum How to use checksums |
01a8def331539216fc244d11abee785a9aaabc30a4ddda0b41d585f301624c64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / abap_parser-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | abap_parser-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0f3238a90e60bebcfcf1f10c682c2c74953f6cd8978d02b39db32b2a49d06f77
|
|
BLAKE2b-256 checksum How to use checksums |
44b1832e085f2dc8a4c6e5465084e3f155e982fdd01f2192de4c9d49befaa863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / abap_parser-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | abap_parser-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
fb6014ec3e8f184095c80109cc7c9347560d812d12e6efa5b6958d7e006ae37e
|
|
BLAKE2b-256 checksum How to use checksums |
15ca78935477df53a81d68d90fa4bb312d88ad0150ab2c5d662e923d1a97f015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log