Skip to Content
author's profile photo Former Member
Former Member

how to use insert query in controller.js file

Hi professionals,

I'm new to SAP HANA Cloud Platform and I have a question to ask...

how to call stored procedure or execute insert statement in controller.js file ??

I'm using SAP HANA Web-Based Development Workbench...

here is my code:

(.controller.js file)

navaddbrownies: function() {

var oView = this.getView();

var tem = {};

tem.DISHESID = oView.byId("browniesidinput").getValue();

tem.DISHESNAME = oView.byId("browniesnameinput").getValue();

tem.DISHESDESC = oView.byId("browniesdescinput").getValue();

tem.DISHESPRICE = oView.byId("browniespriceinput").getValue();

this is my button function, when I click this button , I want to stored these 4 data into my table.

my table name is : testing.table::Dishes.Dishes

my stored procedure name with 4 input parameters is : testing.procedure::CreateDishes()

Thanks for helping me.

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Feb 25, 2017 at 03:18 PM

    If you wanna have CRUD functionality I would recommend to create and XSOData service on HANA (maybe with Validition and/or Modification Exits depending on your requirements).

    If you wanna use your procedure you have to wrap it in a XSJS service which can than be called using jQuery.ajax.


    Add comment
    10|10000 characters needed characters exceeded