$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: true, vro: true, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content

OData association between a table and a calculation view with parameters

Hello community

Association between a table and a calculation view with parameters

Sample scenario -


"XSTestProject::order_text" as "order_text" // Database table

navigates ("NAV" as "nav");

"XSTestProject.models::order_items" as "order_items" // Calculation View

Key (“ORDER_ID”)

parameters via key and entity "IP";

association via parameters "NAV"

principal "order_text"("langu","country","ORDER_ID") multiplicity "1"

dependent "order_items"("langu","country","ORDER_ID") multiplicity "*";


How do I construct the URL for this scenario? The parameters from calculation view should be passed on to the keys in the order_text table.

order_text table - order_id(key), order_desc, langu(key), country(key)

Add comment
10|10000 characters needed characters exceeded

  • G B Florian Pfeffer

    Hi Florian

    My text table needs to be filtered for a specific language and it provides the master data required in my master - detail page.

    The calculation view 'items' gives the content for the detail page and I am calling another text table inside my calculation view which also needs to be filtered for a specific language.

    That is the reason behind the navigation from text table to the calculation view with params. Please provide me any suggestions for achieving this scenario.

    Also can you please confirm if I can construct an OData URL for 'Navigating to entities via parameters' ,because there is a clause in the developer guide that says -This navigation property cannot be used in combination with the OData query options $expand, $filter and $orderby

  • G B Florian Pfeffer

    Hi Florian

    I understand that in order to pass the parameters to the view, I need to navigate from view with parameters to a table.

    But can you please provide me a usecase where the section 'Navigation to Entities via parameters' can be used. In the example mentioned for the above section in the developer guide, navigation is created from a table to an entity with parameters.

    1) How can I construct the Odata url for the above? (navigation created from a table to an entity with parameters)

    https://host.hana.ondemand.com/com/test.xsodata/Table?$expand=Ref&$format=json -> says "Syntax error in $expand system query option at position '12': navigation property 'Ref' cannot be expanded."

    2) If I can't use a expand query option and I cannot pass the parameters to the calculation view, in what usecases can this scenario be used?

    Kindly help me

  • "to an entity" means in that case an OData entitiy which is in fact a calculation view with parameters. That means that you can define a navigation to a calculation view supplying the parameters with values from the entity you navigate from. For instance if your principal entity is a a table having a foreign key customer id and the dependent entity is a calculation view with a customer id parameter, the calculation view parameter customer id is supplied with the customer id from the principal entity record set when you navigate.

  • Get RSS Feed

0 Answers