Catalog PyPI
Back to packageRELEASE DETAILS

0.3.0

PyPI

abap-parser

ABAP parser: symbols, database access, calls and logic of ABAP code, sources from folders or an SAP system

abapabapgitadtparsersap
Published14 Oct 2026
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.3.0 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

6 collected
abap_parser-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl

bdist_wheel · 2,188.27 KB · Python cp39

Source file
abap_parser-0.3.0-cp39-abi3-macosx_11_0_arm64.whl

bdist_wheel · 2,104.97 KB · Python cp39

Source file
abap_parser-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

bdist_wheel · 2,351.49 KB · Python cp39

Source file
abap_parser-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

bdist_wheel · 2,381.57 KB · Python cp39

Source file
abap_parser-0.3.0-cp39-abi3-win_amd64.whl

bdist_wheel · 2,005.19 KB · Python cp39

Source file
abap_parser-0.3.0.tar.gz

sdist · 243.92 KB · Python source

Source file

Repository

PENDING
albertlast/abappaser

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:3e4e8111c47f7fbecc2454b0a492131110169e5c6e73af2828af5dce85e59e31

Other collected versions

View all collected versions →