Skip to Content
Technical Articles
Author's profile photo Rashmi Joshi

SAP CPI – RFC Adapter IFlow for Synchronous Communication

Dear SAPiens,

This articles shows how to create IFlows in CPI using RFC receiver adapter. RFC is standard interface used to integrating with ECC systems. For the demo purpose I have used systems HTTP as sender, CPI as middleware, SCC and S4Hana. In this article, we will see the configurations required in SCC and BTP – Cockpit. This will be useful if any function module needs to be executed in ECC system.

Pre-requisites –

  1. Configure SCC with cockpit subaccount
  2. Configure FM name under Cloud to on-Prem
  3. Configure Destination in BTP

A :- SCC configurations

Assuming subaccount already added in SCC and below are the steps required to add function name

Select subaccount –> click on cloud to on-premise –> add system in access control –> back-end type = ABAP system

select protocol as RFC –>

As my system doesn’t support load balancing hence I have selected without load balancing option

select internal and virtual host and port details

select check internal host and click on finish

Select added system and click on the add resource and provide exact same name as FM name

Once system and resources are add, screen will look like below –

B :- Cockpit Configurations

If subaccount added successfully in SCC, you can see instance status in cockpit –> connectivity –> Cloud Connectors

Now we need to add RFC destination in cockpit, Connectivity –> Destination

Once all details are filled, check the connection. I have used S4H system credentials here.

C :- CPI IFlow

Below is the demo Iflow created in CPI system

Select RFC adapter after request-reply step and provide same RFC destination name as created in cockpit

Deploy Iflow, I am using postman for testing purpose. Below is the sample input file which I used in postman

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Z_CALCULATOR_RASH xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
   <A>220</A>
   <B>20</B>
</ns0:Z_CALCULATOR_RASH>

Below is the postman test result –

CPI Message Monitoring

D :- Points to checkĀ 

  1. Creating destination of type RFC in cockpit is not easy task. Your details need to be accurate otherwise check connection will keep throwing error
  2. For getting correct format of input file I imported RFC in ESR and generated input file for testing purpose

Hope this helps somebody trying to create iflow using RFC adapter in CPI.

!Happy Learning!

Reference –

https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/5c76048b04594888a47e74d35a91c08a.html

https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/3b55fa7b83874b5ca3b6b6b5998a73f6.html

Regards,

Rashmi

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Richa Kukreja
      Richa Kukreja

      Thanks Rashmi for sharing this blog and it helped me a lot to work on requirement.

      Author's profile photo Rashmi Joshi
      Rashmi Joshi
      Blog Post Author

      Thanks Richa Kukreja

      Good to see it helped you in your work šŸ™‚

      BR,

      Rashmi

      Author's profile photo Sindhuja Jayapandiyan
      Sindhuja Jayapandiyan

      Hi Rashmi Joshi,

      I am trying to connect to ABAP system from Cloud integration. Configured Cloud connector and Destination in BPT Cockpit level as prescribed. It is reachable in cloud connector. But when I deploy iflow, it is showing below error.

      Error Details

      com.sap.it.rt.adapter.rfc.exceptions.RFCLibraryException: <?xml version="1.0" encoding="UTF-8" standalone="no"?><rfc:RFCExceptions xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Exceptions> <E1>getDocument Failed</E1> </Exceptions></rfc:RFCExceptions>
      Could you please advice on this.
      Regards,
      Sindhuja.
      Author's profile photo Rashmi Joshi
      Rashmi Joshi
      Blog Post Author

      Hi Sindhuja,

      Pleaze share the payload you using to trigger RFC.

      BR,

      Rashmi

      Author's profile photo Zameer Ahamad
      Zameer Ahamad

      Hi Rashmi/Sindhuja,

       

      We are facing below error for newly created RFC for the existing application, could you help us what could be the reason for the below error.

       

      com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: <?xml version="1.0" encoding="UTF-8" standalone="no"?><rfc:RFCExceptions xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Exceptions> <E1>getDocument Failed</E1>

       

      </Exceptions></rfc:RFCExceptions>. The MPL ID for the failed message is : AGC2GRK5uZ4Yjmr9PbGFhqJb5EGa For more details please check tail log.

       

      We have currently P1 incident issues opened for this, we are unable to find theĀ  root cause, everything is fine interms of connectivity from CPI to ECC RFC call.

       

      Could you help us or provided some inputs to start troubleshooting this issue.

       

      Thanks in advance.

      your help will be appreciated.

       

      Regards

      Zameer Ahamad

      Author's profile photo Thomas Mo
      Thomas Mo

      Hello Zameer AhamadĀ 

      Did you find the solution ? We are facing the same issue.

      Thanks in advance.

      Regards,

      Author's profile photo Dinesh M
      Dinesh M

      Hi Rashmi,

      We do not have PO in our landscape to load the RFC in ESR and generate sample input file.

      Is there any other alternative approach to get the sample payload or structure of the given BAPI

      Thanks,

      Dinesh

      Author's profile photo SAMUELE BARZAGHI
      SAMUELE BARZAGHI

      Hi Dinesh,

      From the documentation:

      https://help.sap.com/docs/CLOUD_INTEGRATION/368c481cd6954bdfa5d0435479fd4eaf/5c76048b04594888a47e74d35a91c08a.html?locale=en-US

       

      Follow the steps to generate WSDL function modules for those who don’t have access to on-premise (Process Integration) system:

      1. Identify the required function module and the backend system to where the function module is called.

      2. Login to the backend system and start SICF transaction to maintain services for HTTP communication.

      3. Activate the Internet Communication Framework (ICF) service to make it accessible.

      4. Access the backend application to generate and fetch the WSDL for the desired function module.

        https://<backend_host>:<backend_https_port>/sap/bc/soap/wsdl11?services=<function_module_name>