To check ports in SAP, go to transaction SMICM and view the services. The HTTP port is 50100, HTTPS is 50101 (HTTP + 1), and P4 port is 50104. Telnet port usually ends in 08. These ports follow a pattern of 5<instance number>00, 5<instance number>01, 5<instance number>04, and 5<instance number>08 respectively.