In the SAP configuration, you can see that the host name is specified. However, it is not true for the port because the port is in a standard range and must be specified in the services file on the client machine.
You can find the services file in:
- Windows: C:\Windows\System32\drivers\etc\services
- Linux or Unix-based systems: /etc/services
Determine the port number by checking the SAP JCO server section
in your SAP connection configuration file.
The following image shows a configuration example of the SAP Gateway Server, sapgw31:
The last two digits for sapgw determines the last two digits of the port number. In the example shown above, the last two digits of the port number is 31. The range for the last two port numbers is 00 to 99.
The default ranges for SAP include 3200 to 3299 for sapdp and 3300 to 3399 for sapgw.