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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.