ABAP Magic Models
After reading a lot about Rails and it’s former inclusion (thanks to Tom and Ryan) of a bunch of REST functionality into the next release and a blog by Dr. Nic about his Magic Models project I’ve decided to embark on a new project.
Simply put I want Dr. Nic’s magic models for ABAP. The basic idea behind the project is that RoR developers should be able to easily consume ABAP objects. Current solutions only create the ability to call RFCs, which if you are not an ABAP person are totally procedural elements so, this removes any of the beauty of OOP from systems you can build that interact with ABAP. With this project I hope to put it back. In the end what you should be able to do on the RoR side is create a config file to point to your SAP instance and then make calls like this:
@abapObject = Zcl_foobar.new
@abapObject.callMethod( with, some, params )
Where Zcl_foobar is the name of class that resides only on the ABAP system. What this will allow a RoR developer to do is simply and quickly access classes from ABAP without having to have an ABAP person wrap every method call in a function module. In the background Ruby is using the const_missing method to generate a generic class for Zcl_foobar. When a method is called the call is converted into a specially formatted REST call to an ICF Node ( basically a servlet ) on the ABAP side and ABAP responds to the message with another XML document that the newly generated class understand and unpacks into more Ruby data objects.
For now I am only building a “connector” to the Ruby programming language but, there is nothing to prevent the addition of other scripting languages from using this method and the base ICF node to accomplish similar feats. Over the next month or two I will be focusing almost all my time in taking this from it’s current stage, simply a proof of concept to a fully working system.