Skip to Content
Technical Articles

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

5 Comments
You must be Logged on to comment or reply to a post.
  • 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.
    • 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