Introduction

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).

/wp-content/uploads/2015/02/uml01_645151.png

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.

/wp-content/uploads/2015/02/uml02_645218.png

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.

  1. Start the program and enter a class (e.g. CL_UML_CLASS_SCANNER) which should be exported.
    /wp-content/uploads/2015/02/uml03_645219.png
  2. Choose the required XMI version.
    /wp-content/uploads/2015/02/uml04_645220.png
  3. Import XMI file to a supported UML tool.
    /wp-content/uploads/2015/02/uml06_645227.png
  4. Finished
    /wp-content/uploads/2015/02/uml07_645228.png

Conclusion

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.

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. Jacques Nomssi

    Hello Florian,

    thanks for sharing.

    which tool are you using that support XMI ? I implemented a plugin to export the UML class diagrams to PlantUML. The text format is easier to edit manually. I also consume the web service to display the image.

    But this solution still requires JNet, so I have integrated the functionality within your report. Check the last report on this wiki page.

    regards,

    JNN

    (0) 
  2. Suhas Saha

    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.

    “some easy changes” …. Nahhh! 😉

    (0) 
  3. Dirk Tyriard

    Look at following notes, Jnet & JGantt no longer in JRE 1.8, with those note no longer need to install them for your GUI but web-services will be called:

    • 2103687 – New implementation of JNet and JGantt in SAP GUI for Windows
    • 2105752 – Abap corrections for note 2103687
    • 2103687 New JNet and JGantt
    • 2105752 AbapCrrctns4Note2103687
    (0) 

Leave a Reply