In the next few installments of this blog I will be inviting a good friend of mine William Craig to teach us about ABAP Object Oriented coding and custom workflow development. Here is a little bit about Bill….
Bill Craig is the president of ASAP Consulting Inc., located in Centennial, Colorado. Bill has over 10 years of experience with SAP ECC systems and integration with SRM. His areas of expertise include SAP Business Workflow and ABAP development. He made his way into programming as a COBOL programmer, switching to SAP when the company he worked for migrated from mainframe programming to SAP. Prior to programming, Bill ran an upholstery shop in Denver, where he managed the workforce, payroll, sales, scheduling and delivery. You can reach him at email@example.com
Using ABAP Object Oriented Coding in your Custom Workflow
SAP Business Workflow was built on an approximation of object orientated programming called the Business Object Repository or BOR. It uses object oriented techniques which allowed developers the ability to create copies of standard BOR objects, modify them and through inheritance allow them to be used in place of the standard.
This was my comfort zone. I learned SAP and ABAP programming using BOR (Business Object Repository) objects, creating attributes, coding methods, and developing workflows to meet my client’s needs. As a workflow consultant I was special, as most of my ABAP friends felt intimidated by the concept of workflow and using Business Objects. However, as I enjoyed my specialized skill, I started doing a lot more ABAP development apart from workflow, and realized the new tools such as the ABAP workbench were much easier to use that the Business Object editor.
When I used the Business Object Editor I felt I was going back towards my COBOL days of 72 column limitations. How free I felt being able to write code that continued right past my visible screen. Then came ABAP OO, and I started to realize my version of object oriented programming, was a far cry from where SAP was heading. I was an old dog! I enjoyed the ABAP workbench, but at the same time I intimidated by what seemed to me as a completely new programming language.
ABAP OO and Workflow – The Turning Point
A couple of years ago, I was working with a Workflow consultant who I did not know, and as soon as he was done with his first workflow I decided I would take a peak to see what level of developer was on our team 😉
Well, I opened the workflow, went to the triggering events, and saw an ABAP class rather than a BOR as the triggering event. I drilled into the class, saw all of the methods, attributes, types, events, and realized all of his tasks used this class as well. As I looked at the workflow I was immediately impressed. While I had been relying on my use and knowledge of BOR, this Workflow consulting had taken the next step and was using ABAP OO for everything. At that point I decided I needed to figure out how to use this new technique, and force myself to learn using ABAP OO in this way.
Why Use ABAP OO for SAP Business Workflow?
Now that I had a mission, I had to figure out what the advantages of using ABAP OO had over BOR. As I started investigating, reading blogs, workflow books, and looking at our current SAP system, I started to find that SAP was using ABAP classes for many of their own workflow processes, and most of their code base was now ABAP OO.
I kept on seeing was that the code was easily maintained by ABAP programmers without workflow knowledge, A huge advantage! I had to think about this one. My lively hood depends on the fact that clients need workflow specialist. But as I continued pondering this dilemma, I also came to the conclusion that if I did not start to learn this, I would not be able to maintain the newer workflows that utilize ABAP OO. In addition, if I could master ABAP OO I would be able to broaden my skill set and my own marketability.
I have worked with various customers and clients over the past decade and I have noticed that most of the workflows that I have developed aren’t as much about delivering decision tasks to the correct people, but rather automating a complicated set of procedures that cross various functional areas of responsibility. This is where ABAP OO can really help. Complex code used for common business processes is much easier to access and reuse with classes and methods instead of the traditional BOR Editor.
Now please do not misunderstand me…. There is still a need for BOR and the use of it in SAP Business Workflow. A lot of business processes have been built on this foundation, and to replace them with ABAP OO would not make fiscal sense, as the cost of developing, testing, and the disruption to current processes would be too great. So when a new requirement came along which did not have a current workflow I could build upon, I took the plunge and built it using ABAP OO.
Now that you can have a good understanding of how SAP Business Workflow can benefit from using ABAP OO, the next blog will get into details on how make a custom class usable in workflow examples as well as how to create events and start workflows using ABAP OO.