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: 

Checking RFC destination availability

Former Member
0 Kudos
1,565

Hello,

In a transaction I'm working on, I loop at a table containing RFC destinations, and I call the same function module on each of these destinations. What I would like to do is, prior to the call, test if the system behind the RFC destination is available (neither completely crashed, nor just blocked by an administrator).

I tried to do this by simply calling any BAPI on the remote system, and check if there was a connection error. But the problem is, if the system is not down but just blocked by an administrator, the transaction suddenly displays the logon page of the remote system.

Do you know of a simple way to do this ?

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
726

Ok I will try. In the meantime, to avoid the sudden display of the logon page of the remote system, I had the idea of executing an RFC in background task. The problem I have with this method is that I don't know how to check how the RFC happened when I execute it in the background. Do you have an idea ?

Thanks a lot for your help.

10 REPLIES 10

Former Member
0 Kudos
726

In a RFC destination, you require to give logon credentials of a system.

user and password.

UNDER logon/ security tab.

Do you have same credentials for every system?

Former Member
0 Kudos
726

Yes I have, all the RFC destinations contained in the table are defined in the system on which the transaction is used. I don't know if all these user/passwords are the same (I think so though). Why is it important ?

Message was edited by:

Thomas Debouverie

uwe_schieferstein
Active Contributor
0 Kudos
726

Hello Thomas

You can use function modules <b>RFCPING</b> and <b>RFC_PING</b> to check the connection and and authority (see also report RSRFCPIN).

Regards

Uwe

Former Member
0 Kudos
726

Hello, thank you for your answers.

I have taken a look a the two function modules you gave, and have found their source code completely empty.

0 Kudos
726

Hello Thomas

That is correct because we only want to check connectivity and, if we can connect to the remote system, want to check authority. To understand the function modules debug the report I have mentioned with a RFC destination.

Regards

Uwe

Former Member
0 Kudos
726

Hello, sorry for the previous question, I have just understood the thing...

But does it resolve the case when the system is reachable (meaning the logon screen can be accessed), but with all functions blocked by an administrator ?

0 Kudos
726

Hello Thomas

I cannot give you a definite answer to this. To easiest way to test this is to ask an adminstrator to block all functions on a client (e.g. 000 or 001) and see how the function modules behave. You could do the same using a mini-SAP system.

Regards

Uwe

Former Member
0 Kudos
727

Ok I will try. In the meantime, to avoid the sudden display of the logon page of the remote system, I had the idea of executing an RFC in background task. The problem I have with this method is that I don't know how to check how the RFC happened when I execute it in the background. Do you have an idea ?

Thanks a lot for your help.

0 Kudos
726

Hello Thomas

You could try with asynchronous RFC calls (for details refer to the ABAP documentation of CALL FUNCTION).

Asynchroner RFC 

2. CALL FUNCTION func STARTING NEW TASK task 
                [DESTINATION {dest|{IN GROUP {group|DEFAULT}}}] 
                parameter_list 
                [{PERFORMING subr}|{CALLING meth} ON END OF TASK]. 

Regards

Uwe

0 Kudos
726

Hello,

That would be fine to avoid the logon screen in case of anavailability, but since processing continues directly after the new task starts, how can I check the result of the call ?

Thank you.