cancel
Showing results for 
Search instead for 
Did you mean: 

Session id of Webdynpro

ArtiBhat
Associate
Associate
0 Kudos

Hi Experts,

How to get the session id and how to create the server side cookie in web dynpro for Abap?

Regards,

Arti.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can get the cookie like this.

data :request type ref to if_http_request,

request = wdr_task=>request.

call method request->get_cookie

exporting

name = 'NAME YOU HAVE GIVEN'

importing

value = lv_cookie_data.

Best regards,

Rohit

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That would be a client side cookie and not the server side cookie that the poster asked for. Also that is an internal API. Be careful because this function you named only works when Web Dynpro runs in a browser. The same function wouldn't work when using the NetWeaver Business Client Smart Client Renderer or the Flex Client.

Former Member
0 Kudos

Thanks for info Thomas,

I just want to tell her the way to get cookie.

Thanks again for updates.

Best regards,

Rohit Mahajan

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Thanks for info Thomas,

>

> I just want to tell her the way to get cookie.

>

> Thanks again for updates.

>

> Best regards,

> Rohit Mahajan

I think perhaps you missed an important distinction in the original question. Putting aside the issue of the non-public API, the poster was asking for server cookies. What you posted would pertain to client side cookies. They are two completely different things.

vickyokrm
Participant
0 Kudos

Hey Thomas,

As u said i want to transfer the data between WD Components will Server side cookies will help me out if yes please give me solution to solve it.

Thanks,

Vignesh.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes you can use server side cookies to pass data between two WD Components running on separate user sessions. If your two components are in the same user session, then you can just use a singleton class.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can use the BSP Server Cookie functionality in Web Dynpro just fine. I've used it to pass data from Web Dynpro to BSP or to pass large amounts of data between two Web Dynpro sessions. In this case you simply don't need to supply a session ID. You want to be able to read data across sessions. As already pointed out, why would you want to store data within the same session? Web Dynpro is always stateful, so there is no need to persist within the same session.

Former Member
0 Kudos

Hi Arti,

i dont think it is possible to get session ID and create a server side cookie. These details are encapsulated by the WebDynpro Runtime classes & framework at least in WD for ABAP. Whats you exact requirement. Webdynpro abap has direct access to R/3 backend...all server side temporary storage can be done in temporary tables , session ONLY storage can be done in the WD Component via variables...

Greetings

Prashant