Skip to Content
Personal Insights
Author's profile photo Pritesh Patel

SAP Business Application Studio – How to beautify xml and javascript code

Hello Everyone!

Let me start by thanking you for this wonderful opportunity. You already know my name. I’ve been working as a SAP Fiori/UI5 Consultant for about 1 years at Ahmedabad. During my years of experience, I have learned troubleshooting, execution, and team management, along with app development.

In this blog post, I will share a selection of valuable “assets” for anyone that is interested to know more about Business Application Studio.


This blog post provides details about beautify code of xml and javascript.
I hope you will find this helpful.


First of all need to open SAP BAS and how to open Please follow given link.
Open BAS



Select SAP Business Aplication Studio and click it



After Click on BAS you seen this type of screen and this time to need create dev space and give name. click on play button and wait until your your space status is running.


Create Dev Space and Open It



When your stat is running then click it on dev space name,after clicking you seen this screen.


open dev Spece appear this type of screen.




Select 6th option from side menu



SAP Business Aplication studio provide so many extention. select 6th option from side menu and open it. search for xml tools and install it.


Search XML Tools and Install it



After Open any XML or JAVAScript file


Now we need to see effact so press Shift+alt+f

Select Shift+alt+f

Don’t waste your time manually formatting your code. It takes time that can be better spent writing more code. Take advantage of the amazing modern tools out there and set up Prettier!

if you face any kind of issues executing these steps kindly comment it down here,

I am always ready to help!!

Thanks for reading!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Denis Galand
      Denis Galand

      And in the settings of BAS, enable format on save so no need to use the format shortcut anymore 🙂

      Author's profile photo Pritesh Patel
      Pritesh Patel
      Blog Post Author

      but in trial account did not get any enable format option.

      Author's profile photo Swaminathan Ramamurthy
      Swaminathan Ramamurthy

      Good work Pritesh. I was using online editor for formatting xml, but still did not work good. Your solution worked. Thank you again !!

      Author's profile photo Pritesh Patel
      Pritesh Patel
      Blog Post Author

      Thanks Swaminathan Ramamurthy !

      Author's profile photo Former Member
      Former Member

      I tried this but sadly it doesn't correct the indentation of the whole page. Any additional setting needs to be done?

      Author's profile photo Pritesh Patel
      Pritesh Patel
      Blog Post Author

      hello Former Member

       you just need to refresh whole page  or right click on inner side of  code page and select formate document.

      Author's profile photo Archit Parikh
      Archit Parikh

      Nice Article!!

      Author's profile photo Sujit Ghosh
      Sujit Ghosh

      There is a preference in Editor named "Format On Save - Enable format on manual save". If you turn that on, js can be formatted easily with each Ctrl+s (manual save). But for XML, that small extension you mentioned is needed to be installed and after that Ctrl+s can format that XML as well. No need to Shift+Alt+f or Format Document from options after right click. Pritesh Patel