Skip to Content

How to call a second odata service in a standard fiori application extension?

I have to extend the standard PO approval Fiori application and I have display a report and some graphs in the item details page by passing the material number, plant to the SAP system and retrieving the data based on it. I have created a second OData service containing the methods for the extensions. so how do I now call the OData service in the controller and how do I pass the material number from the standard application to it???

code to call second service in onInit : function()

var sServiceURL = "/sap/opu/odata/sap/MM_PO_APPROVAL_SRV_01/";
  var oModel_mock = new sap.ui.model.json.JSONModel();
  var oModel = new sap.ui.model.odata.v2.ODataModel(sServiceURL);
  var sPath = "get_Quote_comparison(matnr='00000000000200001')/Set";, {
   success: function (odata, response) {
    oModel_mock.setProperty("idQuoteCompareTable", odata);
    oView.setModel(oModel_mock);"Data read");
   error: function (e) {
    var oModelBlank = "Error";
    oModel_mock.setProperty("idQuoteCompareTable", oModelBlank);

table code

<Table id="table1" noDataText="No Data" item="{path : '/get_Quote_comparisonSet'}">
         <ColumnListItem id="item2" type="Active">
           <Text text="{prevpo}"/>
           <Text text="{budget}"/>
           <Text text="{rfq1}"/>
           <Text text="{rfq2}"/>
           <Text text="{rfq3}"/>
         <Column id="column01">
           <Label id="idQC2"/>
         <Column id="column02">
           <Label id="idPrevPo2" text="Previous PO"/>
         <Column id="column03">
           <Label id="idRFQ12" text="RFQ1"/>
         <Column id="column04">
           <Label id="idRFQ22" text="RFQ2"/>
         <Column id="column05">
           <Label id="idRFQ32" text="RFQ3"/>
         <Column id="column06">
           <Label id="idRFQ42" text="RFQ4"/>
         <Column id="column07">
           <Label id="idRFQ52" text="RFQ5"/>

please Help!!….

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers