
The generation tool for web services and RFC-enabled function modules helps an application developer as well as a third-party user to process the rules defined in BRFplus. The tool helps to create web services and function modules in a highly automated fashion with minimal interaction.
You have created a BRFplus function for rule-based calculation of freight costs. This function is called by application A. It may now turn out that the cost calculation logic is so generic that the same rules could also be used to support freight cost calculation in a second application B. However, B is a Java-based web application that cannot directly call the BRFplus function in the ABAP backend system. To solve this scenario, you generate a web service for the BRFplus function in question. This enables web application B to call the BRFplus function via the generated web service.
Generating a Web Service
Choose .
In the web service generation page that appears, choose Select Function.
In the Object Query dialog box that appears, enter the name of the function and application and choose Search.
Select a function from the list.
The selected function appears under the Function section.
To choose any other function, choose Select Other Function.
You can also start the generation tool from the context menu of a function in the navigation panel of the BRFplus workbench, or with the Generate button in the work area of a function that you are currently editing. With both approaches, the function to be generated is then already preselected by the system.
Configure the web service. In the Web Service section, enter the following data:
To create a new function group, select Create Function Group checkbox. Otherwise the function module is generated in the existing function group provided.
To use an existing function group, enter the name of the function group in the Function Group field.
Enter the name of the function module for the generated Remote Function Call (RFC) function module in the Function Module field.
Enter name and short text for the web service in Web Service Name and Web Service Short Text fields.
To choose the level of security, open the value help of the Web Service Security Profile field. From the different security profiles offered, choose the one you want to use.
In the Transport section, make the required entries:
The development package in which you want to generate the web service.
Select the Local Package checkbox if the web service does not need to be transported to other systems. You may as well enter $TMP in the Development Package field for this purpose.
You have to transport the objects if you generate the web service in a development package that is not local and if the package is transportable.
For more information, see Transporting Objects
Enter the workbench request.
Choose Generate.
The web service is automatically generated with all the required objects.
Activating the generated web service
Once you have walked through all the steps listed above, the system has generated all the required objects. However, the newly generated web service cannot be used immediately. This is due to applicable security standards that require that web services must be explicitly activated by an authorized user. As a consequence, you have to carry out the following steps manually:
In the backend system, start transaction SICF.
In the Service Name field, enter the name of the service you have generated and choose .
The system expands the services tree until the services is visible.
Choose .
The system displays all the settings that have been created for the generated service.
Check all the settings and modify them where necessary.
Save your changes and leave the transaction.
Start transaction SOAMANAGER.
The system starts the SOA Management tool in a new browser window.
Choose .
Enter the service name (or a part of it) into the Search Pattern field.
In the Search Results table, select the row containing the desired service and click on Apply Selection.
On the Configurations tab, click on Create Endpoints. Check the default settings for Service Name, Description, and New Binding Name that the system suggests.
Once the system has generated the newly defined endpoint, you can maintain the configuration details for it (Provider Security, Transport Settings, and so on).
After you have completed the steps above and successfully saved the settings, you can use the web service.
Generating a Function Module
Generating an RFC-enabled function module for a BRFplus function is a subset of generating a web service. Therefore, the steps related to function groups and function modules as described above apply to the generation of a function module as well.