cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway Get ~remote_addr from request header

Ibrahem
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

SAP might be ignoring this header purposefully.

Just curious. Why do you need this header?

Ibrahem
Participant
0 Kudos

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.

kammaje_cis
Active Contributor

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

Ibrahem
Participant
0 Kudos

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