cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Configuration In Pi 7.31

Former Member
0 Kudos

Hi All,

I am working on RFC to FILE Scenario in PI 7.31 java stack only. Can you please suggest me where do we maintain RFC Function Module in PI ...?

Thanks,

Raju

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183909
Active Participant
0 Kudos

Hi Raju

I've just set this up myself in PI7.31 Single Stack.  Here are my detailed notes and comments  - I hope  you can follow them.

I have 2 SAP ECC Clients.   Client 100 (config client), 110 (test client) and 120 (sandpit).

My simple test was to do a RFC call (using BAPI_MATERIAL_GET_DETAIL) from 110 to 120 via PI RFC.

To allow for RFC messages to be sent from SAP ECC to the SAP PI RFC adapter, a TCP/IP destination needs to be created in SAP ECC.  When we create a SAP PI RFC sender comms channel this sets up a “listener” in SAP PI.  This is “listening” for messages sent to the SAP ECC RFC destination’s registered server “program”.

A number of steps need to be taken in SAP ECC and of course in SAP PI, as follows;

Create SAP ECC RFC userid

Create a RFC userid RFCMETADATA in SAP ECC to allow SAP PI RFC Sender Adapter to gather meta data – this will be used in the SAP PI Sender RFC Communication Channel.  I have made this a user type C (and used function module SUSR_USER_CHANGE_PASSWORD_RFC  to change its password for the first time (optional)).  I have created this userid for the TCP/IP RFC destination in the SAP config client 100 (rather than in the DEV or SANDPIT client - certainly makes it clear to see what is calling what and going where).

Check the authorisation of the user in SAP ECC with function module AUTHORITY_CHECK_RFC

Create SAP ECC RFC Destination

The SAP ECC SM59 TCP/IP RFC RFCSENDER is used in the SAP PI RFC Adapter sender channel. The Program ID (RFCSENDERPROG) is an arbitrary name that matches that on a SAP PI RFC sender comms channel.  The gateway host/service are the SAP ECC server details.   This RFC destination is client independant - therefore it can we used in all of the SAP Clients (e.g. when testing SE37 BAPI/RFC call in other clients).

Create SAP PI RFC Sender Channel

The SAP PI RFC Sender channel will reference the programID (RFCSENDERPROG ) that was set up in the SAP ECC SM59 destination above and use the SAP ECC userid RFCMETADATA for gathering meta data.  This will be sent the message from the SAP ECC system (in our simple tests from SE37).   It is this channel that listens for messages sent to that SAP ECC destination “program” RFCSENDERPROG.

Set up SAP ECC user to allow SAP PI to call ECC via RFC

In order to allow SAP PI to call a ECC client via RFC, a SAP ECC userid will be required in the SAP client receiving the message – An SU01 communication user is preferable; named for instance RFCPIUSER – set password to UPPERCASE PASSWORD.  This will be used in the SAP PI Receiver RFC Channel RFC_Receiver_RHECC.

Set up the SAP PI Receiver adapter under the SAP business system for PI RFC calls to ECC Client 120 using the RFCPIUSER

Set up SAP PI iFlow for RFC to RFC

Create iFlow such that SAP ECC in one client will call the RFC module  BAPI_MATERIAL_GET_DETAIL in another client via SAP PI. My guess on how this works is; when we create a SAP PI RFC sender comms channel this must set up a “listener” in SAP PI.  This is “listening” for messages sent to the SAP ECC RFC destination’s registered server “program” (the arbitrarily named RFCSENDERPROG that was entered for the SAP ECC gateway host/service).  [This makes sense as I had originally created a SAP PI sender channel against by RH_TESTHARNESS business component by mistake, so when I first tested the BAPI from ECC the message was first picked up by that channel !.  It was only when I deleted that channel and tried again did the message get picked up by my channel against the SAP business system.]

The iFlow for a RFC (or IDOC or Proxy) will require a SAP Business System.  A dependency has been set on the SAP system SAP_BASIS to RH_TESTHARNESS and also from RH_TESTHARNESS to SAP_BASIS (I suspect the latter).  This will enable the SAP Business System to “see” any system interface or imported RFC in the RH_TESTHARNESS SWCV. Plus you MUST it seems go into the Swing Integation Directory, open up the SAP Business System goto other attributes and click Compare with SLD.

Once done for both sending and receiving SAP Business Systems, choose the BAPI from SAP Business System off RH_TESTHARNESS – it is important you do this otherwise on deployment it will not be able to find it – indeed double clicking on it won’t find it either (even though you can select it off the SAP Business System’s SAP_BASIS). Repeat for the other side and that’s it.

Activate and deploy the iFlow.

TEST from SAP ECC

Test from SAP ECC – SM37  - this is from Client110 and it will be passed to SAP PI for PI to call Client120 on its behalf.  Here we see the result of the test - it has from Client110 -called Client120 via SAP PI and returned the details of a Material Master record in Client 120.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>I am working on RFC to FILE Scenario in PI 7.31 java stack only. Can you please suggest me where do we maintain RFC Function Module in PI ...?

configuration is 100% the same for RFC adapter and RFC metadata

the only difference is the ICO object instead of sender/receiver agreements

BTW

we maintain the RFC function module in the SAP application system (ECC, SRM, CRM)

in PI we only get the metadata from it (ESR - SWCV - import SAP object)

Regards,

Michal Krawczyk

antony_ferminus
Participant
0 Kudos

Hi Michal

I am facing the same problem of File-Rfc-File scenario.
i created all the data type, message type , message mapping, interface mapping, business components and communication components.

I am stucked with the part of the sender receiver agreements.

l use the tutorial bellow.

http://scn.sap.com/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit

Did you solved this issue?

could you give some ides?

Regards,

Antony.