We have recently used the SDK for the ABAP Development Tools to develop UML2ABAP, the prototype of a generator to automatically produce ABAP source code. This generator allows you to describe ABAP classes and interfaces in UML and to generate source code directly into the SAP repository.
UML2ABAP is a plug-in which integrates in the ABAP Development Tools for Eclipse. Users can create UML models from their familiar IDE and use a menu to generate the code into the SAP repository.
An UML class produces an ABAP class with its attributes, operations and inheritance declarations. The implementation section is partially generated: the body of each method is left to the developer who can place its hand-written code between tags. These tags are used by the generator to protect this code during the next generation. The generator also supports UML interfaces.
This video shows UML2ABAP in action :
With this approach, you can leverage UML models which visually describe your application in an language-neutral format. It brings many benefits :
- facilitate the communication with other persons who are not familiar with ABAP
- improve your productivity by automating the production of code from a more concise and high level definition
- avoid coding errors on parts that are automatically generated
In order to simplify the ramp-up of users, we provide a tool-chain as integrated as possible with the classical UI of ABAP Development Tools for Eclipse.
First of all, the generator engine has been developped with Acceleo templates, a technology provided by the Eclipse Foundation (www.eclipse.org/acceleo). It allows you to easily extend the generation strategy to support specific coding rules or new ABAP files.
For modeling, UML2ABAP integrates UML Designer (http://marketplace.obeonetwork.com/module/uml), which provides all the UML2.4 diagrams in Eclipse, with facilities to import existing UML files from other tools.
UML2ABAP is a first step of a tight integration of UML within the ABAP Development Tools for Eclipse.
We are also considering a reverse tool which could create UML models from existing ABAP applications.
Stay tuned for the next steps!
Meanwhile, I would be very interested by any feedback about this approach.
You can contact me : frederic.madiot at obeo.fr