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/3Send Auto Mail to Specific User on Creation of every New ABAP Program (CL_BCS) Part 1/3Send 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/3Send Auto Mail to Specific User on Creation of every New ABAP Program (Workflow) Part 2/3Send Auto Mail to Specific User on Creation of every New ABAP Program (Workflow) Part 3/3

 

In this part we are going to send workflow to the user from where he will be able to see the created program in display mode, for this we have to follow the steps below.

1. Create Function Group and Function Module (BAPI)

1. Go to T-Code SE37 and Follow the Menu Path in below Screen to Create Function Group.

2. After Selecting Create Group you will see the following Popup Message give the Values like below and Press Save Button.

3. Save it to same old Package and Transport Request as below.

 

4. Now in Same T-Code SE37 Give the Function Module (BAPI) Name and Press Create button as shown in below screen.

5. Give the above created Function Group name, Short test and press Save Button.

6. May you will get the following message Just Press Continue Button as in below screen.

7. Go to the Attributes Tab in Function Builder and Check the Radio button Remote-Enabled Module as in below Screenshot.

8. Now go to the Import Tab and give the Program Name (PNAME) as Import Parameter give type ZBAPISE38-PNAME and Check the Check box of Pass Value.

Note: We can't pass by Reference in Remote-Enabled FM (BAPI).

9. In Tables Tab give the RETURN Parameter as Shown below.

10. Now Save and Activate Both Function Group and Function Module. Following Three Objects have to be activated.

11. Add Following Lines of Code in Source Code Tab.

12. Release the FM (BAPI) after Activate using the Menu Path shown in below screen.

13. You will get the following Released message in Status Bar.

2. Add Method in Business Object

1. Go to T-Code SWO1 and open you already created object ZSE38 in Change mode and add Method using the Manu path below.

2. After Selecting above path you will get a popup to get the Function Module name give the Function Module name as below and press Continue button.

3. Following window will appear after above step Fill all fields like below and press the Next Step Button.

4. This time it will show you the Parameters Leave it as it is and press Next Step button.

5. After above screen you will get the following message box for Implementation of the Method So Select Yes.

6. Now Release the Method from below Menu Path.

Note: You may will have to Implement and Release Event and Object Type again as we did in Part 2/3

3. Add Activity in Workflow

1. Open your old workflow in Change mode using T-Code SWDD. Right Click mouse button and select Create option from the Menu as shown below.

2. From Step Selection Window select Activity.

3. Following Activity Screen will appear after above step.

4. Create task

4. Create task using the way mention below.

5. When you will select Create task the task creation window will appear fill the required field like below.

6. When you press Enter key after giving Method in above screen following message box will appear for Missing Elements, Press Yes.

7. Now You can see Binding Object Method button there like in below screen, select this button for Binding.

8. Following Binding window will appear select the Both Generate Automatic Binding button as shown below.

9. After Generation it will look like below.

10. Now for Save Task Press Save button like below.

11. Save in the Same Package and Transport Request like below.

 

12. When you will select the back button from the task creation window you will see the following Binding window leave it as it is and press Continue button.

13. For giving the user who will receive this task follow next 2 screens, you can give any user as I am giving AMAJEED my Team Lead.

 

14. Because we are getting program name in ZBAPISE38-PNAME while creating program so have to do little change in Binding, for this select Binding (Exits) button.

15. Drag and Drop the PNAME under ZBAPISE38 as mention below and Press continue button to go back to Activity.

16. For Agent assignment select the button highlighted in below screen.

17. From the Toolbar of next window select Attributes... button.

18. From the Popup box check General Task Radio button and select Transfer Button.

19. Your Activity is final now Press the below Highlighted button.

20. When you will come back to Main Workflow window you will get the following error messages, we have to Check the Import Export Check box of all these Container element, for this Double Click on all these three on by one.

21. When you will double Click following window will appear go to Properties Tab and Check the Both Import and Export Check Boxes for all three like below.

 

 

22. Your Final Workflow will look like below one it will send a mail and activity. you can create a program using way mention in Part 1/3 and check your Inbox.

23. When you will create program this time Receivers Inbox will look like below, You have received one Document and one Workflow.

When you will double click on Document it will show you the following display of mail

When you double click on Workflow Item it will open up created program in display mode like below.

1 Comment
Labels in this area