The Right Way to Create Web Services from Function Modules
The two main ways of developing Web services in the ABAP environment are often referred to as inside-out and outside-in. Inside-out refers to taking existing functions – for example, remote-enabled function modules and making Web services out of them. However, the recommended way of development is normally outside-in – that means modeling the service first and then implementing the methods.
The big advantage of the model-first approach is that you have complete control over the signature of the service. If you simply take an existing RFC function module and let the interface be generated, you have no influence over how it looks.
Since SAP NetWeaver 7.02 you can model in the ABAP environment and expose only what you want of your function module.
Metadata Repository (MDR)
The Metadata Repository is integrated in SE80 and is a local repository. This is in contrast to the Enterprise Services Repository (ESR), which is by its nature a central repository.
Some types of users who might be interested in MDR:
- Customers who do not use SAP middleware, and have been creating Web services in ABAP using generation from remote-enabled function modules.
- Customers who use SAP intensively, have a strong governance team, have SAP NW PI and the ESR but want to do a proof-of-concept development that requires minimal effort regarding governance, infrastructure, and so on.
- Partners and consultants doing in-house development before moving objects to customer systems. For example, when the customer’s development system is not available for the start of the project.
Improvements in SAP NetWeaver 7.4
If you have been using the Metadata Repository in earlier releases, you may have noticed that displaying all the objects of large services can take a fairly long time. To make working with such services much smoother, only the higher level objects are now displayed by default and a sort of lazy loading has been introduced so that objects are loaded and displayed as required. Of course you can still choose to “Load All” (you can find this on the Objects tab) and wait a bit – then you have everything to hand as before.
The search functionality for enterprise service objects in SE80 is also much improved. More detailed search criteria are possible and you can search for more object types. For example, you can now search for a service group without the need to know the relevant package. The backend Metadata Repository objects that are important for the new Integration and Connectivity in ABAP are also supported.
For some scenarios it is over-the-top to install an ESR when all you need is some quick and simple modeling capability (perhaps a delivered service definition requires a minor modification). Or perhaps, you are just starting out in Web services and are not yet prepared to go the full way of SOA with all the governance and so on. Here the ability to create models directly in the ABAP system is useful.
Although SOAP-based Web services are no longer in fashion, support for them in the ABAP environment is getting better and better.