How does the host name resolving work in SAP systems?
SAP uses operating system functions to resolve host names to IP addresses and vice versa. The usage of the hosts file, DNS or other services like YP or NIS is controlled by operating system settings.
The SAP processes also have an internal cache for host names and the related IP addresses. If the host name is already cached, the process uses this address and does not call the OS function.
You can invalidate the IP cache of all processes of one ABAP-system using transaction SM51.
Same applies to service names and port numbers.
The Hosts file standard format is define following the information in this link : https://wiki.scn.sap.com/wiki/x/i4IjIQ
And Guided Answer : https://ga.support.sap.com/dtp/viewer/#/tree/2661/actions/37634