cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the port number

Former Member
0 Kudos

Hello,

In a BSP application i am trying to retrieve the server anme and port number.

for server name i am using,

<%=request->get_header_field('~SERVER_NAME')%>.

Could you let me know what is the method to get the port number?

regards,

Ravi

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

option 1.

CALL FUNCTION 'TH_GET_VIRT_HOST_DATA'
   EXPORTING
     protocol             = 1
     virt_idx             = 0
*   LOCAL                = 1
  IMPORTING
    hostname             = server
    port                 = port
  EXCEPTIONS
    not_found            = 1
    internal_error       = 2
    OTHERS               = 3 .

option 2:

server_port with the same mechanism.

<%=request->get_header_field('~SERVER_PORT')%>.

Regards

Raja

Message was edited by: Durairaj Athavan Raja

Answers (0)