Skip to Content
0
Former Member
Jun 21, 2007 at 03:31 PM

Problem with server side cookie

38 Views

Hi, I have a problem with a server side cookie. I'm trying to store a cookie trough the cl_bsp_server_side_cookie=>set_server_cookie method in the OnInitialitation event handler of a bsp (my bsp application is non mvc) and then to retrieve this cookie trough the cl_bsp_server_side_cookie=>get_server_cookie method in the OnInputProcessing event handler of the same bsp. In this cookie i'm storing a internal table but i'm not getting it when i invoke the get_server_cookie method.

This is the source code that i'm implementing:

OnInitialitation:

wa_comunnication_data-mobile = wa-mobile.
          wa_comunnication_data-telefono = wa-tel_number.
          wa_comunnication_data-email = wa-email.
          APPEND wa_comunnication_data to comunnication_data.

           cl_bsp_server_side_cookie=>set_server_cookie(
              EXPORTING
               name = 'cook_comunnication_data'
               application_namespace = 'NONE'
               application_name = 'NONE'
               username = 'NONE'
               session_id = runtime->session_id
               data_value = comunnication_data
               data_name = 'comunnication_data'
               expiry_time_rel = 720 ).

OnInputProcessing:

cl_bsp_server_side_cookie=>get_server_cookie(
      EXPORTING
       name = 'cook_comunnication_data'
       application_namespace = 'NONE'
       application_name = 'NONE'
       username = 'NONE'
       session_id = runtime->session_id
       data_name = 'comunnication_data'
      CHANGING
       data_value = comunnication_data ).


     READ TABLE comunnication_data INDEX 1 INTO wa_comunnication_data.

regards, marcel.