cancel
Showing results for 
Search instead for 
Did you mean: 

get server name

Former Member
0 Kudos

Hello,

I need to get the server name from my webdynpro in order to construct an url to call.

how can we do it with WDA?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

System field HOST can give you the current applciation server name.



data host type string.
 host = syst-host.

but why you need the host name for this.

you can construct the url using the method CONSTRUCT_WD_URL of class CL_WD_UTILITIES

.

thanks

sarbjeet singh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> but why you need the host name for this.

> you can construct the url using the method CONSTRUCT_WD_URL of class CL_WD_UTILITIES

> thanks

> sarbjeet singh

I agree that you should use one of the utilities to build the URL. If you need to build a URL for something other than Web Dynpro, also consider the class CL_URL. It has method sfor ITS, WDA, BSP, ICONS. The constructor of this class also has the property logic to lookup the host and default ports dynamically.

Answers (0)