cancel
Showing results for 
Search instead for 
Did you mean: 

Analytical View unable to expose data using XS engine

Former Member
0 Kudos

Hello All,

I am getting below error message when i am trying to expose Analytical View data using HANA XS engine.

<message xml:lang="en-US">Service exception: feature not supported.</message>

I tried exposing one of the Analytical view  in our Sandbox Server and was successful in exposing the data but when trying to expose from our development server I get the above error message.

This is the logic I used in my .xsodata file

service namespace "workshop.services" {

"_SYS_BIC"."package/ANALYTIC_VIEW" as "XYZ" keys generate local "GID" aggregates always (SUM of "QUANTITY");

}


Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member195440
Participant
0 Kudos

Hi Ramesh,

This is an old post but we encountered a similar issue when exposing an Analytic View via an odata service so this might help others.

I believe the problem is solved by specifying how you wish to aggregate the data. This can be done in the service OR via the requested url.

In the service, you can add:

service {

     "sample.odata::av_sample" as "Sample"

     keys generate local "ID"

     aggregates always (SUM of "VAL");

}

Have a look on this thread for more information on this - http://scn.sap.com/thread/3346465

Alternatively, you can also specify the aggregation in the url by adding:

$aggregate=sum(VAL) as VAL

For both methods. when you call the url specify the group you wish to create by the $select parameter:

sample.xsodata/Sample/?$select=COL1,VAL

This will return the sum of the VAL column for each value in COL1.

Hope this helps!

Former Member
0 Kudos

Hi Oliver,

I have a rollup for example 52 week highs in a year. It works when the Analytical View is viewed thru the SAP HANA STUDIO. But when I call the Analytical View from a XSODATA.. it does not work.. I have defined the keys, tried out even select.. does not work.. it does not rollup a value for a week,

former_member195440
Participant
0 Kudos

Hi,

Can you post the XSOData definition you are using and also the url that is causing the "Service Exception". Additionally can you post your HANA revision number?

I have this working here so interesting to see what is different with your development.

Oliver

Former Member
0 Kudos

Hi Oliver,

Thanks for replying so fast!

Please find attached the details of the XSOData and URL results.

I have tried out variations in the XSOData definition of keys with no success.

Also attached are the rollups on day to a week working perfectly in STUDIO.

The main objective is I don't want to retrieve all the days data and then do the rollup on a week on client side, defeats the purpose of SAP HANA server side processing power.

I can email you the

Please share with me any example of rollup that you have implemented and had it workiing from XSOData service

Thanks

Anbu Anand

+91 7507816869

former_member195440
Participant
0 Kudos

Hi,

I think your problem is in your service definition. You need to use "key generate local" since specifying the keys doesn't really make sense (only OData requires the keys to be there).

Try: ("ST_ID" is just a name I have given to the key here).

service namespace "stock.data"{

          "_SYS_BIC"."52weekhigh/52WEEK_PRICEHIGH" as "stockservice"

               key generate local ""ST_ID"

              aggregates always (MAX of "PRICEHIGH");

}

And I think the url you posted will still work with this. Please try and report what happens.

Regards,

Oliver

Former Member
0 Kudos

Thanks Oliver, works now!! Great.. we had tried.. the word..

'keys generate local "ID"'   ( KEYS) .. with no luck.. but (KEY) was the right one.. as pointed out by you..Now our output is 1/10 of the original and has saved us lot of retrieval time.

Any documentation on the XSOData service definitions, can you please send us the link.

Thanks

Anbu

former_member195440
Participant
0 Kudos

Hi,

Glad it works! The documentation is located here http://help.sap.com/hana_platform/ for all the features of HANA.

For XSOData services, have a look at the SAP HANA Developer Guide. On page 301 it defines the "OData Service Definition Language (OSDL)" which is how to write XSOData services.There are also lots of examples to get your head around what is happening here.

Regards

Oliver

Former Member
0 Kudos

Thanks Rogers,

Is there any possibility to use distinct in the url ( something similar to ?$select=COL1,VAL ) or at the time of creation of .xsodata file..

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ramesh,

As HANA's internal architecture computes the measures only as
aggregation and not individually.

Hence system expects your columns which are declared as Measures must be aggregated.

In your case

Check all the attributes other than "quantity" are measures.

I guess it may not be.

So change the measures in to attributes.

If you are still facing errors, please post here.

Regards,

Siva.

Former Member
0 Kudos

Hi Guys,

Am using  SAPUI5 drop down box in my program, and passing the values from the odata file, but the issue is "am getting the values inside the dropdown including duplicate values ".

Am Using Following code

var model = new sap.ui.model.odata.ODataModel('http://54.169.54.210:8000/TEST_PROJ/CAL_VIEW1.xsodata/',true);

var dropdown = new sap.ui.commons.DropdownBox('dropdownBoxid');

  1. dropdown.setModel(model);

  var itemTemplate = new sap.ui.core.ListItem();

  //itemTemplate.bindProperty('key', 'OUT_CODE_T5');

  itemTemplate.bindProperty('text', 'OUT_CODE_T5');

  dropdown.bindItems('/outlet_view_details1', itemTemplate);

dropdown.placeAt('id1');


i want to remove those duplicates from my drop down ..

is there any way to remov? if yes, can you help me to how to remove those duplicates from the drop down box.??


It Will help me a lot,

Thanks and regards,

Bharath.

Former Member
0 Kudos

Hi Ramesh,

See my reply to Oliver.. it is not working on a Analytical view for me.. let me know if you found a solution.. basically it is a group by.. or rollup that works perfectly when viewed on STUDIO.. but not thru an XSODATA..

Former Member
0 Kudos

Hi Ramesh

  can you try it on simple column table and check it ,one reason could be there is no key defiend.Just to check can you try it on simple table without primary key and with primary key.That could help us for trouble shooting.

Thanks

Santosh

Former Member
0 Kudos

I tried exposing using Attribute View in the same Development server and it is working fine for me.Only issue is with Analytical View.

Former Member
0 Kudos

Hi Ramesh,

To further drill the root cause for this error ...can you please look into trace file present in your administration console of SAP HANA studio----under diagonsis file section ---pick file with name xsengine_servername.trc.....in this it will let you know at which point of your code you are getting error.

You can also put debugger in browser & can see what error it is producing.

Can you please update this information , so that we can help you.

Thnkss

Kulwinder

Former Member
0 Kudos

Hi Ramesh

  Inaddition to what Kulwinder mentioned.

Incase of attribute views the key filed is mandatory, but can you check whether your datafoundation have any keys defined.Otherwise can you add a one of the keyfields in the output and try

Thanks

Santosh

Former Member
0 Kudos

Hi Kulwinder,

I tried looking into Network tab of chrome browser and it just gave a Stauts code: 400 Bad Request.

Coming to trace file I am not familiar with this, but when i looked into it I found one error message in the file as below..not sure if this trace file belongs to my application or not as i couldnt see any info related to my webservice..

caught TrexNet exception "an invalid parameter was given" during deserialize executor requesting

ERROR: failed to open channel (XX.XX...some IP no) reason: connection refused

  message: an invalid parameter was given

  info:    TransToken is invalid

But this error no getting replicated for either Attribute view or Calculation view..

Thanks

Ramesh

Former Member
0 Kudos

Hi Santosh,

I am facing this issue only for Analytical View.