Did you ever have the situation that you are working on a customer system landscape were you wanted to export an UML class diagram for a package, but the necessary JNet was not installed? I had that situation several times now and it was always a big effort to install JNet or it was not done, because it was to much effort to add the configuration to the automated software installment process in the customer landscape.
Therefore I decided to write a little program which allows me to export UML class diagrams to an XMI format, which can be then used for an import to an UML tool. For me that is a big advantage for the documentation of the system functionality, because I must not create/adjust the class diagrams manually in the UML tool.
The problem with missing JNet …
In the ABAP Workbench the functionality is available to display an UML Diagram (Context menu on package name -> Display – UML Class Diagram).
This functionality starts the report UML_CLASS_DIAGRAM which analysis (depending on the made settings on the selection screen) the classes/interfaces and tries to display them with JNet integrated in the SAP GUI.
In case JNet is not installed (not installed by default with SAP GUI) you get just a list of the analyzed objects, but not the diagram. The main problem is that without JNet the report cannot export the diagram for further usage.
The current solution for me to export an UML diagram w/o JNet …
I created a little report based on program UML_CLASS_DIAGRAM which uses the ABAP standard class CL_UML_CLASS_SCANNER, CL_UML_CLASS_DECOR_XMI and CL_UML_UTILITIES to export an UML Class Diagram to XMI format without JNet.
You find the sources in a SAPLink nugget file in repository https://github.com/pfefferf/abap_uml_class_diagram_export_to_xmi. Just import the SAPlink nugget. But please be aware that I did not invest so much time and effort to make it stable for each situation 😉 . Please consider also that the program was implemented on a NW 7.40 SP08 system, so if you wanna use the program on a system with a lower release some easy changes have to be done.
So I can do following now.
- Start the program and enter a class (e.g. CL_UML_CLASS_SCANNER) which should be exported.
- Choose the required XMI version.
- Import XMI file to a supported UML tool.
With a simple usage of exiting ABAP classes delivered with the standard installation it was possible to create an UML class diagram export in XMI format. This solves for me much time and I do not need to “fight” to get a JNet installation in customer environments. If you have any comments, please let me know.