Integrate ServiceNow with SAP

dgarnica
Tera Contributor

Hi,

 

I have a requirement to integrate ServiceNow with SAP using RFC Calls, I’ve been doing some research and found some Integration Hub connectors for SAP ECC or SAM, but this is a custom application developed in ABAP.

 

The question is if there’s a way to call a SAP RFC function from ServiceNow.

 

Regards.

2 REPLIES 2

Ramesh Lohar
Kilo Guru

Yes, you can integrate ServiceNow with SAP using RFC calls. Here are the steps you can follow:

1. **Identify the RFC Function**: Identify the RFC function in SAP that you want to call from ServiceNow. Make sure that the function is remote-enabled.

2. **Create a Web Service in SAP**: Create a SOAP web service in SAP for the RFC function. This will expose the RFC function as a web service that can be called from external systems.

3. **Import the WSDL in ServiceNow**: Import the WSDL for the SOAP web service into ServiceNow. This will create a SOAP message function in ServiceNow that can be used to call the RFC function.

4. **Create a Scripted Web Service in ServiceNow**: Create a scripted web service in ServiceNow that calls the SOAP message function. This will allow you to call the RFC function from a script in ServiceNow.

5. **Test the Integration**: Test the integration by calling the scripted web service from a script in ServiceNow. Check the response to make sure that the RFC function is being called correctly.

Here is a sample code for calling the SOAP message function from a scripted web service in ServiceNow:

javascript
var sm = new SOAPMessage('SOAP Message Function Name', 'SOAP Function Name');
sm.setMIDServer('MID Server Name');
sm.setParameter('Parameter Name', 'Parameter Value');
var response = sm.execute();
var responseBody = response.getBody();
var xmlDoc = new XMLDocument(responseBody);
var result = xmlDoc.getNodeText('//Result');
gs.info(result);


Please note that this is a high-level overview of the process and the actual implementation may vary depending on the specific requirements and the configuration of the SAP and ServiceNow systems.

 

For ServiceNow Live Classes, Books, Sample Resumes, Interview Questions, CSA Quizzes.
And getting better services's on ServiceNow you can visits our website.
Please visit : https://nowkb.com/home
Our Website :https://nowkb.com/home
nowKB.com

Hi Ramesh,

 

Thanks for the information, I understand the part about integrating ServiceNow with SAP through a SOAP integration. So it is necessary to expose web services from SAP, it’s not possible to use the SAP ECC connector and call a specific RFC function?, without the need of a web service.