Creating a Web service from a function module

In this recipe, we will see how we can create a Web service using a Web service creation wizard from a remote-enabled function module. The function module simply takes as input an amount (in figures, for example, 1000) and currency such as USD, and then outputs the corresponding amount in words such as One Thousand US Dollars (similar to the function module SPELL_AMOUNT).

Getting ready

Since the SPELL_AMOUNT function module is not remote-enabled, it cannot be used for generating a Web service. One such attempt will result in the following error during creation of the service.

Getting ready

So, we will copy the function ...

Get SAP ABAP Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.