Skip to Content
0

Webdynpro For ABAP get Host name and IP address

Nov 25, 2016 at 09:15 AM

406

avatar image
Former Member

Hi Experts,

Now I am working on Webdynpro For ABAP development, I met a problem when I try to get the Hostname and IP address in my action program.

Could anyone share me how to get the Hostname and IP address in my Webdynpro program?

Thank you very much in advance.

I am looking forward to your reply.

Best Regards,

Leo

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Dec 01, 2016 at 06:12 AM
1

Hi Leo

A.

cl_http_server=>GET_LOCATION( importing HOST = server port = port OUT_PROTOCOL = prot ).

B.

call method CL_WD_UTILITIES=>CONSTRUCT_WD_URL

exporting Application_name = wd_comp_controller->WD_GET_API( )->GET_APPLICATION( )->GET_APPLICATION_INFO( )->GET_NAME( ) importing OUT_HOST = server OUT_PORT = port OUT_PROTOCOL = prot.

Kind regards

Frank

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Frank,

Thank you for your reply.

The two suggestions I have also tried, but they return the result as:

SERVER: server name(not the local hostname);

PORT:8000

PROT: http

Do you have some more suggestions?

Best Regards,

Leo

0