cancel
Showing results for 
Search instead for 
Did you mean: 

Getting URL of WD Application

adil_gndz
Explorer
0 Kudos

Hi,

I have an web dynpro application which will not use in Portal! I want to get the URL of this application because i will send this URL with e-mail. How can i get all of the URL with host and port.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at method CL_WD_UTILITIES=>CONSTRUCT_WD_URL.

Regards, Silke

adil_gndz
Explorer
0 Kudos

Thanks for your quick replay.

But how can i get host name and port ?

Former Member
0 Kudos

function module TH_GET_VIRT_HOST_DATA

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks everyone.

I have found that the following statement can get current protocol for Web Dynpro application:

CALL METHOD cl_http_server=>get_location

EXPORTING

server = cl_wdr_task=>server

IMPORTING

host = lv_host

port = lv_port

out_protocol = lv_protocol.

Thanks,

David

Former Member
0 Kudos

Hello,

Is there anyone who wanna help?

Thanks,

David

Former Member
0 Kudos

Hi Silke,

Your information is very valuable.

Thanks a lot.

I still have a question:

How to get the current protocol?

As you know, the function module TH_GET_VIRT_HOST_DATA requires an importing parameter: protocol.

But my application can be accessed in either http or https protocol.

I have tried that if I pass in (protocol=1) or (protocol=2), I can get correct port number.

But how can I know the current protocol?

Thanks & Regards,

David