Step0. We have the structure.
This structure has to be used in the class method.
Step1. Go to Tx- SE24 and create a class.
Step2. Provide the description and save.
Step4. To enable a class to trigger work flow, it has to implement interface IF_WORKFLOW. When it is implemented it also implements INTERFACE : BI_OBJECT and BI_PERSISTENT.
Step8. Define constructor importing parameter.
Step12. Implement the method.
Call the standard class CL_SWF_EVT_EVENT=>RAISE to raise event.
Step13. Now define the method FIND_BY_LPOR.
Step14. Put below code.
Step18. Go to the workflow header in Tx- SWDD.
Step19. Here initially we triggered by business object event. Now we have to change with Class event.
Step20. provide the class, event and activate it. Go Back.
Step24. In Tx- SBWP we have received an email. Double click on it.
Step25. So its the mail body send by the work flow.
Step26. Go to Tx- SWI1 to see the work flow log.