Gyan Factory

Gyan Factory
SAP Technical Project Support
Showing posts with label Workflow. Show all posts
Showing posts with label Workflow. Show all posts

Tuesday, January 5, 2016

Workflow : Demo1- Creating a simple workflow

---------------------------------------------------------------
See link Triggering wok flow with business object event 
A simple workflow with send mail step.

Step1. Go to Tx- SWDD








 



Step2. Click on Create button.




Step3. Go to the header by selecting the highlighted button.




Step4. Provide the work flow name and description. Save and back.



Step5. We want to send an email. So double click on the step.


Step6.  From the step selection choose Send Mail step.


Step7. Provide the mail subject and the mail body and then Click on Continue button.


Step8. As send mail is a step in the workflow, provide the step name and description and save in the related package.




Step9. Activate the workflow.



Step10. Now we have to test the workflow to see if it is sending an email or not.




Step11. Usually the email would be sent to the user Tx- SBWP.
Go to the Tx- SBWP and see in the inbox.




Step12. Now execute the test of the workflow.



Step13. Once executed it shows the below message. To see the log click on the Workflow Log button.


Step14. Here is the workflow log. Click on the Graphic button to see graphical view.



Step15. The green line indicates that, the wf stared and the EMAIL STEP - STATUS UPDATE has been executed and wf has been completed.



Step16. Go the user Tx- SBWP and in the inbox we can see there is one document. Double click on that to see its body.


Step17. Here is the mail content that is mentioned in the work flow mail step body.




Workflow : Demo2- Triggering wok flow with business object event


See link : Creating a simple workflow with send mail step

Step1. Create a structure with a field which we will use in the creation of key field of a business object.










Step2. To create business object go to Tx- SWO1.










Provide a new business object name and click on create button.





Step3. provide the details and continue.



Step4. So we have created a business object. Now let's create a key field.



Step5. Put the cursor on the Key Fields and select create button.





Step6. Select no.



Step7. Provide key field name and its text and as technical data type refer to the structure field that we created in the first step. 



Step8. So we are done with the creation of the key field of the BO. Lets create an event in the business object(BO). Select events and click on create.



Step9. Provide the event name and its text and continue.



Step10. Implement the BO and implement the event and generate the BO.



Step11. Now open the our created work flow  [ Creating a simple workflow with send mail step
in Tx- SWDD. Go to the work flow header.



Step12. Go to the start event tab.




Step13.Select the drop down category .




Step14. Choose BO( business object). CL- class wil be used when we wil trigger the event by a class event.



Step15. provide the business object name and the event name which will be triggered to start the work flow. click on the Active button.




Step16. Its turns green. Save and go back.









Step17.  When we trigger the work flow it should execute in the marked way.


Step18. Go to USER tx- SBWP. Clear the documents so that we can easily identify the mail once send  by the work flow.



Step19.  Here is the program which triggers the BO event programatically by calling the function module. Execute .


Step20. Report output.


Step21. check the User tx- SBWP. So here once mail is arrived.


Step22. See the mail content.


Step23. Here some additional steps the developer might check about the workflow that has been executed. Go to Tx- SWI1.









Step24. Execute the report.



Step25. Select the Work flow and click on  log button.


Step26.  To see the graphical view of the work flow click on the highlighted button.


Step27. So here is the execution path.