Hi All,
Most commonly researched topics under third-party system integration with SAP is how to use RFCs and web services to expose SAP APIs. There are lot of confusion under exposing web services due to different third-party platforms, authentication, connection issues and different PI versions etc.
There are several ways third party applications you can access RFCs.
- Directly access RFC using SAP credentials. I have previously written a article on how to access a RFC using .NET front-end. Follow this link to access the article.
- Exposing RFC as a web service using transaction SE37. This can be done using SE37>Utilities>Create web service option.
- Exposing RFC as a web-service using SAP Process Integration (PI/PO).
In this article I will provide detail on how to expose a RFC as a web service using SAP PI/PO environment. This would be a SOAP to RFC synchronous interface.
One advantage of using SAP PI in this purpose is you would have comprehensive monitoring capabilities than other two methods. SAP PI has provided detail message monitoring, message logging and error handling capabilities which can be leveraged for any scenario. if you you use other methods such as directly exposing a RFC you will have to write your own message monitoring, alert and logging.
One disadvantage I see in using SAP PI is there would be more development effort due to PI development.
This example is a SOAP to RFC synchronous scenario. Third party send the SOAP call can PI converts the input and call the RFC then the RFC return data would be converted and send synchronously to third party using SOAP protocol.
These are the main development steps.
1. Make sure your function module or the API is "Remote enabled". - SE37
2. Import RFC to SAP PI. - Right click on RFC under imported objects under software component and provide application server/system number/user credential. Then find the RFC from the list.
3. Create input, output data types and message types which correspond to SOAP input and output data formats.
SOAP request data/message type.
SOAP response data/message type.
4. Create message mapping for SOAP request to RFC input.
5. Create message mapping for RFC output to SOAP response.
6. Create outbound service interface.
This should be a outbound synchronous interface with SOAP request and response message types.
7. Create operation mapping.
Request:
Response:
8. Create sender SOAP communication channel.
9. Create RFC receiver communication channel.
10. Create integration scenario.
11. Publish the interface under service registry. This will be shown in detail in a separate article.
SAP, SAP PI, Single stack, RFC, SOAP, .NET, Integration, SAP PO, ABAP, API, expose, web service, message mapping, Process, orchestration, service, registry, synchronous, interface, Isuru Fernando, FM, Function module, BAPI, remote