Skip to Content
-1

Expose a calculation view as a oData service on Hana XSA.

Apr 26, 2017 at 11:20 AM

640

avatar image

Hello

This is my scenario:

I have an calculation view with a result of 3 values.

I expose this calculation view as a oData service.

On data access the result is not the expected result.

This happens when I use stack-views. In this example, the exposed view is created by a join between two others calculation views.

! On oData result, only the first value from view is repeated. In this example the first row is repeated for 4 times but only 1 time is expected.

Where can be the problem?

Thank you.

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

2 Answers

Benedict Venmani Felix Apr 26, 2017 at 05:22 PM
0

I am not able to infer a lot from the screen shot, but can you check if you are using a prjection or aggregation node in your calc. view. Also the join may be a cross-joins, and not be on an unique field and produces.

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

I use a projection node in the calculation view. The calculation result(not in oData service) - gives the right result. So, the join shouldn't be the problem, in my point of view.

0
Lars Breddemann
Apr 27, 2017 at 02:39 AM
0

The URL you use to access the OData service shows that you request the record count ($count) and not the actual values.

The result (3) is the correct, given your example screenshot.

You may want to adjust the URL to your expected result.

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

($count) in this case is used to show how many values exists in the TestSet entity(which is the calculation view).

If I adjust the URL in this way .....*xsodata/Test - the number of actual values is also 6 and not 3.

0

Nothing in your problem description indicates what you just now added. Please be more specific on the how to reproduce this issue and also provide an example of the actual problem.

0

"Nothing in your problem description indicates what you just now added".. let's try again.

1. I sad that I have a calculation view with a result of 3 rows, as showing the screenshot number 1.

2. I sad that I want to expose this calculation view as a oData service, as showing the screenshot number 2.

3. I sad that when I access the calculation view from oData service, it gives a result with 6 entities, as showing the screenshot number 3.

4. I sad that the ($count) is used only to see how many entities(rows) are in the result when I access the calculation view.

5. I sad that if the $count is removed, it also give the same result because $count is used only to see how many entities the calculation view returned, as showing in the screenshot below.

Please say if now is specific or not.

0

Ok, let's try the other way around: how can this be reproduced? Show us to create this behaviour and maybe somebody is willing to reproduce and analyse this for you. I'm certainly not interested in dealing with your defensive argumentation.

After all, you got the issue and seek help, isn't it? So, you should be interested in helping the folks who could help you.

2