cancel
Showing results for 
Search instead for 
Did you mean: 

A way to fetch the NW port number in BLS

Former Member
0 Kudos

Anybody know of a good way to fetch the port number of your NW instance purely in BLS? In the past I've used location.port in javascrpt, but in this application I need it to be an all BLS transaction (there's no user intereface)

Ideas?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Doug,

You must create a jsp:

Teste.jsp

<%=request.getServerPort()%>

In the transaction you should use the HTTP_Post_0 and call URL

server://XMII/CM/<<projeto>>/Teste.jsp

Hope this help.

Danilo Santos

Former Member
0 Kudos

Does

server://

work without a session?

jcgood25
Active Contributor
0 Kudos

It doesn't solve the issue, but it would be a good feature request for addition to /XMII/Illuminator?Service=SystemInfo&Mode=HostInfo

(assumption would be using an XMLLoader: server://XMII/Illuminator?Service=SystemInfo&Mode=HostInfo&Content-Type=text/xml)

Edited by: Jeremy Good on Oct 26, 2011 10:59 AM

Former Member
0 Kudos

You can try to use get file list actions to find the help shortcut that lives on the sever:

<install drive>:\usr\sap\<system id>\SYS\global\Help\Welcome.url

Once you get there and read the file with a Text Loader you can parse out the host and port.

Its probably kinda chuggy so I would try to cache the result somewhere.

Former Member
0 Kudos

Thanks Christian, however this wouldn't work for me either as the issue comes from migration from location to location. So I wouldn't know the server drive or the system id from one box to the next.

Former Member
0 Kudos

oops, forgot the get file list action doesnt return directories.