When a TCP/IP type RFC Destination with Registered Program is setup, the external program gets registered with the gateway. While creating this kind of RFC Destination, information about the destination is not maintained anywhere. So how does it establish a connection with the program on external server wihout knowing where the target system is? Creation of the RFC connection registers the specified Program-ID on the SAP Gateway. The Gateway waits for a request/call from the non-SAP client. The client would be needing the Gateway Host, Gateway Service, User ID/Password details in order logon to the Gateway. If any of this information is incorrect, the RFC connection test fails with the error " program PROGRAM_ID not registered " The client then logs on to the Gateway once (for registration). The Gateway then starts a process and sets up a TCP/IP connection. This connection info can be seen with SMGW transaction. If this connection gets lost or cancelled by any other program, ...