Hello,
After some (a lot of) research I found that settings of Gateway Security for execution of external files were different in our systems.
Gateway Security Files secinfo and reginfo - Security Settings in the Gateway - SAP Library
The reginfo was not set properly in DEV and PRD. For this to work smoothly it is necessary to add a line in reginfo in order to allow the programs to register on the gateway from an external host.
P TP=* HOST=* CANCEL=* ACCESS=*
After this configuration everything is working fine in every system.
Regards,
Daniel Pasinato