Cookies in client WAS 6.20

Question: Hi,
can anybody tell me how to code the web application server so it can use cookies?

How works cookies?

Thanks

Answer:
Hi Maria,
Keep in mind that in the stateful applications the session id has to be the same else u won't be getting the correct data which has been set.

*SET COOKIE
-------------------------------------------------------
cl_bsp_server_side_cookie=>set_server_cookie(
EXPORTING
name = cookie_name
application_name = runtime->application_name
application_namespace = runtime->application_namespace
username = user_name
session_id = model->gv_po_session
data_value = lt_data
data_name = data_name
expiry_time_abs = time
expiry_date_abs = date ).

* GET COOKIE
-------------------------------------------------------

cl_bsp_server_side_cookie=>get_server_cookie(
EXPORTING
name = cookie_name
application_name = runtime->application_name
application_namespace = runtime->application_namespace
username = user_name
session_id = lv_session_id
data_name = data_name
IMPORTING
expiry_date = date
expiry_time = time
CHANGING
data_value = lt_data ).

hope this helps.
Copyright ?2007 - 2008 www.jt77.com