Demo on Workflow using Classes

By Richa Gupta, Sparta Consulting

Purpose

To develop workflow using OOPS concept instead of using standard Business Object.  

NOTE: Before following this document, one must have a basic knowledge of OOPS Concepts.

Steps to follow to use Classes in Workflow  

 

How to Create Custom Class  

Here we will be creating a custom class for MATERIAL.

Go to transaction SE24 and create a customized class.

http://www.saptechnical.com/Tutorials/OOPS/InWorkflow/page2.5.jpg

Next the pop up appears where we need to mention the detail as follows:

  http://www.saptechnical.com/Tutorials/OOPS/InWorkflow/page2.6.jpg 

Save it and the class is created.

Now the class is to implement IF_WORKFLOW interface. For this go to the  http://www.saptechnical.com/Tutorials/OOPS/InWorkflow/page2.7.jpg  tab and declare the IF_WORKFLOW as the interface there and press Enter; two sub-interfaces appear: BI_OBJECT and BI_PERSISTENT. Save the Class.

http://www.saptechnical.com/Tutorials/OOPS/InWorkflow/page2.8.jpg

The ZCL_TEST class now contains the existing methods of IF_WORKFLOW interface. 

http://www.saptechnical.com/Tutorials/OOPS/InWorkflow/page2.9.jpg

Also, 2 new interfaces will be automatically added once you add IF_WORKFLOW interface in the class as shown below:

Each method of the IF_WORKFLOW Interface has its distinct functionality, which is discussed below.  

 BI_PERSISTENT~FIND_BY_LPOR Method:  

 Here, to create object, constructor of class needs to be implemented as follows:  

Here, SET_ATTRIBUTES method is called which will be implemented as follows :  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image