on 06-19-2019 11:01 AM
Hi Experts,
I have a question,
We have a Fiori App where we use a valuehelp that shows some values when you open it. (0...1000 values)
There is also a searchfield provided on the valuehelp.
Each time we search the whole valueset must be loaded (because we have to do a filtering...)
Now, this takes a while each time you enter a character in the searchfield.
So we would use a singleton class to store the whole valuehelp dataset in it.
But, it looks like every time the service is called, the signleton class is initial.
Is it possible to use signleton classes in a gateway service?
The Singleton won't work because each backend access creates a new ABAP session & hence the singleton is no longer available. So it would create a new singleton instead.
If searching the value set is performance intensive, then you can serialize the singleton of the service once created & deserialize it for the next call. (cf. serialization of ABAP class instances).
Now, the question is how frequently do you want to refresh this "buffered" singleton? You might have to write a backend report to clear this buffer & schedule it as a job.
BR, Suhas
PS - Are you sure that the SAPUI5 framework doesn't have any mechanism to buffer such data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.