When the workflow starts you have an instance of the BOR object which is defined by the key fields that were instantiated and passed during the normal event creation. Now you want to instantiate the class which you are going to utilize. Leveraging the class we developed in the previous blogs, create a method that has in input parameter as which is the key to the class, and an export parameter that is a type reference to your class. The method ‘CREATE_INSTANCE’ is defined as static and public.
asap consulting
Creating a class that can be used by workflow is a little more time consuming than creating a copy of a standard SAP Business Object and delegating your new object, but once you have done it a few times it is rather simple and allows you to utilize ABAP OO.
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.