cancel
Showing results for 
Search instead for 
Did you mean: 

working of SET_SERVER_COOKIE method

Former Member
0 Kudos

Hi all,

Please  tell me how much data we can send using the set_server_cookie method.

Thanks

Ashish

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The data is written in a cluster table. So really the only limitation would be on the maximum size of the string/xstring which you could pass into the method; not on the storage itself.  However I would hope the actual size you wish to store is much smaller than the theoretical limit otherwise you run into serious performance problems. 

Former Member
0 Kudos

Thanks Thomas

actually i am using this method three times to pass three internal table

that's why i was worried about the security and performance as well 

if i use interface node and then pass data from one component to another comp using external binding then it will be better or not

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>if i use interface node and then pass data from one component to another comp using external binding then it will be better or not

Probably.  Server Cookies write data to the database, so there is more overhead involved.  Server Cookies are really designed for sharing data between separate user sessions.

When you are within one user session you can share the data in memory; which is certainly faster and more secure.  I actually perfer an object instance of some sort (static attribute) as opposed to cross component context binding. Cross component context binding has a higher memory overhead because the data has to be physically copied for each component usage.

Former Member
0 Kudos

Thomas could you please explain more as i am not expert in this field .

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Explain more on which concept?  I mentioned a few. Do you mean the static attribute?  If so that's just a normal ABAP OO concept. Its call a Singleton Pattern.  You can read about the concept online as its not ABAP specific.  It involes creating a class which has a static method to return an instance of itself. That way mulitple WD Components can share the same class instance and therefore all the public data of this class.

Former Member
0 Kudos

Hi Thomas ,

thanks for your help.

one more question from set_server_cookie

if i  call this method multiple time to pass multiple internal table then performance will be affected or not.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is a cost for each cookie read/insert, of course.  However I don't suspect that it makes that much difference if you insert multiple or all together in one.  The total size of all objects inserted is really the factor. You could probably insert 3 small tables faster than one larger table. 

Personally I generally only do one sever cookie regradless of number of internal tables.  I create a class with the IF_SERIALIZABLE interface.  I add my internal tables as public attributes of this class. I then serialize this class into an XSTRING and then store this single XSTRING into the server cookie. This simplifies the process of using server cookies.

Former Member
0 Kudos

Hi Thomas ,

could you please tell me hoe to get borders and how to merge cell in excel in webdynpro abap