From ABAP to Flex
After seeing my tweets(@RichHeilman) over the past several months, a few people have asked me about what I’ve been working on related to Flex. Most of the readers here recognize me as an ABAP developer more than anything else, but for the last half of 2008, I took a break from ABAP and dove into the Flex world. This was great for me, as I wanted to learn Flex anyway. I was charged with the task of creating a suitable grid control for Xcelsius using the Xcelsius SDK and Flex 2. Basically my team(SAP BPC Solution Management) wanted to create Xcelisus models and embed them into the SAP BPC(Business Planning and Consolidations) product, but the grid control which is delivered by Xcelisus is not quite what we wanted. It is not very visually appealing.
I was the only one working on this piece of the project, so my first task was to actually learn Flex. I would describe the learning experience as better than learning java and not as good as learning ABAP. No surprises there, I guess. I like Flex a lot, but found myself missing ABAP when it comes to simple things like internal tables. I actually learned a lot by reading the book, Adobe Flex 3: Training from the Source. If you are looking into learning Flex, I would highly recommend this book.
So once I had a basic understanding of Flex ( MXML and ActionScript ), it was time to start playing around with the Xcelsius SDK. The SDK helps in making connections between the actual UI component, its property sheet, as well as enables cell binding to the excel spreadsheet in the Xcelsius designer. You then create the components using Flex Builder. The Xcelisus Add-On Packager, which also comes with the SDK, allows you to package all these pieces into one component .xlx file. This component .xlx is then added to Xcelsius using the Add-On Manager, and as you can see in the image to the right, you can then use them like any other component which Xcelsius supports. The .xlx file is the only file that the end user requires to use the BPC Data Grid in an Xcelsius model.
After doing some prototyping, I started coding the actual development. First, I had to create the actual grid UI component which will be the visible runtime component. Second, I had to create another flex component which would be the property sheet. which would allow the user to change attributes of the grid component at design time. Here is where the Xcelsius SDK comes into play. Basically it consists of a handful of methods that you use to create the cell bindings in Xcelsius as well as connects the property sheet component to the actual UI component. It also contains documentation about how to use the SDK. As you can see in the below image, this grid component looks a lot like the DataGrid component in Flex. The reason is that the BPC Data Grid extends from that component. We plan on adding more features to the BPC Data Grid, but for right now, we just wanted to get the baseline grid working. Some features that we get for free that the existing grid in Xcelsius does not support are things like, a true column header, sorting, re-arranging columns, and row selection. This grid is fairly simple and implements a lot of what the existing grid has, but at least it has a column header. On the right side is the property sheet which is the separate flex component. It has four different tabs to work with, and allows you to set other properties of the grid as well. Mostly, the properties are the standard ones delivered with the Flex 2 DataGrid component.
Here is an example of an Xcelsius model which is using the BPC Data Grid as well as other standard UI elements which it also interacts with. For example, If a row of the grid is selected, the appropriates changes are made to the line chart below.
A How-To guide about how to consume BPC data using Xcelsius, as well as a demo video, have been published on SDN. This How-To guide also contains the BPC Data Grid component(.xlx file) which you can install into Xcelisus using the Add-On Manager. This is NOT an official SAP development, hence the reason why it is released via SDN, and not the service market place. Of course, this also means that it is not supported by SAP Global Support either, so don’t try it.
All-in-all, I think this project went pretty well, and I am happy with the results. I learned a lot about Flex and also the fundamental concepts used in developing RIAs. At some point, I will be adding new features to this component, and of course fixing bugs as well. I also plan on doing a new release when/if Xcelsius starts supporting Flex 3.