How Easy It Is To Consume Function Module as Web service and Connect it Using SAP Cloud Platform Integration
In this blog, I shall explain how we can generate WSDL from existing function module and use it in SAP Cloud Platform Integration
We can use all the existing standard BAPIs along with custom BAPIs from SAP ERP instead of developing new web services
RFC adapter in SAP Cloud Platform Integration yet to be built, hence as of now, we can connect to RFC via a SOAP Adapter in SAP Cloud Platform Integration.
We can expose the RFC as a soap service using SE37 and configure the endpoint using SOAMANAGER.
However, there is an easier way to do the same, just by using a particular format to generate the wsdl file.
In the following scenario, we’ll be using an RFC at the receiver end via a SOAP receiver channel in SAP Cloud Platform Integration
The BAPI needs to be remote enabled.
- To obtain the wsdl of the BAPI, follow the below format: http://<host>:<port>/sap/bc/soap/wsdl11?services=<BAPI Name>&sap-client=<client>&sap-user=<user>&sap-password=<password>
You can test the wsdl in the browser and then import it in the wsdl folder in SAP Cloud Platform Integration.
- Create a SOAP adapter and use the URL in the location field (towards the end of the wsdl file) in the address.
The address will be in the form: http://<host>:<port>/sap/bc/soap/rfc
Use the wsdl in the SAP Cloud Platform Integration . The service, endpoint and operation fields will get populated automatically.
- Save and test the scenario.