Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
MarkusPeter
Explorer
0 Kudos

 

The first parts of this series on Partner-delivered Enterprise Services focused on modeling and defining services using the Enterprise Services Builder, a tool which is part of the Enterprise Services Repository toolset. The last two parts explained how to implement a service interface defined during this process using SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing Serv..., respectively SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing Serv....

This part of the series will show you the steps necessary to implement a service interface in ABAP. The service interface defined in SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Defining services... serves as an example. As technology platform, a SAP Netweaver 7.0 EhP1 ABAP system is used, which includes the required development toolset ABAP workbench.
If you an SAP Netweaver ABAP system with release 7.0 SPS13 or lower, you can essentially follow the same steps, although some screens may look slighty different, with the exception of how to release the service.

To see how to implement a service an ABAP and thus continue your PdES journey, have a look at the following screencam (33'49''):

The detailed storyboard is outlined in the following:

  1. Configure the connection from your ABAP development system to the Enterprise Services Repository. An easy way is to create an RFC destination SAP_PROXY_ESR that points to the Enterprise Services Repository.
  2. Start the ABAP workbench. Switch to the Transport Organizer view and create a workbench request.
  3. Switch to the Repository Browser view and create an ABAP package to contain your service implementation.
  4. Switch to the Enterprise Services Browser view, and generate "proxies" for your service definition.
    Make sure to enter a reasonable name prefix for the ABAP repository objects (classes, interfaces and data types) to avoid name clashes with existing ABAP objects. Adjust the proposed names such that your ABAP code stays readable.
  5. Implement the service interface by adding the appropriate code to the generated proxy class.
  6. Perform an easy test directly out of the ABAP development workbench.
  7. Release the service using transaction soamanager, i.e. create a service endpoint.
  8. Test your service implementation. A convenient way is to use the Web Services Navigator (requires JEE installation).

For more details on providing stateless web services using ABAP, see the SAP Help Portal. For a more comprehensive introduction into Enterprise Services implementation using ABAP, you can also check the upcoming SAP-Press book Developing Enterprise Services for SAP (the German edition Entwicklung von Enterprise Services für SAP is available since April).

Below you find the sample code used in the service implementation implementing the proxy class' skeleton method:

Note that when service-enabling existing functionality, you would usually

  • First convert the input message into the importing parameters of the existing functionality's API
    Best practice is to use a dedicated method for this purpose
  • Then call the existing functionality's API
  • Then convert the exporting parameters of the existing functionality's API into the service's output message
    Again, best practice is to use a dedicated method for this purpose

To keep this example simple and close to the Java sample or part 6, the above code snippet directly creates a sample order, though.

Ride in the tube of SOA and learn how to deliver your services based on SAP's modeling and definition methodology. Stay tuned for more information and a wrap-up of this series with the next blog "Summarizing the PdES Architecture Series".

In the following the links to all blogs and screencams from the PdES Architecture Series:
1.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Introduction (Part... - Screencam
2.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Outlining the ‘way...
3.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Service - Modeling Services ... - Screencam
4.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Defining services...  - Screencam
5.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Leveraging a wiza... - Screencam + Wizard
6.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing Serv... - Screencam
7.      SAP Co-Innovation Lab Architecture Series: Partner-delivered Enterprise Services - Implementing Serv... - Screencam
8.      Implementing Services in ABAP (This Blog) - Screencam
9.      SAP Co-Innovation Lab Architecture Series: Custom Development delivered Custom Enterprise Services (... - Screencam
10.    The specified item was not found. - Certification

2 Comments