Skip to Content
Author's profile photo Buddhika Krishantha

SAP RFC Function Module as REST GET service

Hi All,

This is my first blog.

This is a step by step example of how to consume RFC function module as REST Service using GET operation.

System: SAP PI 7.4

This example will follow this workflow:

3rd Party System <-> PI RESTAdapter (JSON) <-> PI Mapping (XML) <-> PI RFC Adapter(XML) <-> SAP R3

Bussiness Case Description

A 3rd party system consumes a REST service which published in SAP PI to get the company name and the city.

Scenario – We are going to pass Company Code(BUKRS) as a parameter (GET operation) and get the Company Name and City as output.

  1. Import the Function Module to ESB.


  1. I used external definitions as data types.


  1. Create Service Interface. Use External Definitions for the Request and Response.


  1. Create Message Mapping for Request and Response.In Request Mapping Add Custom Function.
  • I have added function named getBUKRS with two parameters which named namespace and attribute.
  • Added following code into the function body.(This function is usnig for extract the parameter from the URL)


                  Map<String, Object> all = container.getInputHeader().getAll();
                 DynamicConfiguration dynConf =              (DynamicConfiguration)all.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                 DynamicConfigurationKey key = DynamicConfigurationKey.create(namespace, attribute);
                 return dynConf.get(key);
  • Map Request as following. Pass and “id” for the constants.

  • Map the response.

  1. Create Output Mapping.

  1. Go to Integration Builder and create receiver and sender communication channels.
  • Receiver-


  • Sender-







  1. Create Integrated Configuration.




  1. Test using SOAP UI.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi experts!!

      I have a similar case, I am trying to consume RFC function module as REST Service but using a POST operation. I think I am not able to construct the request message in JSON, I am getting the following Error message in SOAPUI:

      "InterfaceDetermination did not yield any actual interface"

      Can someone help?

      Thank you,

      Author's profile photo Michael Sargent
      Michael Sargent

      A bit late, but maybe useful to others searching.  This is possible. see


      Author's profile photo Glen Anthony
      Glen Anthony


      Does anyone know how to do the above where the RFC has 4 import parameters? There are many examples of where the RFC has 1 import parameter, but none where the RFC has more than 1 import parameter!

      Author's profile photo Buddhika Krishantha
      Buddhika Krishantha
      Blog Post Author

      it is possible. Below is a external definition of multiple import parameters. May be I can help you, If you are more specific on your problem,