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.

Overview:

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

Step-1:

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

 

Select%20SAP%20Business%20Aplication%20Studio

Select SAP Business Aplication Studio and click it

 

Step-2:

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%20Dev%20Space%20and%20Open%20It

Create Dev Space and Open It

 

Step-3:

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

After%20open%20dev%20Spece%20appear%20this%20type%20of%20screen.

open dev Spece appear this type of screen.

 

Step-4:

Select%206th%20option%20from%20side%20menu

Select 6th option from side menu

 

Step-5:

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%20XML%20Tools%20and%20Install%20it

Search XML Tools and Install it

Step-6:

After%20Open%20any%20XML%20or%20JAVAScript%20file

After Open any XML or JAVAScript file

Step-7:

Now we need to see effact so press Shift+alt+f
Select%20Shift+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

      8 Comments
      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