SAP2Moose
An ABAP program that extracts model data from a system as a SOMIX model, for Moose2Model to draw as a dependency diagram.
Seeing how the classes, packages and tables in a system depend on each other otherwise means reading through them one at a time. This program is pasted into a new program in the system from three files, then run to select a package and download the result, preferably with the extension .mse; opened in Moose2Model or Moose Analysis, it renders diagrams with methods, attributes, classes, packages, Web Dynpro ABAP and database tables. Since release v1.0.0 it also extracts ADT links to ABAP classes and their components, which Moose2Model v0.2.0 is required to use. An earlier release, v0.5.8, added a where-used analysis over multiple levels, which the maintainer calls an early version that is incomplete and should not find all dependencies. Extraction to a FAMIX model is still possible and will soon not be supported any more.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1@SAP2MoosemaintainerLars HvamContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1@larshpRainer WinklerContributes to this
In the atlas: contributes to 2@RainerWinklerAlex S.Contributes to this
In the atlas: contributes to 1@sabatale3 contributors
What it declares
Every artifact
- Type
- App
- Origin
- Independently maintained
As an app
- Where it runs
- Inside the system it serves
- Distributed through
- Copied into the projectabapGit
Connections
Turning a data or code model into a readable picture
Git client written in ABAP that runs inside the system
Download
README
quoted from SAP2Moose/SAP2Moose under MIT, readThis project is actively maintained and used (02 September 2025). Please open an issue to get support :-)
Installation to analyze applications
Create a new program in your SAP system. You need only the files z_moose_extractor.abap, z_moose_extractor_texts.txt and z_moose_extractor_documentation.txt. You find the most actual version on the tab Code. Or go to releases to get the code of a certain release.
Open file z_moose_extractor.abap with a text editor and paste the coding in your program. Add texts and documentation of the report for convenience using the other files. The documentation contains example which you may use for a first test.
You typically will run the program, select a package and download the file (preferable with extension .mse). The result is displayed by the report. To create diagrams, open with Moose Analysis or Moose2Model to analyze it.
SAP2Moose
This repository provides a program to extract model data from a SAP system to a SOMIX model. The SOMIX model can be used in the new version of Moose2Model. (An extraction to a FAMIX model is still possible but will soon not be supported anymore. To use the analysis platform Moose on Pharo Smalltalk it can still be used. You may also enhance Moose and load the SOMIX model to Moose.)
This is not a tool made or owned by SAP.
With Moose2Model diagrams like this can be made:
Currently diagrams like this can be generated (With methods, attributes, classes, packages, Web Dynpro ABAP and database tables):

Documentation
Example how to analyze a class method:

The documentation is in the Wiki of this repository (Switch to the tab Wiki).
The architecture documentation is here.
General
There are currently not many changes in the extractor, just because I am happily using it nearto every day (Rainer Winkler).
Last stable release v1.0.0: Extractor and Texts for extractor.. This is the first release where ADT links to ABAP classes and class components are extracted. Moose2Model v0.2.0 is required to use this links.
Earlier release v0.5.8: Extractor and Texts for extractor.. This is the first release where data can be analyzed without using Moose. It also provides a Where-Used analysis over multiple levels. This is an early version that is incomplete and should not find all dependencies. 
Compatibility
ABAP releases higher than 7.02 SP6.
There may be minor issues in older releases due to eroneous usage of modern ABAP statements, this should be easy to be fixed. You can do it yourself or open an issue for this.
Installation to participate in development
Use abapGit to install the coding in a local system. The package name has to be Z2MSE (Required so that test objects have the correct names). The folder logic is prefix, but you should still use package Z2MSE to ensure that all tests work correct.
abapGit for development
This repository will use abapGit for all objects relevant to the development. The extractor itself is a simple program and can be installed with copy and paste. See wiki for details.
Further
The local classes of the extractor are now generated using global classes. This allows ABAP Unit to be used to improve the quality and reduce the time needed for implementation. There is now also a new program z_moose_translate_to_local for this conversion. This program can also be used for other projects.
See Blog on SAP developer network.
Mailing list
Please join the Google Group https://groups.google.com/g/somixsuite to get updates about the tool and contact other users.
Thanks
I would like to thank especially:
Damir Majer for many helpfull discussions and especially for inviting Tudor Girba to the SAP Inside Track Munich 2015, thus indirectly initiating this project
Tudor Girba for many valuable informations and tips on how to use Moose and FAMIX
Enno Wulff for making a 7.31 version available and many discussions to improve the extractor and to give hints on what can be done
And all colleagues that made this tool possible!
Funding
CubeServ is encouraging and supporting this project.
History
Other 1
Notes
Fixes
- Source Language not exported (isSmalltalk was sent to nil in new Moose) #110 This is helpful to work with Moose on Pharo 7
Notes
With this release the logic to search into the "other direction" is now provided (down search, who is used by an element). There are some other small bugfixes and improvements. Due to them the "Upsearch", this is the search who is using an element is now much faster.
Notes
Contains the fix to issue "No elements extracted if package starts with $ #85". This is mandatory to extract models from local packages.
Other 3
Notes
13.02.2018 v1.1.0
Contains the following improvements:
- Support programs better #53 Programs that are used by other programs or coding are now extracted together with their usage
- Support functions in more detail #52 Functions are now displayed together with elements that use them
- Support elements with equal names #84
Notes
New feature to show dynamic usages in the diagrams: Add dynamic calls to the model #80 A new parameter "Classes to read dynamic usages" is available. Add a list of class names here separated by blanks. Each class has to have a static method WHERE_USED with an export parameter data of type any table that is passed by reference. Internally the method has to build a table of type: TYPE STANDARD TABLE OF wbcrossgt WITH DEFAULT KEY, that is to be passed to the export parameter data. This table has to fill the fields otype, name and include of the internal table like this is done by the where used analysis in table wbcrossgt. See also this example for a class that provides dynamic usages:
CLASS z2mse_test_dynamic_usage DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. CLASS-METHODS where_used EXPORTING !data TYPE ANY TABLE . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS z2mse_test_dynamic_usage IMPLEMENTATION. METHOD where_used. " Example of a method to transfer dynamic usages to the extractor DATA: dyn_usage TYPE STANDARD TABLE OF wbcrossgt WITH DEFAULT KEY, line TYPE wbcrossgt. CLEAR line. line-otype = 'ME'. line-name = 'Z2MSE_TEST_CL_A\ME:CONSTRUCTOR'. line-include = 'Z2MSE_TEST_CL_B1==============CM002'. INSERT line INTO TABLE dyn_usage. CLEAR line. line-otype = 'ME'. line-name = 'Z2MSE_TEST_CL_A\ME:METHOD_A'. line-include = 'Z2MSE_TEST_CL_B1==============CM002'. INSERT line INTO TABLE dyn_usage. data = dyn_usage. ENDMETHOD. ENDCLASS.Notes
Fix bug in older releases
Notes
See Methods that are redefined are not part of the extracted model #67 and the changelog
Notes
Fixes Issue 75 Release v0.5.4 is not compatible to ABAP 7.0.2
Notes
Includes: Issue 73 Make modifiers for programs, function groups and SAP BW transformation specific Issue 72 Map functions to classes with name of function group Issue 71 Support ADT links to programs, functions and includes of function groups
Notes
It is now possible to open SAP BW transformations that are part of the extracted model directly in the SAP-BW project in eclipse. (Click on the "method" that corresponds to the transformation in the Moose2Model diagram and call RWDiagram openLinkTo: self.) Requires that linking is enabled in Moose2Model and the settings of Eclipse are so, that ADT links are executed.
Notes
Contains the fix #68
Notes
With #63 ADT links for classes and class components are added. Moose2Model v0.2.0 should be used, see also https://blogs.sap.com/2013/05/10/how-adt-links-change-the-way-you-work/ on how to activate and use ADT links. ADT links work currently only on Windows systems.
With #65 the links are compatible to Moose 6.0
Notes
With #63 ADT links for classes and class components are added. Moose2Model v0.2.0 should be used, see also https://blogs.sap.com/2013/05/10/how-adt-links-change-the-way-you-work/ on how to activate and use ADT links. ADT links work currently only on Windows systems.
Notes
Fix issue #62 "Usages by Interfacemethods not found if name longer than 30 characters" Adds #48 "Add usage of interface components"
Notes
The extraction coding had syntax errors in older releases. This is corrected.
Notes
Provides informations on the extracted elements using SAP Gui only. This functions will be improved with future releases. Nonetheless it can already be used to perform a Where-used analysis for multiple "layers". This is an early release that will not show all usages in all cases.
Notes
Mandatory error corrections to extract ABAP interfaces correctly
Notes
With this release it is now possible to use the extractor without drawing diagrams in Moose.
A first use case is specifying either a class element or a table and analyzing all using elements (Downsearch is prepared but not yet implemented). This can be done without exporting to Moose.
Please keep in mind, that this is an early alpha version. The report may not yet find all relevant dependencies.
Usage by Programs, Functions and SAP BW is also in an early stage of implementation and not yet finished.
Notes
See changelog.txt for details. Starting with this version a new logic to handle the extraction is used. This is a major improvement to the architecture used in v0.2.1. Starting with this release adding new functions will be much easier. This is also the first release where usage by components of the "outer world" will be added. With "outer world" elements are meant that are not regularly part of the standard where-used functionality.
Notes
Fixes a bug that caused a dump when an interface with event is part of the selection (#45)
Notes
The main coding for extracting the where-used information is now completely rewritten. The application has now a very high coverage with Unit and Integration tests.
The extractor works in a ABAP 7.02 system (But no full test is done yet on release 7.02)
The extraction is still limited do classes, methods, attributes, database tables and Web Dynpro components. Interfaces are better covered compared to version 0.1.0.
Notes
Extracts packages, classes, methods, attributes, tables and WebDynpro ABAP. Maps these to package, class, method and attribute. Extracts also programs and maps them to module.
Analyses where-used-index but only in one direction (used by).
Has limited functions and may have bugs. But is useful to extract packages and understanding the limitation. Is used successfully in a project for at least three month.
Others providing
Compare all 4 on the Model visualisation page →- ZUML_DIAGRAMZUML_DIAGRAMAn ABAP program that draws a UML class diagram of chosen objects, rendered over the internet through PlantUML and shown inline in CL_GUI_HTML_VIEWER.independent, abapABAP program drawing UML class diagrams through PlantUML
- ABAP Search and Analysis ToolsABAP Search and Analysis ToolsAn Eclipse plugin with an object search dialog over repository objects and a view that analyses CDS views top-down and answers where-used questions, fed by its own ADT backend in the system.independent, abapEclipse plugin for ABAP object search and CDS view analysis
- abapgraphabapgraphAn ABAP library for creating Graphviz graphs, written to give the maintainer's own ABAP debugger object graph extension a more compact layout, with demo code as its documentation.independent, abapABAP library for creating Graphviz graphs
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
Flavors
“ABAP releases higher than 7.02 SP6.” — SAP2Moose/SAP2Moose — README, Supported releases
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap2moose-sap2moose- JSON
- /artifacts/sap2moose-sap2moose.json
- MCP
- Connecting an agent