on 09-12-2017 11:09 PM
Hi people, Im new to this SAPUI5 technology and I have a simple (at last it should be...) issue: I have built an app with some input fields and a "save data" button, and after filling those input fields I would like to get the entered data saved on a Hana Table. I got some outdated tutorials and lots of information and I didn't solve my problem yet, m completely lost, can someone help me?
Hi Juliano,
For inserting data from SAP UI5 to HANA we have 2 options
1) Creating .xsjs Service and Insert Data into HANA DB
2) Creating .xsodata service and Insert Data into HANA DB.
Regards,
Shekar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok Mantri, Im going to take a look on that, I was trying this tutorial here: https://blogs.sap.com/2015/03/17/how-to-create-a-new-odata-service-using-the-web-based-workbench/, but Im not sure if this is what Im looking for!
Thank you very much!
Juliano.
Hi Juliano,
Exactly this is what you need to do.
Regards,
Shekar.
I didn´t find a tuto to help me with this, could you indicate me some? I´ve created a DB and when I try to access the SAP HANA Web-Based Development Workbench, it asks me to enter a username and password, but I have no idea about what username/passoword it´s talking about, I try to fill it with the same credentials I use to access the WEB IDE, but unsuccessfully 😕
Thanks in advance.
Hi Juliano,
User name is SYSTEM and password is the password which you entered while creating DB
Ok, Im still on the same, completely lost, some tutorial which can help me with this? I've build up my DB on SAP HANA and I have my app created on SAPUI5, but no idea about how to do this link. Maybe Im searching it wrong, because I really find lots of informations on web, but nothing that explains it on a simple way.
Thanks!
Hi Juliano,
There are Multiple ways of creating xs project(Basically to consume xsjs or xsodata services).
First way : Through SAP Hana Studio. Follow below link to use first approach.
https://blogs.sap.com/2015/06/08/steps-to-create-xs-application-project-using-hana-trial-instance/Second way : In Hana web based Development workbench u can create a SAP UI5 Project and create xsjs files as for your requirement. Follow step 1 and step 2 in below link.
https://www.sap.com/india/developer/tutorials/hana-web-development-workbench.html
Hope this would be helpful.
Regards,
Shekar.
Well, thank u very much for your attention Shekar. I´ve built the XS project as well as the xsjs file, following the steps described on the second tutorial you post, but I don´t know how to proceed to make the whole thing works. I mean, I have a xsjs file with some code inside, but I don´t know what to do now on the SAPUI5 application to call this, could you help me? I´ll show here the code I´ve written on my xsjs file:
screen-shot-11-16-17-at-1139-pm.png
Regards.
Juliano.
Hi Juliano,
If you run the respective XSJS Service you will get a URL .
Apply below steps on a Button Click
var url = "someurl";
var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData(url,object,true,"POST");
Here object is nothing but the Object where you stored the entered Data
true for sysnchronous or asynchronous mode for executing specific Service
POST- as you are trying to insert data I wrote Post.If you want to fetch the data you can replace POST with GET.
Are you using annotaions based design or importing an oData moel for interacting with the backend?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharath, m not using anything yet, I just know what a need to do, and 'til now I just put the input fields on my app and they are working already. Im really really new to this technology, I've started from scratch some weeks ago, and the only demand I got from my client is: "An app with 8 input fields, and you save the entered data on a Hana Table".
Im still trying to understand what Hana really offers, m not sure if I really need a backend or if I can just use some Hana functionality to save my data.
Thank very much for your attention!
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.