cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a function module on another server

Former Member
0 Kudos

Dear all,

I have a function module on a test server which accesses a database table on it. I need to call that function module from a development server. Both servers are AS ABAP. I believe I need RFC, but how do I specify the test server address from the development server function call?

Thanks for your help,

Philon

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

How do we set a destination using SM59? Do we set it on the calling server or the called server? How do we specify the called server? just the name, say Q7Q, or a url to something? How do we find the destination name of the called server?

LeonardoAraujo
Active Contributor
0 Kudos

Step-by-step:

1 - Click on R/3 Connection and click on CREATE

2 - Enter a name for your connection (the name is your DESTINATION, ex: DDV120, ect)

3 - On Connection type select R/3 connection (3)

When you press enter you will see the fiel TARGET HOST

4 - Enter the name of the server you are trying to reach or the IP address;

5 - Under LOG ON security, enter the user ID and Password that is to be used.

All this should be done by a BASIS person since this it their area and they are responsible for security.

Leonardo De Araujo

Answers (1)

Answers (1)

LeonardoAraujo
Active Contributor
0 Kudos

You need to call the Function module as a RFC FM.

The function module needs to be set as such.

In its atributes, it needs to be Remote-enabled function module.

To call it, proceed as follows:

CALL FUNCTION <FUNCTION MODULE> ON <DESTINATION>.

<DESTINATION> needs to be a predefined RFC destination. (See transaction SM59)


CALL FUNCTION func DESTINATION dest parameter_list. 



Effect 
Synchronous call of a remote-enabled function module specified in func using the RFC interface. Use addition DESTINATION to specify the destination in dest. For func and dest, character-type data objects are expected. After terminating the remotely called function, the calling program is continued after CALL FUNCTION. 



Note 
If the content of dest is equal to the constant space, then the addition DESTINATION is ignored and a normal call CALL FUNCTION func is executed. 

Leonardo De Araujo