Bài đăng

Hiển thị các bài đăng có nhãn ODATA

[Backend] Best practice working with HANA XS on Cloud Platform

Hình ảnh
Hi, I will share some best practice that took me hour to figure out what's solution. Perquisite: I follow the tutorial series here , so things are basically set up. 1/ Cannot add more column to table  After I completed all the tutorial series, I've got a XS service expose table data as OData service. And I can use the service to bind onto UI in SAPUI5 application. Then I come up with idea to add more data & relation so that I can do more with my application. That's when I got error: Even I add one column to my table, added data using SCV import. The 2 files are saved & activated successfully. But the data didn't returned in the Data service. When I check in the catalog of the service, it look like this (the new column "INSTOCK" does not have data): Issue with "INSTOCK" column I've thought that I cannot modify the structure of table during the database is up & running. So I tried to restart the database but it didn...

[sapui5] [odata Model v2] use oModel.metadataLoaded().then instead of oModel.attachMetadataLoaded() to avoid unexpected error in runtime as Fiori launchpad

Hình ảnh
Hi, The 2 below code seem to be similar: 1/ Use attachMetadataLoaded() 2/ Use private property: promise metadataLoaded() However, they're different if you are running in Fiori launchpad, as the moment I wrote this post. The function of the first approach (using attachMetadataLoaded()) will not be called. You need to use the second at for now. And actually, the ui5 template go with the 2nd one. I've tried the first approach & it did trouble me a lot, so you should stick with the best practice template from SAP. ---V---

[sapui5] [model] Set Operation of Odata model to client side

Hình ảnh
Hello, You can use the  operation mode  parameter for the v2.ODataModel. This parameter can be set at the model level  (see the constructor defaultOperationMode parameter) or at  binding level  (see the constructor operationMode parameter). Based on this parameter, the model fetches data differently: Server mode : data is fetched as needed (paging, sorting and filtering is done on the server side; each sorting, filtering or paging operation triggers a request). Client mode : the whole collection is requested initially. All sorting, filtering and paging operations are done on the client. Auto : a combination (based on other model settings). To read more about the operation mode, check out the corresponding documentation:  OperationMode . If you want to use this only on one list, then you should you the binding variant: <List items = "{path: '/Collection', parameters: {operationMode: 'Client'}}" > <StandardListItem title = ...

Simple Step-by-Step SAP-Gateway Service Guide

Hình ảnh
Hi All , Finally thought of writing blog after struggling to create simple o-data service to perform basic operations including media and deep entities. So I don’t want you all to struggle and waste your time… This is for Beginners not for Experts, Create your simple gateway service by following provided steps. Service is all about Employee Information System. Tables Used.    1.  Employee Details table[Principle data]Or[Header Information]    2.  Employee Contact details(Ph no on working days and on leave)[Line Item] 3.   Employee Photo Details. Structures Used [But U can directly use Database tables to include structure to create Data types] 1. Employee Details. 2.   Employee Address Info[Include structure in Emp Details table]. 3.   Employee Contact details(Info like Contact no during working days and on leave). 4. Employee Photo details. Let's start rock...