on 07-10-2012 9:59 AM
Hi all,
Please tell me how much data we can send using the set_server_cookie method.
Thanks
Ashish
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>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.
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.
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.