Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

What to choose as service: XSJS or XSOData?

Hello SDN!

In our HANA SPS08 we have master table and some dependent tables with association 1...n in DB. Data for these tables should come from UI in the same request. During saving GUID should be generated for master record and then used in dependend records. Which way is preferred for this task - using XSJS service or using XSOData service? Service will be consumed by SAPUI5.

I know how to do it in XSJS but I'm not sure that build XSJS service is the easiest way.

And the second little question - what does navigation in XSOData means?



Former Member

I would personally always try to start with XSODATA since it provides a standard service interface and no/low custom coding approach.  I would only use a custom XSJS service for unusual data sources which can't be wrapped by a view or when non-Odata interface is needed. From what you what you described I don't see why that couldn't be accomplished with XSODATA using a Batch operation with content-ids and XSJS or Stored Procedure exits during the update/insert operations.

Navigation in XSODATA - you mean the Navigates keyword part of the entity definition? This is the where you use an association to tell the OData how navigation is possible between one or more entities. This will result in generating HTTP URL links in the resulting service data to the endpoint of the navigation specified.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question