Skip to Content
0

XSJS Data Fetching on Button Click

Apr 19, 2017 at 07:53 AM

136

avatar image

Hi All,

I have two views.

When i click on abutton in second view am displaying two tables.

For fetching data from hana db am using xsjs service.

In my hana DB i have one lakh records.These records am fetching on Button click for second page navigation.Now it is taking more time to navigate.

Is there any alternative to display the page as soon as i click.

Regards,

Shekar.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Srikanth KV Apr 19, 2017 at 03:47 PM
0

is there any reason to use XSJS service instead of XSOData ??

If you use XSOdata then you can bind the records to table?? this will fetch first 20 records and remaining will load after scrolling/pagination....

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Srikanth,

When am trying to create odata service it is throwing below error.

Error stack: Error
at ByteCode.read (http://52.220.235.40:8000/sap/hana/ide/editor/plugin/editors/hdbdd/rndrt/rnd.js:688:23)
at new OSDLParser (http://52.220.235.40:8000/sap/hana/ide/common/plugin/parsers/xsodata/OSDLParser.js:17:27)
at http://52.220.235.40:8000/sap/hana/ide/common/plugin/parsers/service/XSODataParserImpl.js:7:15
at Object.execCb (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1550:21)
at Module.check (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:806:28)
at Module.<anonymous> (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1041:13)
at http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:111:14
at http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1084:6
at each (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:39:19)
at Module.emit (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1083:5)
-----------
Error stack: Error: Error loading module from path 'sap.hana.ide.common.parsers/service/XSODataParserImpl'
Original error message:
Error stack: Error
at ByteCode.read (http://52.220.235.40:8000/sap/hana/ide/editor/plugin/editors/hdbdd/rndrt/rnd.js:688:23)
at new OSDLParser (http://52.220.235.40:8000/sap/hana/ide/common/plugin/parsers/xsodata/OSDLParser.js:17:27)
at http://52.220.235.40:8000/sap/hana/ide/common/plugin/parsers/service/XSODataParserImpl.js:7:15
at Object.execCb (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1550:21)
at Module.check (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:806:28)
at Module.<anonymous> (http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1041:13)
at http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:111:14
at http://52.220.235.40:8000/sap/watt//lib/requirejs/require.js:1084:6

0
Mantri Shekar Apr 24, 2017 at 06:52 AM
0

Hi Srikanth,

Actually i have a requirement to delete,update,create etc for that i went through xsjs and as i am using xsjs for all the operations i preferred xsjs for select as well.

Is there any alternative in xsjs to do this or do we need to go with xsodata.

Regards,

Shekar.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
0
Akhilesh Upadhyay Apr 24, 2017 at 11:35 AM
0

i think you can write a sql like query and use WHERE and TOP to filter out the data in your xsjs service.

Share
10 |10000 characters needed characters left characters exceeded