cancel
Showing results for 
Search instead for 
Did you mean: 

Read Browser Cookie

Former Member
0 Kudos

Hi experts,

my Abap-WD-Application needs the content of a browser cookie, which was created by a former apllication.In a BSP-Application i would do following coding in Event-Handler "OnInitialization"

[...

data: myCookies type TIHTTPCKI.

CALL METHOD request->GET_COOKIES

CHANGING

COOKIES = myCookies

...]

Any ideaa, how to handle this in a Abap-WD-Application?

Thanks in advance.

Regards

Herrmann

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

in BSP

[...

data: myCookies type TIHTTPCKI.

CALL METHOD request->GET_COOKIES

CHANGING

COOKIES = myCookies

...]

You can do this

in WD4A

[...

data: myCookies type TIHTTPCKI.

CALL METHOD wdr_task=>request->GET_COOKIES

CHANGING

COOKIES = myCookies

...]

Former Member
0 Kudos

solved my problem - great!

Answers (2)

Answers (2)

SergioFerrari
Active Contributor
0 Kudos

In Web Dynpro there is a clear separation between the application and the client.

So the instance of the object REQUEST is not available to the poor programmer.

I think that it's not possible to read the client side cookies.

Have a look to another interesting thread

where I suggested an a "dirty" alternative (SAP doesn't like it).

Sergio

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Use below link,

<a href="/people/koen.labie2/blog/2006/11/29/eating-cookies-with-webdynpro-and-bsp

Regards,

Chandra

(Award points if Helpful)

Former Member
0 Kudos

Hi,

the former Application, that created the cookie, is not a BSP-Application and creates only browser-cookies and no "server-side-cookies". So, i guess, this link will not work.

regards

Herrmann

SergioFerrari
Active Contributor
0 Kudos

Hi Herrmann ,

did you read my suggestion? Is it clear?

Sergio

Former Member
0 Kudos

Hi Sergio,

thank's for your answer, that REQUEST object is not available - it's a pity!

What i've implemented now: exit my WD-Application and calling a BSP-Application with redirect to my WD-Application. quite ugly, but it works.

best regards

Herrmann