Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module to Fetch RFC destiination

Former Member
0 Likes
1,065

Hi all.

I am calling a RFC function moduel. In that I dont want to hard code DESTINATION. Can you pls let me know the FM to fetch RFC DESTINATION NAME.

kind Regards,

sami.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

concatenate the sy-sysid and sy-mandt into a variable of the type of logical system and pass that, if its the same system, else use if conditionsto specify the destination depending upon the current system.

Regards,

Srinivas

7 REPLIES 7
Read only

Former Member
0 Likes
769

concatenate the sy-sysid and sy-mandt into a variable of the type of logical system and pass that, if its the same system, else use if conditionsto specify the destination depending upon the current system.

Regards,

Srinivas

Read only

0 Likes
768

Hi,

concatenate the sy-sysid and sy-mandt into a variable of the type of logical system and pass that, if its the same system

You dont need to pass a destination if you are calling the remote function in the same system or 'NONE' is enough.

Besides that, a RFC destination for a Non SAP system is not necessarily created using the naming convention system-id_client.

You might have to create a table which stores the System name and the corresponding RFC destination and look up this table before you call the RFC function.

regards,

Advait

Read only

0 Likes
768
You might have to create a table which stores the System name and the corresponding RFC destination and look up this table before you call the RFC function.

instead of using a table to store the destinations can't i specify them in the code using if conditions, especially when i have a very limited number of RFC destinations...

Regards,

Srinivas

Read only

0 Likes
768

Hi advait.

Thanks for quick turn around. I want to call the RFC in other system. Do we have standard table which has system ID & RFC destination. Orelse let me know the FM to get the RFC destination.

Thanks in advance

Kind Regards,

sami.

Read only

0 Likes
768

The destinations are stored in RFCDES. But how do you want to pick the correct one? Often the destination can be entered at runtime by the user or it is being maintained in some custom Z-tables.

Thomas

Read only

0 Likes
768

Hi,

Not sure if there is any such function ,but the RFC destinations are stored in the table RFCDES. You can do a select on these, but they don't have the cross reference of the system id/name etc...

regards,

Advait

Read only

Former Member
0 Likes
768

hi,

use 'LOG_SYSTEM_GET_RFC_DESTINATION'.