Skip to Content

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.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Nabheet Madan

    Thanks Girish for the tip. I was wondering we can debug the batch call via Gateway backend also like regular debugging and can check which request is failing? Where will this tip help from client side perspective?

    Nabheet

     

    (0) 

Leave a Reply