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.
So, we will copy the function module SPELL_AMOUNT and rename it as ZST8_MY_SPELL_AMOUNT and make the copy remote-enabled after making necessary changes in the interface. In this recipe, we will use our remote-enabled function module as the basis for creation of a Web service. The function group containing this function module was created by the name ZST8_SPELL.