Application Development 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: 

RFC destination in call function

Former Member
0 Kudos

Hi ,

there are 3-4 connections between two systems in SM59. i want to use one of the connections explicitly.

Is there any way to code it while writing call function destination ***.

The problem is somebody has created a conection without saving the passoword. so each time RFC is called i have to login into the sytem.

i want to use another RFC connection.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi, I used the following statements:

  • Check RFC destination = from SM59

SELECT SINGLE rfcdest

FROM rfcdes INTO lv_rfcdest

WHERE rfcdest = irfcdest

AND rfctype = '3'. "ABAP connection

IF sy-subrc <> 0.

RAISE no_dest.

ENDIF.

CALL FUNCTION 'ZCS_BAPI_INTERMED_GETAGRDET'

DESTINATION lv_rfcdest

EXPORTING

etc.

Succes,

Rob

5 REPLIES 5

Former Member
0 Kudos

i am not getting any response...

is my explanation not adequate plese let me know

ThomasZloch
Active Contributor
0 Kudos

Just give the connection name as seen in SM59 after DESTINATION, or what am I missing?

Thomas

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

If you want to use the RFC destination 'XYZ', you call the RFC FM as:

CALL FUNCTION 'Z_TEST' DESTINATION XYZ

You can also pass a variable to the DESTINATION as well. What is your exact problem?

Suhas

Former Member
0 Kudos

Hi, I used the following statements:

  • Check RFC destination = from SM59

SELECT SINGLE rfcdest

FROM rfcdes INTO lv_rfcdest

WHERE rfcdest = irfcdest

AND rfctype = '3'. "ABAP connection

IF sy-subrc <> 0.

RAISE no_dest.

ENDIF.

CALL FUNCTION 'ZCS_BAPI_INTERMED_GETAGRDET'

DESTINATION lv_rfcdest

EXPORTING

etc.

Succes,

Rob

0 Kudos

i system name is F9Q450. when i check sm59 there are 4 connections with name F9Q450,F9Q450_1,F9Q450_2,F9Q450_DEBUG.

out of which the connection F9Q450_DEBUG has the password as initial in the logon tab of sm59, & others have id ALEADMIN,pwd SAVED.

so it means if the connection F9Q450_DEBUG is calledit will ask user name ,pwd to login and others will automatically excute.

when i do pass call function ZMMMX destination 'F9Q450' it is showing me logon screen ' it means it is calling the F9Q450_DEBUG connection .

is there any way in SM59 where they have made it as default.

i am unable control through program.