cancel
Showing results for 
Search instead for 
Did you mean: 

Multipe Sender RFC using same Program ID

Former Member
0 Kudos

Hi all,

I have RFC>XI>HTTP scenario. All confiruation has been done in R/3 and XI has ben done correctly.

Is it possible to use the same TCP/IP port Program ID created in SM59 (in R/3) for sending different RFC messages to XI. Meaning, in different XI RFC sender adapter communication channels, can I use the same Program ID.

When I tried, it work for one RFC, but when multiple RFC sender adapter uses same program ID..RFC program errors out in R/3 itself with error message - Commit fault: com.sap.aii.af.rfc.afcommunication.RfcChannelMismatchExcept.

Please help.

Thanks

Karthik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Karthik,

It is possible to send different messages from R3 to XI that use the one RFC destination and Program ID (in R/3) and the one Communication channel (in XI)

Assume that interfaces AAA and BBB have different structures

<u><b>SAP R/3</b></u>

<b>For interface AAA</b>

(1) Execute ABAP Z_AAA which

(2) Populates the internal table ITAB_AAA with structure ZST_AAA

(3) Calls the remote enabled function ZFN_AAA

(4) Passes the interface data in the tables statement

CALL FUNCTION 'ZFN_AAA' DESTINATION RFCCOMMON

EXPORTING

… … … = … … …

IMPORTING

… … … = … … …

TABLES

AAA = ITAB_AAA.

<b>For interface BBB</b>

(1) Eexecute ABAP Z_BBB which

(2) Populates the internal table ITAB_BBB with structure ZST_BBB

(3) Calls the remote enabled function ZFN_BBB

(4) Passes the interface data in the tables statement

CALL FUNCTION 'ZFN_BBB' DESTINATION RFCCOMMON

EXPORTING

… … … = … … …

IMPORTING

… … … = … … …

TABLES

BBB = ITAB_BBB.

Each function is called with the same destination RFCCOMMON

In SM59 point the RFC destination RFCCOMMON to your XI environment and provide a program id, for example ID_COMMON

<i><b>XI</b></i>

<b>(1) Configure the sender RFC Communication Channel</b> for example CC_COMMON and enter your SAP R/3 server parameters to include the program id ID_COMMON

<b>(2) Configure the Receiver Determinations</b> as follows

For interface AAA

Sender Service Enter your SAP R3 Business System for example R3PROD Interface ZFN_AAA (this is the SAP R/3 remote function)

Namespace urn:sap-com:document:sap:rfc:functions

Configured Receivers

Service Integration Process AAA

For interface BBB

Sender Service Enter your SAP R3 Business System for example R3PROD

Interface ZFN_BBB (this is the SAP R/3 remote function)

Namespace urn:sap-com:document:sap:rfc:functions

Configured Receivers

Service Integration Process BBB

<b>(3) Configure the Sender Agreement</b> as follows

For interface AAA

Sender Service R3PROD

Interface ZFN_AAA

Namespace urn:sap-com:document:sap:rfc:functions

Sender CC CC_COMMON

For interface BBB

Sender Service R3PROD

Interface ZFN_BBB

Namespace urn:sap-com:document:sap:rfc:functions

Sender CC CC_COMMON

Regards,

Mike

Former Member
0 Kudos

Mike,

Thanks for your detailed explanation. I understand what you are saying and in theory..yes I do feel it should be achievable. But we're getting errors on R/3 when we try to use the same Program ID for different message.

All configuration in XI conforms to what you said. I'm using one CC (earlier I used seperate CC's for different Sender agreements..but changed that) for all Sender agreements and using the same Program ID defined in SM59 (in R/3). In CC, under RFC server parameter, I have specified the Maximum connections as 5. Initial connection left blank (I'm not sure what it means).

On R/3 side, here is the program that calls one of the FM's. We have another similar program that calls another FM (in total we have 5). When we run this, we get the error message I had mentioned earlier. Do you notice anything wrong here?

REPORT ZMM_EXTRACT_WBS_TEST.

data: gt_wbs TYPE ZWBS_ELEMENT_TAB.

CALL FUNCTION 'Z_EXTRACT_WBS_ELEMENT'

TABLES

WBS_ELEMENT = gt_wbs

.

CALL FUNCTION 'ZMM_TEST_EXTRACT_WBS'

in background task DESTINATION 'RFCCOMMON'

TABLES

WBS = gt_wbs

.

commit work.

write 'done'.

Thanks

Karthik

Former Member
0 Kudos

All,

Thanks for your contributions. I got this resolved. Looks like there was a cache issue. I did a Complete cache refresh. Then deleted and recreated a port Program ID on SM59 (R/3) and it works now.

Thanks once again.

Karthik

Answers (4)

Answers (4)

Former Member
0 Kudos

Guys..

I have another issue in the same scenario. For some reason its not consisten..the messages get stuck int he queue and if I do a Execute LUW on that message (on SM58)..it goes through.

The error message is

Commit fault: com.sap.aii.af.rfc.afcommunication.RfcChannelMismatchExcept

Any ideas?

Thanks

Karthik

nisarkhan_n
Active Contributor
0 Kudos

Multipe Sender RFC using same Program ID:

when you try to send the data to the XI using the rfc, the whole process of execution depends on the remote call to the RFC....XI usess the PID to determine where to call the destnation....as menionted this acts as a bridge to call RFC....so you have Multiple RFC's from R/3 to send to XI.....there is no use to send it to RFC dest when your receiver is same ( XI in this case).....you can do it but it's no use of doning in that way.....

Former Member
0 Kudos

actually,i think you do not have to do that.

program id just like a entrance.

cc just like a bridge.

you do not have to create multiple bridges for a entrance.

you can increase its width to enhance capability by parameter "connection".

because it is not essenital purpose to do that. so that xi will throw an exception.

the number of connect can be specified directly by the parameter "maxmum connections"

why did you do that?

Former Member
0 Kudos

Hi,

I think only one CC can use same program ID,not multiple CC,but you can use same Sender RFC CC for different interfaces.

Babu Sri

Former Member
0 Kudos

Thanks for your immediate response Babu.

But..on the R/3 side, can we use the same Program ID (TCP/IP port) to post different RFC messages? For eg I have 5 RFC (different RFC messages) --> XI scenarios..do I need 5 TCP/IP connections (Progam ID's) for it?

Thanks

Karthik

Former Member
0 Kudos

no,just one connection is enough.but I think you might need to set number of connections in sender RFC CC as required,if you need 5 then 5 in CC.

and if you have Async scenario RFC->XI->xyz then you need to call your same RFC dest in every report those trigger your Asyn RFCs.(as you are doing Sync,you can ignore this statement)

Former Member
0 Kudos

Babu..that didn't work. Yes it is Async RFC --> XI --> xyz scenario.

We tried using one Program ID..one communication channel for all RFC sender adapters. Specified max connections as 5. All 5 reports calling corresponding RFC's with same destination.

Gives error on R/3 side -

Commit fault: com.sap.aii.af.rfc.afcommunication.RfcChannelMismatchExcept

Thanks

Karthik

Former Member
0 Kudos

are you sure Program ID mentioned in RFC dest( T SM 59 registered server ) is same as in your sender RFC cc and I think it is case sensitive too.

can you verify other parameters too in RFC sender CC.