on ‎2007 Dec 05 10:15 AM
Hello,
I am setting a server side cookie for saving an internal table in the following way
concatenate 'xx' lijstnaam+0(18) kunnr into name.
CALL METHOD CL_BSP_SERVER_SIDE_COOKIE=>SET_SERVER_COOKIE
EXPORTING
NAME = name
APPLICATION_NAME = 'Thumb_lijst'
APPLICATION_NAMESPACE = 'Thumb_lijst'
USERNAME = kunnr
SESSION_ID = 'NONE'
DATA_VALUE = it_thumb_line
DATA_NAME = 'THUMB_LIJST'
* EXPIRY_TIME_ABS =
* EXPIRY_DATE_ABS =
EXPIRY_TIME_REL = '82800' "23 h
* EXPIRY_DATE_REL =
.
When I call this from the browser everything works fine, when I try to retrieve the cookie with the method GET_SERVER_COOKIE it works perfect.
Now my problem is that I want to generate this server side cookie before I even open up the browser.
In that way the client doesnt have to wait for a time consuming remote function call.
The problem now is that the cookie is perfectly generated in advance, but when I open the browser and try to retrieve the cookie it doesnt find anything alltough there is an entry in table SSCOOKIE.
So the RFC starts, gets the data and stores it in a cookie.
This generates two additional lines in SSCOOKIE with identical values as the first line.
The only field that differs is the expirytime.
So now there are three lines in SSCOOKIE.
If the customer then again clicks on a button to retrieve the cookie it works perfect.
So my question is : is it possible to generate server side cookies in advance so that when a customer opens his browser all is stored in cookies and there is no need to call time consuming RFCs.
Thanks in advance for any clues, info,
Dirk.
Request clarification before answering.
yours is a stateless or stateful application. if its stateful, instead of cookies, you can use application class to hold the data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured out that the cookie-mechanism is using import / export to / from database SSCOOKIE.
Those methods are using dataclusters wich are saved in transaction-specific ABAP-memory.
So I think that is the reason that my idea doesn't work.
Does anybody know a workaround for this problem ?
Regards,
Dirk.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.