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: 
faisal_altaf2
Active Contributor
0 Kudos

[Send Auto Mail to Specific User on Creation of every New ABAP Program (CL_BCS) Part 1/3 | Send Auto Mail to Specific User on Creation of every New ABAP Program (CL_BCS) Part 1/3]

Send Auto Mail to Specific User on Creation of every New ABAP Program (Workflow) Part 3/3(Workflow) (Send Auto Mail to Specific User on Creation of every New ABAP Program (Workflow) Part 2/3)[ Part 3/3 | Send Auto Mail to Specific User on Creation of every New ABAP Program (Workflow) Part 3/3]

In this Part we will send mail using Workflow for this we create Structure, Business object and finally workflow. Let's start from Structure.

1. Create Structure

1. For creating structure run T-Code SE11 or SE80. I am using SE80 in below screenshot.

2. Give the Structure name after selecting menu path from the above screen.

3. Give Short Description and Components like below.

*4. *Save it in Same Package

*5. *Add it to same request we created in Part 1.

2. Create Business Object

*1. *Run T-Code SWO1

, below is the Initial Screen of *T-Code SWO1 *give the Object/Interface Type as I am using ZSE38 and Press the *Create button *as shown in below screen.

2. After Selecting Create button on above screen you will see the following dialog box fill the fields as below.

*3. *Save in same Package and Request.

*4. *After Select Continue button from above screen you will see the next screen below. Now we have to create the Event, Place the mouse pointer on Events and Press *Create button *on Tool Bar as in below screenshot.

5. In next screen give the below details and press Continue button.

6. Now Press the* Parameters* button from the Tool Bar.

*7. *You will see there is not Parameter, to create Parameter click on Create button or Shortcut Key F5.

*8. *As we have created Structure so we will select Yes from the below message window.

*9. *Give the Structure name and Press Enter Key or Continue button.

*10. *Now you can see all the fields of that Structure like below

*11. *Because we need all so select all Fields like below and Press the Continue button.

*12. *It will automatically bring Parameter, Name and Description Leave the Name and Description as it is but change the Parameter as in next 6 Screenshots, Press Create button for Every Screen.

13. Now you will see the Parameters of Event like below.

14. For Implement and Release the Object follow the below Menu Path

You may will get the following information messages Just Press Continue button

*15. *Place the Mouse Curser on Event name and for Implement and Release go to the below menu path.

16. Now Select the Generate button from the Tool Bar as shown below you will see the Message on Status bar the Object Generated without any error, Save the object and now you are ready for creating workflow you have done with Business Object.

3. Create Workflow

*1. *To Create Workflow Run T-Code SWDD, following is the Initial Screen of Workflow.

*2. *Follow Steps below to add that created Structure in Workflow Container, Select *Workflow Container *option like in below Screen.

*3. *Double Click on the <Double-Click to Create> option in below screen.

*4. Select the Radio button ABAP Dict. Data Type* and give the same Structure name in text box and save in Element text box.

5. Go to Properties Tab and Check the Check box Import like show below.

6. Now in Workflow Container you will see a new entry with name *ZBAPISE38 *and its all elements like in below screen.

*7. *Now Save the workflow in same Package and Request as below.

8. After Saving Select the Basic Data Button from Toolbar as shown below.

9. Give Abbreviation and Description in* Basic Data Tab* as below

*10. *Go to Start Events Tab and Select Category BO, Object Type ZSE38 and when you press F4 in Event of the object it will automatically bring PROGRAM_CREATE as it is showing in below screen.

11. Now Press the Binding button to Check binding.

*12. *You will see only one Element in Binding you have to add all 6 elements using Drag Drop after it screen must be look like below one, after including all press Continue button.

*13. *From below screen press the Activate button.

*13. Note: *It will demand a Customizing Request we have to create new Customizing request using Create button on the appearing dialogbox below.

Create New Request and Press Save Button.

Now Press the Continue button to save it in new select request.

Now your window will look like below one me Binding is OK and it is Active too.

14. Now come to the main screen of your workflow, Double Click on the Undefined Step as it is showing in the Center in below Screenshot.

*15. *After double Click you will see the dialog box of Step Selection. Select Send Mail from here.

*16. After Selecting Send Mail from above window you will see the following mail window.</p><p>Note:* There are two highlighted button 1st under Subject and 2nd under Body of mail, from these two we can insert the import variable in Subject or Mail body.

When you will select any of the above buttons, below Select Expression window will appear from here you can select any Variable from System Fields or Container.

17. Initially mail will go into the Initiator’s inbox like if user BCUSER will

create program he will get mail of creation program, but because we have

to send mail it to My Team Lead so have to enter his user for this check next 2

Screenshot.

18. Finally after inserting the Variable mail will look like below.

*19. *When you will try to go back to main window of workflow from Mail option you will have to provide the name of task, fill it like below.

*20. *Save it in Same old Package and Request.

*21. *Final Workflow will be like below.

!https://weblogs.sdn.sap.com/weblogs/images/252134807/Send_Mail_at_Program_Creation_074.JPG|height=43...!</body>

2 Comments
Labels in this area