Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata


Help you to understand the allocation of the external programs registered to the Gateway of an SAP instance.


This page contains information about the allocation of external programs in the Gateway of an SAP instance, aiming to demonstrate the analysis behind their usage and common errors.

RFC Error "Timeout during allocate" 

The most common error related to the allocation of Gateway registered programs is the error "timeout during allocate". This error is described in the SAP Note 1333483 in details. One of the possible causes mentioned is the fact that the affected program is not registered multiple times in the Gateway and the only registration performed is already in use, causing the below timeout if the program is attempted to start more than once. The analysis behind this aspect of the "timeout during allocate" error will be explained in details in the next chapters of this wiki page.

Analyzing the RFC Destination Configuration

In order to check how exactly the RFC destination for this program is configured, you will need to access transaction SM59 and open the RFC destination responsible for starting the TP you want to analyze (ExampleWiki as per the above image). After selecting the RFC destination, in the Technical Settings tab as per the image below, one specific Gateway to communicate with the External Server can be defined in box "Gateway Options".

Gateway Options is Specified in the RFC Destination

If the Gateway Host and Gateway Service are specified in the Gateway Options box as per the below image, it means the communication with this External Server where this External Program is started will only be performed by the defined Gateway (sapgw00 running in the host hostexample1).

Gateway Options is Not Specified in the RFC Destination

If the Gateway Host and Gateway Service are not specified in the Gateway Options box as per the image below, the local Gateway will communicate with the External Program (E.g. Application Server where the user is currently logged on or where the job is running). In this scenario, the External Program has to be registered in all the instances of this SAP system, otherwise the error "program not registered" will be triggered as per the SAP Note 1893014.

Gateway Registrations of the External Program

The next step of this analysis which follows the analysis of the RFC destination is the analysis of the Gateway registrations of this External Program. For this, you must access the transaction SMGW and use the meny GoTo, selecting the option "Logged on Clients". This is shown in the below image. The SMGW transaction should be accessed in the instance defined in the Gateway Options box, in case it was defined, or all the instances of the SAP system should be analyzed, in case the fields were not defined. 

In the Logged-On Clients screen of the SMGW transaction, you can order the "TP Name" column in Descending or Ascending order in order to make it easier to visualize all the registrations for the External Program you are analyzing. After this you can search for the External Program name and you will find them as shown in the below image. 

You can count now the number of lines reporting the TP Name which corresponds to the External Program you are analyzing and this is indicating the maximum number of simultaneous communications that can be started with this External Program from this Gateway. 

Gateway External Program Current Connections 

In the initial screen of the SMGW transaction, you can order the column called "Sym. Destination" in ascending or descending order and after this search for the name of the External Program you are analyzing. After you find the connections started with this program as per the below image, you can check the number of active connections which are performed with this External Server. The maximum number of connections possible is equal to the number of registrations this program has with this Gateway, as per the previous step of this analysis. In the below image, you can see the last line of this External Program reporting the Status "connecting". This connection can time out with the error "timeout during allocate" since all the registrations of this External Program are already in use (status Connected).

In summary, you have to make sure the External Program is registered enough times to the Gateway (in case it is possible to register this program more than once, since this is defined by the program designers itself). In case the program is started for more times than it was registered in the Gateway, the error "timeout during allocate" can happen, depending on the value of the time out parameter gw/reg_timeout (as mentioned in SAP Note 1333483), since a connection can be freed before the time out period is reached, allowing the connection under "connecting" status to be established and changed to "Connected" status, consequently avoinding the error.

It is important to note that you can see this dump when the external program is hanging or does not respond fast enough as well. You can identify this behavior if you can see the "Timeout during allocate of a registered program" occurring without any active connection to the external program or if just a few active connections are reported when you have a greater number of registrations performed for this external program in the Logged On Clients screen.

Related Content

Related Documents

Gateway Access Control Lists

Related SAP Notes/KBAs

SAP Note 1333483 - Timeout during allocate of a registered program

SAP KBA 1893014 - program not registered

  • No labels