Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Scenario: Whenever a new record is created a workflow is executed which sends a mail to desired user intimating about the new record.


  1. Lets create table with emp id as key field.     

    

     2. Create the table maintenance generator for above table.

     

     3. For triggering the work flow we need to create an event. From below screen shot create an event. 

              

     Our scenario is generating a workflow whenever a record is created. So Event is creating a new entry.
        

    

     The code is to change the start date field to sy-datum and create an event using the function module SAP_WAPI_CREATE_EVENT.

     Once the  event is created it is linked to workflow. So click editor button .


     Write below code:

  

    

     4.Now we need to create a business object. Go to Tcode: SWO1 and give the name and press create button:

    

     5. Create an event and release the business object.

    

     6.  Now we need to create a work flow definition using workflow builder. Go to tcode: SWDD. By default last workflow will be there.           Create a new one and save it.
    

 

     7.Need to create an event by using basic data button on application tool bar as below.

    

     8.Activate the start events by clicking A button.

    

     9.   Do the binding now by clicking the B button. 

    

      

10. Now we need to do the agent assignment by clicking the on application tool bar.

     Click on attributes button    
    

     Go back and save it.


 

     11. Now workflow looks like:

    

     12. Add the Mail step type

    

     And press transfer to graphic button.


     13. Now workflow looks like as below:    
        

     Activate the workflow.

     Testing:          

     Create a record in SE16

    

     and save it. Now a mail will be triggered in tcode SBWP as below:


    

    



    

10 Comments
Labels in this area