Bài đăng

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

[sapui5] [deployment] Error when deploy project from Web IDE to ABAP Server

Hình ảnh
1/ Cannot find index.html file  This is usually caused when you override the folder that was created by Eclipse before. Let take back a little in history, when sapui5 is new and not yet have their own Web IDE. Developer needs to use Eclipse to develop & deploy to ABAP server. And the structure of webapp in Eclipse is different than in Web IDE, this leads to the issue you're having. Solution: To fix it, delete all the configuration relating to the old folder structure created by Eclipse in configuration files (which are the " UI5..." files) . The file created by Eclipse is usually the file inside WebContent folder. ---V---

[sapui5] [list] [fragment] Fragment/Dialog binding not working

Hình ảnh
Possible reason: You haven't set model to that dialog/fragment. This is because of the ui5 framework concept: A new fragment will have its own model. If you want that fragment has the same model as the view. Please use the below command line: this.getView().addDependent(this.oPictureDialog); ---V---

[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] sap.ui.table.Table renders columns in-correctly after toggling visible from false to true (contained inside a IconTabBar)

Hình ảnh
Hi, The issue like this: It happens when the table gets switched from visible false to true. (when the table is invisible, there's will be another control (Planning Calendar) displayed instead) This sap.ui.table.Table is contained inside an IconTabBar. Reason: Still unknown. It may come from the renderer after switching from invisible to visible. It may cause from the IconTabBar container. Workaround: For now, I need to refresh the binding of the table, so that the will re-render the table columns as well, which solve the issue. But it's just still a work-around. ---V---

The difference between sap.ui.controller & sap.ui.define

Hi there, Have you wondered why controller in sapui5 defined in different ways? You can have a look at the source blog here: http://www.planetofbits.com/sap-ui5/understanding-sap-ui-define/ The author has clearly explained the differences, and also provide an example for you to easily understand the concept. ---V---

[sapui5] Work with planning calendar

I found this useful topic regarding the pain point of Planning Calendar, where you can use the code to execute code on the event "updateRows" of Planning Calendar: https://stackoverflow.com/questions/35890915/is-there-an-event-in-sap-m-planningcalendar-for-the-rows-loaded ---V---

[sapui5] log on fiori launchpad as another user (for DEV)

Add the parameter into your URL: ?spnego=disabled#Shell-home Look like this: https://abc.test.com:44351/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?spnego=disabled#Shell-home ---V---

[sapui5] Make Static Control (like Planning Calendar) scrollable

Hình ảnh
Hi, Not all UI5 control is able to scroll when the screen is not wide/long enough. This will become seriously painful when the app is being used in small screen devices like phone or tablet. Like this: That's why you should know how to make all the UI5 scrollable, by using this control: Scroll Container After containing all the content inside the Scroll Container, the thing would work: Cheers! ---V---

[sapui5] [depoy] Import/Deploy SAPUI5 application to ABAP repository from LOCAL SAP Web IDE

Hình ảnh
Hi, ABAP Repository is the default repository of SAP system, until the time I wrote this post. Hence it would be essential that you know to import/deploy your application from LOCAL Web IDE. I want to emphasize the "Local" here because as you know, we usually use local Web IDE (personal version) for development since it much faster than the cloud version. (for some region that SAP/your company does not have cloud server). Here's how: 1/ Import application from ABAP repository 1. Setup Destination to your SAP system (which have ABAP repository).  Please use correct param like in the picture. Because some param is required to allow you to use that destination for importing & deploying application. 2. Import new project.  3. Choose the system.  3. Find your repository.  5. Finish 2/ Deploy application to ABAP repository 1. Setup Destination to your SAP system (which have ABAP repository).  The same is import ap...

[sapui5] Import CSV & Excel file into JSON format to handle in frontend

Hi, Here's some basis step: - Include external library to convert CSV to JSON. Details here - Use sapui5 control to upload file & get data from it. - Using the library to convert the format. - Proceed your coding with JSON data. Cheer. ---V---

[sapui5] Include external (from Internet) library into sapui5 application

Dear, SAPUI5 defined their own way to load external library, not just simple like using <src> tag in index.html. The details can be found here: https://blogs.sap.com/2017/04/30/how-to-include-third-party-libraries-modules-in-sapui5/ ---V---

[WED-IDE] SAP Web IDE can't start up after using newer version with the same user

Hình ảnh
Hi, This took me the whole afternoon to figure out. Problem: Before the error, i'm using local SAP Web IDE version 1.45 with user ABC. After trying with new local sap Web IDE version (1.53.1), I create the same user ABC with the same password & email (thanks to Chrome's autofill function). I logged in and got this error: Unhandled Error: failure during creation of required plugins -> ... I thought that the version 1.53.1 would have some problem. But it's not the reason. I tried with the older version on my computer, but the error persisted. I also tried to restart: Orion server, Chrome, my computer. But nothing worked. I took me the whole afternoon to research using google but no solution found. The reason came out when I tried with Firefox, it worked. Reason: So the reason I think come from the Chrome's cookings & password save mechanism. I'm not sure what is the exact reason, but I think because of the same user & password...

[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...