Hi Pavio,
If you are running on a unix platform, run the following command with the user who owns the gateway.
>>which sapxpg
what is the output?
Also in SM49 tcode, create a test command as below and execute it with target destination as SAPXPG_DBXXX and check the output. Is it showing the utility sapxpg in the output ?
Thanks
Amit