Skip to Content

XSJS Data Fetching on Button Click

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Apr 19, 2017 at 03:47 PM

    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....

    Add comment
    10|10000 characters needed 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

  • Apr 24, 2017 at 06:52 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 24, 2017 at 11:35 AM

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

    Add comment
    10|10000 characters needed characters exceeded