cancel
Showing results for 
Search instead for 
Did you mean: 

User-defined function: RFC call

Former Member
0 Kudos

Hello all,

I've created a user-defined function to call an RFC from PI. I've followed this example: http://www.erpgenie.com/sap-technical/java/sap-java-connector-excample-1-simple-rfc-call

The function is working fine but something came up - I need to transport the Message Mapping (with the user-defined function inside) to my Production system and I realized that I will need to change manually some data like SAP client, host name, etc... The problem here is that I don't have access to modify objects in Production.

What I want to know is if that is any way to provide system data to the user-defined function without hard coding it? Is there any way to dynamically determine this information?

Thanks in advance.

Regards,

Ricardo Inácio

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi Ricardo,

I guess you will be having a SAP system as sender or receiver. Get it name in mapping (using dynamic configuration SENDER_SERVICE ) and change you lookup code in such a way that based on this value the SAP system (on which look up will be performed ) is determined dynamically

Regards

Suraj

Answers (2)

Answers (2)

former_member181962
Active Contributor
0 Kudos

Yes, Use Suraj's approach.

However, you have to use the code here:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439&override...

instead of the RFC using JCo calls as explained in the erpgenie link.

Then use Dynamic Configuration to get the sender service instead of using hard coded value for service name.

Regards,

Ravi

Former Member
0 Kudos