If you getting connection error on SM59 like “ERROR:No storage allocation available” for remote system’s registered program SAPXPG , then my suggestion to you check remote systems GW log file to clarify issue…
Here is an example situation ;
We are getting the error on SAP system X
Let’s check this SM59 defination’s informations
Program name SAPXPG and we know the target server’s (SAP system Y) name from RFC defination SAPXPG_DBDEST_TARGET SERVER
Now we should check the remote server’s GW log
Go to SAP Server Y and check the GW LOG entries
As you can see “SECINFO DENIED” message for program SAPXPG on SAP System Y
Now we have to add this info in SECINFO file on SAP system Y to allow this connection which comes from SAP system X
Let’s restart GATEWAY or reread SECINFO file from SMGW –> Goto –> Expert Functions –> External Security –> Reread
GW log should be like below on SAP system Y
Now try the “Connection Test” from SAP system X