I am trying to find out how could I get information about external session id? I see it on a very top of the abap stack:
However, did not find any way to access this variable in the Data Provider Class. Do you have any tipp?
I am trying to find out how could I get information about external session id? I see it on a very top of the abap stack:
However, did not find any way to access this variable in the Data Provider Class. Do you have any tipp?
The session_id is actually a static attribute specified in the IF_HTTP_SERVER interface. Because of the way in which ABAP sessions work, it is not possible to have two HTTP requests processed simultaneously in the same ABAP session, so I guess it makes sense to have the session_id as static.
Anyway, you can do something like this in your DPC_EXT class to obtain the session:
DATA(lv_session) = cl_http_server=>if_http_server~session_id.
I had the same question and came to the same solution as Serban provided. However, I hoped that sending multiple requests from the same browser window would have the same session id -- what is my understanding of session ids BTW. Which does not seem to be the case: subsequent odata calls from the same browser window to the same service (actually the exactly same service calls) showed always different sessionids in the debugger. So I think the sessionid on abap side is not really useful.