Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_jung
Developer Advocate
Developer Advocate
Introduction
I read Renald Wittwer very nice weblog this morning on how to Develop a Web Service that sends an Email. The author gave a very complete walkthrough of how to create this Web Service in the WebAS Java Personality. I thought it might be fun and interesting to take the exact same example in recreate it in ABAP as a WebService. Please note that this example is from a WebAS 640 system and uses new functionality that is only available as of 640.

Updated!The process described in this weblog was done on a Netweaver 04 system. The screens and steps are different for Netweaver 04S. Have a look at Develop a Web Service that sends an Email - in ABAP, Netweaver 04S.

Prerequisites
-WebAS 640 ABAP personality -Configured Email Setup in the WebAS ABAP - See Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface

Create an ABAP Function Module
1. Go to SE80.
2. Create a new RFC enabled Function Module



3. Importing Parameters


4. Exporting Parameters


5. Program Coding



Create a Virtual Interface
1. From SE80 Choose other Object
2. Go to the Enterprise Services Tab
3. Choose Virtual Interface, enter a name, and then hit create



4. Fill in the Virtual Interface Parameters, linking it to the function module we just created.



5. We now have our generated Virtual Interface



Create a WebService Definition
1. From SE80 Choose Other Object
2. Go to the Enterprise Services Tab
3. Choose Web Service Definition, enter a name, and then hit create



4. Fill in the Web Services Parameters, linking it to the Virtual Interface we just created.



5. We can now set our Features for this WebService. However for this example we will keep everything at the defaults.





6. Optionally, we can also publish our WebService into an external UDDI server at this point.



Releasing our WebService
1. Now we are ready to go to Transaction WSCONFIG to release our Web Service Definition.



Testing our WebService
1. We can now go to transaction WSADMIN to view the WSDL file or test our WebService.



2. We can also call our WebService from another programming tool. In the screen shot below we see it in use in Visual Studio .Net.



19 Comments