Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

IndexedDB

Would it be possible to add Support for IndexedDB?


Best Regards

Soeren


Hi Soeren


The support for our WebSQL in the browser will be converted to SQLite in the mobile devices. With that we can support all mobile devices and browsers (except IE).


Adding IndexDB will require a total rewrite of our existing database layer. And currently we do not see any big new change/upgrade/feature we benefit. So please help me out if you have better information than me on this. 


We have also been investigating into the path of pure JSON database (Key/Value) as we actually to today, and make it possible to search within the JSON data.


Regards

Ole Andre 

Hi Ole,


Thank you for your answer.

I am sure i do not have more Information than you on the IndexDB.


The idear of using JSON an building Indexes for faster searching an filtering would be a great help on complex queries.


Is there a way today where i am able to Loop through the data in a nested Loop having the inner Loop using an index or "Where clause"?


Thank you for your Feedback.


Regards

Soeren

Hi Soeren


If you have two models today, like VBAK/VBAP you need to loop using javascript. Pretty fast even with large dataset.


Can you provide me with more information on what you need, so I can write you an example ?


Regards

Ole Andre 


Hi Ole Andre,


I have a table with product variants and classification data. we would reach an amount of 2.000.000 records proberly.

For each class (Color, Size or other classes) we have a range of values (Colors: White, Black, Blue, Sizes: 38, 39, 40).

So: first we build the class and possible value ranges. Then by selecting one or more of the values, we Need to Show the corresponding product variants. Everything is working offline.


At the Moment we Loop to get the corresponding products, but the result also Returns variants that only fullfill parts of the selected values, so we Need to further tighten the result set.


It is here i am missing some filtering Tools on grouping Level.


I hope my explanination is clear ;->


Best Regards

Soeren

Hi Soeren


This is clear, but it would be nice to see how you run this in Neptune with models and the current javascript for it.


If you like we can setup a websession for it.


Are you running NAD 3.1 SP02 ?


Regards

Ole Andre 


Hi Ole Andre,


We are running NAD 3.1 SP02.


Here the script for building the value ranges:

$.each(modeloTableClassGroups.oData, function(i, data) {
if (data.MATNR == modeloPage_Detail.oData.MATNR && data.CHAR_VALUE === '') {
var oGroupHeaderListItem = new sap.m.GroupHeaderListItem("g" + data.NAME_CHAR);
oGroupHeaderListItem.setTitle(data.DESCR_CHAR);
oListClassGroups.addItem(oGroupHeaderListItem);
}

if (data.MATNR == modeloPage_Detail.oData.MATNR && data.CHAR_VALUE !== '') {
var oStandardListItem = new sap.m.StandardListItem("list" + data.NAME_CHAR + "_" + data.CHAR_VALUE);
oStandardListItem.setTitle(data.DESCR_CVAL);
oListClassGroups.addItem(oStandardListItem);
}


Here the script when the selection changes on the list:

var filters = [];


var items = oListClassGroups.getSelectedItems();
var filter = new sap.ui.model.Filter("SATNR", "EQ", modeloPage_Detail.oData.MATNR);


filters.push(filter);


for (var i = 0; i < items.length; i++) {
var filter = new sap.ui.model.Filter("SEARCHINDEX", "EQ", items[i].sId.replace('list', ''));
filters.push(filter);
}

var binding = oTableClassification.getBinding("items");

binding.filter(filters);


the SEARCHINDEX is a concatenate of the NAME_CHAR and VALUE_CHAR


now what i am missing is the last filter of removing the products that do not fullfill the complete Group selection.


I am a Little out of time this week, I would like to get back to you regarding the web session, but thank you for asking.


Best Regards

Soeren

Hi Soeren


Nice work.


I had a look at the javascript code, and think we might use another technique, a combination of ModelData.Find and your existing one, due to large dataset.


When you have time, get back to me on the websession and we will sort this out.


Regards

Ole Andre 


Login or Signup to post a comment