cancel
Showing results for 
Search instead for 
Did you mean: 

How to get server IP?

Former Member
0 Kudos

Hi all,

My question is: is there any way to get the IP address of the server?

I need it to set the igsURL-property of my BusinessGraphics, depending on which server the app is runing. If there are other ideas for this, i`ll be very thankfull.

Thanks in advance.

Z.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Zdravko,

same topic, updated content for CE 711:

http://help.sap.com/saphelp_nwCE711/helpdata/EN/43/8a1a8ece230c8ce10000000a11466f/frameset.htm

Kind regards

Stefanie

Former Member
0 Kudos

Thanks alot!

Best regards,

Z.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Zdravko,

in this case you should not hardcode the igsURL, but let it empty and configure the igsURL on the server.

If you are on 7.0 use Visual administrator for this:

http://help.sap.com/saphelp_nw70/helpdata/EN/43/8a1a8ece230c8ce10000000a11466f/frameset.htm

kind regards

Stefanie

Former Member
0 Kudos

Hi Stefanie,

Thats exactly what i want, but i`m working on 7.1 (should said that before). Can You give me some directions, how can this be done on 7.1 please.

Regards, Z.

Former Member
0 Kudos

Hi,

As far as I know, the igsURL property of the business graphic UI element is not bindable. That means, you cannot set a context to it.

Even if you are able to get the IP sddress of the server, I would like to know how are you going to set this property dynamically.

Regards,

Alka.

Former Member
0 Kudos

Yes, the igsURL setting isn`t bindable, but you can get the graphic as an element:


IWDBusinessGraphics graphic = (IWDBusinessGraphics)view.getElement("BusinessGraphics");
graphic.setIgsUrl(someURL);

But my goal is to set it dynamically...

Former Member
0 Kudos

Hi,

Yeah.. You are right.

In this case, the Web Dynpro application URL must suffice for getting the server information.

You can use the WDURLGenerator.getApplicationURL(...) methods to get the application URL, and then the Server Hostname can be derieved from it.

Also, remember to put the code that you have mentioned in the if (firsttime) block in wDoModifyview, to avoid it being set at every View event.

Regards,

Alka.