Search This Blog

Monday, May 22

SAPUI5 Table Binding with Data Coming from Backend

The Data that need to be displayed on SAPUI5 Table control resides of a backend system. The Data is fetched via oData services read call and rendered in table UI Control in below fashion


   
oModelECST_FETCH.read(url5,null, null, true, function(oData, oResponse){ debugger;
 oInvoices = new sap.ui.model.json.JSONModel({ "Invoices" : oData.results }); oInvoices.iSizeLimit = 100000;    
var tab =this.getView().byId("invoicestable"); // invoicestable is the ID of Table UI Control
   
tab.setModel(oInvoices);
var i=0;
tab.bindAggregation("items", {

path: "/Invoices",
template: new sap.m.ColumnListItem({
cells: [
     //
 new  sap.m.CheckBox({visible:invoicesThat.strtoBool(oData.results[tableIndex1].Count)}).setSelected(true),
       new  sap.m.CheckBox("cbinv",{visible:"{Count}", selected:"{Sel}"}),
     
       new  sap.ui.commons.TextView({ text: "{InvNo}", design:"Standard", semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text: "{InvDate}", design:"Standard", semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text: "{Tin}" , design:"Standard", semanticColor:"{semCol}"}),
//        new  sap.ui.commons.TextView({ text: "{FormNum}", design:"Standard", semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text:"{TypeOfTx}",design:"Standard",semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text: "{TaxableGoodsVal}", design:"Standard", semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text: "{AmtTaxVal}", design:"Standard", semanticColor:"Default"}),
     
       new  sap.ui.commons.TextView({ text: "{InclTaxVal}", design:"Standard", semanticColor:"Default", visible:inctaxval}),
       new  sap.ui.commons.TextView({ text: "{LabourChrgesVal}", design:"Standard", semanticColor:"Default",visible:labchargval}),
     
       new  sap.ui.commons.TextView({ text: "{OtherChrgesVal}", design:"Standard", semanticColor:"Default"}),
       //new  sap.ui.commons.TextView({ text: "{LabourChrgesVal}", design:"Standard", semanticColor:"Default"}),
       new  sap.ui.commons.TextView({ text: "{GrossTotalVal}", design:"Standard", semanticColor:"Default"}),

       ]
})
});

   },function(err){
     debugger;
   });
 

6 comments:

  1. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.

    Salesforce Training in Chennai

    Web Designing Training in Chennai

    ReplyDelete
  2. Superb explanation & it's too clear to understand the concept as well, keep sharing admin with some updated information with right examples.Keep update more posts.

    SAP Training in Chennai

    ABAP Training in Chennai

    ReplyDelete
  3. Great Post, Thanks for Sharing
    Places more posts.....

    SAP Online Guides

    ReplyDelete
  4. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.

    SAP Training in Chennai

    SAP ABAP Training in Chennai

    ReplyDelete
  5. Thank you guys for providing online SAP Training. It is very helpful.

    ReplyDelete
  6. Here i had read the content you had posted. It is much interesting so please keep update like this.

    SAP ABAP Training in Chennai
    SAP MM Training in Chennai
    SAP HR Training in Chennai

    ReplyDelete