Skip to Content
avatar image
Former Member

Get User's IP Address on Web Service

Hi experts,

I have created a Web Service and all is working just fine.

For tracking purposes, I would like to know the UserName & from which IP address did my web service get invoked.

What do I need to do to extract the IP address from the web service request?

Is there any Table / TCode that store User Name & IP Address of user who call my Web Service?

Thanks for any hints/tips.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 29, 2016 at 02:48 PM

    UserName - is tough. I didn't get a method to read that, when I was trying this, for Webdynpro.

    IP address of the requester is part of the HTTP header, of any Web request. Hence, I think there must be a way to read that. I know that it is possible to get the requester's IP address on Webdynpro, but for Webservice request, you may have to dig further.

    Search for "http header ip address" on google for more info on this.

    Thanks, Juwin

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 29, 2016 at 03:53 PM

    Hello Herry,

    Did you create a web service using ICF? If so, you can check cl_http_server=>c_caller_id.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello JN,

      Thanks for the answer.

      I created the Web Service from Function Module.

      I have tried TCode SRT_UTIL (Web Service Utilities: Error Log) ,

      there I can find the UserName & IP Address, but only if there are any errors on the Web Service calling

      The purpose is, I want to create the Web Service Log Table, so that I can always monitor who (UserName & IP Address) and when someone access my Web Service.