Skip to Content

SAP Gateway Get ~remote_addr from request header

Jan 24, 2017 at 05:59 PM


avatar image

Dear Experts,

I want to get the value of HTTP Header attribute ~remote_addr in create_entity method. but using below code is not getting it

"read headers
lo_facade ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lt_client_headers = lo_facade->get_request_header( ).

It's only caught in lo_sutil_runtime->payload_server_request( )

Thank you.

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

1 Answer

Krishna Kishor Kammaje
Jan 25, 2017 at 04:09 AM

SAP might be ignoring this header purposefully.

Just curious. Why do you need this header?

Show 3 Share
10 |10000 characters needed characters left characters exceeded

We have developed B2C mobile application. and the user must use his customer number and password to verify his identity to able to create the sales order. That's why I need his IP along with the used device ID. for logging and to be used later in analytics.


If it is a mobile application, you can ask the developer of the UI to send the user's ip address as a custom header. (so that you need not rely on ~remote_addr

Krishna Kishor Kammaje

I will implement this solution if there is no other way to get it automatically. Thanks for the advice.