Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Girish_Kumar_Gu
Participant
Introduction

Recently I was developing a Fiori Extension app to standard Manage Purchase Requisition app.

As we know, all standard UI5 apps makes use of OData batch processing to consolidate multiple http calls into one. This is a standard optimization technique.

However, during development while debugging the application I wanted to disable the batch calls so that I could analyze each http call for its request, response and all other details.

Implementation

There are generally two ways to disable batch OData calls.

  1. By using API:
    oDataModel.setUseBatch(false);​


  2. By setting useBatch parameter to false in App's manifest.json file:
    "models": {
    "": {
    "dataSource": "mainService",
    "settings": {
    "useBatch" : false,
    "defaultBindingMode" : "TwoWay",
    "metadataUrlParams": {
    "sap-documentation": "heading"
    }
    }
    }
    }​



 
We will have to take care that the above change needs to be done in the manifest file of the Extension project and not in the standard app's project. If we do this change in the standard app project the batch calls will not be disabled.

Please see the screenshot below of an extension project of standard Manage Purchase Requisitions Fiori app.



We can see the individual calls going instead of single batch call.



 

Conclusion

Of the above two approaches, I would prefer to use the second approach because here we need to change only at one place rather than changing at all places where OData model is created.

Last but not least, don't forget to remove the change before deploying the app as we do want to use the batch call optimisations!

Thanks for reading and I will be glad if this small information is of help to anyone.
2 Comments