Skip to content
cd /languages
  • Enterprise core
  • Programming
  • AST and symbol support

ABAP Support in Maguyva: Class Graphs for SAP Custom Code

Maguyva parses ABAP with AST, symbol, and graph support, so AI agents can map classes, interfaces, redefinitions, and exceptions in SAP custom code.

Why ABAP is worth mapping before you change it

Custom ABAP often carries decades of business rules. The code is object-oriented in places and procedural in others, and the inheritance and interface structure decides which method runs. Reading one class at a time hides that.

Maguyva gives an agent the class graph first, so a change plan starts from what depends on a class rather than from a guess.

What Maguyva extracts in ABAP

Maguyva parses .abap source with a dedicated ABAP grammar. Symbols include class definitions and implementations, interfaces, method declarations and implementations, and FORM routines.

The graph records the relationships ABAP developers care about:

  • Inheritance from CLASS ... INHERITING FROM.
  • Interface implementation from INTERFACES.
  • Overrides from METHODS ... REDEFINITION.
  • Exceptions from RAISE EXCEPTION and CATCH.
  • Method calls (obj->m( ), cls=>m( ), CALL METHOD), type references from TYPE and TYPE REF TO, and public-section method exports attributed to their class.
  • Reads, writes, and control flow (IF, CASE, LOOP, TRY) inside method bodies.

Example agent prompts

  • “Which classes inherit from zcl_order_base, and which of its methods do they redefine?” (find_symbol, then dependency_search incoming)
  • “Where is zcx_pricing_error raised, and who catches it?” (dependency_search)
  • “Summarise how the delivery-creation flow moves from the report to the persistence class.” (get_task_context)

Known limits

  • Open SQL (SELECT ... FROM ... INTO), EXEC SQL, and AUTHORITY-CHECK do not parse in the current ABAP grammar, so table reads through SQL are not graph edges yet. Use text_pattern_search for table names.
  • INTERFACES clauses are implementation relationships, not imports. Only INCLUDE statements are selected as imports in structural search.
  • Maguyva indexes ABAP that lives in a Git repository as .abap files. It does not connect to an SAP system.

Next steps

Connect a repository with the quickstart, then check the support matrix on the compatibility page. For other legacy estates, see the COBOL guide.

Best fit

  • > SAP teams that keep custom ABAP in Git as `.abap` source files and need to understand it before a migration or clean-core review.
  • > Object-oriented ABAP estates where class hierarchies, interfaces, and redefinitions hide which implementation actually runs.
  • > Agent-assisted impact analysis where the question is "what breaks if this class changes?"

Agent workflows

  • > Map which classes inherit from a base class and which methods they redefine.
  • > Find every class that implements an interface before changing its method signatures.
  • > Trace where an exception class is raised and where it is caught.

Engine details

  • > ABAP is parsed with a dedicated grammar. Classes, interfaces, method declarations and implementations, and `FORM` routines are symbols.
  • > The graph records `INHERITING FROM` inheritance, `INTERFACES` implementation, `REDEFINITION` overrides, `RAISE EXCEPTION` and `CATCH`, and calls such as `obj->m( )` and `cls=>m( )`.
  • > Open SQL, `EXEC SQL`, and `AUTHORITY-CHECK` do not parse in the current grammar, so table reads through SQL are not graph edges yet.

Useful MCP entry points

  • find_symbol

    Use it for a class, interface, or method name when you need its definition and references.

  • dependency_search

    Use incoming traversal on a base class or interface to find subclasses, implementers, and callers before a change.

  • text_pattern_search

    Use it for database table names and SQL statements, which the graph does not cover yet.