Less Coding, More Designing: The New SAP Web IDE Layout Editor
ℹ For updates on SAP Web IDE layout editor, please refer to the following SCN documents:
Less Coding, More Designing: The New SAP Web IDE Layout Editor 1.12
SAP Web IDE Layout Editor (WYSIWYG or Drag&Drop) available for productive use
——————
As announced in the Release Notes for SAP Web IDE, SAP Web IDE 1.3 is now available for trial users. This version comes with a nice new feature: The layout editor makes developing HTML5/SAPUI5 applications even faster and simpler for you!
And this is what it looks like:
As you can see, the layout editor has the following areas:
- Palette: Contains the SAPUI5 controls. You can expand or collapse the sections by clicking the arrows, and dragging and dropping the controls to the canvas.
- Canvas: The content of the XML view is displayed in a way that closely corresponds to how it will appear in your finished application.
- Properties/Data pane: Shows the properties and data (entity sets and properties of the OData service used by the application) of a marked control.
- Outline pane: Outline of your XML view (click the icon in the right side bar to display it).
In the documentation of the SAP Web IDE layout editor you can find a step-by-step tutorial that walks you through the major features the new layout editor offers. It guides you through the process of creating a SAP Fiori starter application and enriching it with additional controls in just a few minutes.
So without further ado, let’s just try it!
Before You Start
- Create the OData model file SalesOrderService_metadata.xml and store it locally on your computer. Copy the content of the XML file from the following document: OData Model for a Simple Sales Order Service
- In case you already worked with SAP Web IDE with a former release, it’s advising to clear your browser cache before starting SAP Web IDE. So open Google Chrome (the layout editor only runs in this browser) and clear the browser cache.
- Start SAP Web IDE in Google Chrome.
Create an Application for Sales Order Tracking
- Choose File -> New -> Project
- On the Basic Information screen, enter the project name (e.g. SalesOrders) and choose Next.
- On the Select a Template screen, choose SAP Fiori Application from the pulldown. Mark SAP Fiori Starter Application and choose Next.
- On the Data Connection screen, choose File System and Browse. In the Open dialog, browse to your local SalesOrderService_metadata.xml file and choose Open. On the Data Connection screen choose Next.
- On the Template Customizationscreen, enter the following mapping data:
Master Section:
Field
Mapping Data
Title
Sales Orders
OData Collection
SalesOrders
Item Title
SalesOrderNumber
Numeric Attribute
TotalAmount
Units Attribute
Currency
Attribute 1
CustomerID
Attribute 2
CustomerName
Search Field
SalesOrderNumber
Detail Section:
Field
Mapping Data
Title
Sales Order
Detail Text
Sales Order Details
Item Title
CustomerName
Numeric Attribute
SalesOrderNumber
Units Attribute
CustomerID
Attribute 1
NetPriceAmount
Attribute 2
TaxAmount
Attribute 3
OrderDate
- Choose Next.
- On the Confirm screen, choose Finish.
Now the Exciting New Part: Edit Your Application with the Layout Editor
- Go to your new project, expand the view folder and select Detail.view.xml.
- Open the context menu; choose Open With -> Layout Editor.
- The Detail.view.xml opens up in a new tab with layout editor capabilities. By default, the Outline pane is closed. Although we only need it at the very end of our exercise, you might want to open it up by clicking the icon
in the right side bar.
- Let’s start with something easy and delete the icon
on the bottom bar: Select the control in the canvas and drag it outside of the canvas or press key Del.
- Since we want to adjust the icon tab bar, we first have to change some of the properties of the IconTabFilter control.
- In the canvas, select the icon of the tab filter.
In the Outline pane, sap.m.IconTabFilter is selected. - In the Properties/Data pane, expand the Properties.
- In the Data section, enter the value Hint to the field Key.
- In the canvas, select the icon of the tab filter.
6. Next step is to add a new icon tab filter to the icon tab bar.
- In the palette, expand the Container section. Alternatively you can use the search field and search for example for filter or tab.
- Drag the IconTabFilter control from the palette to the canvas and drop it on the information icon.
7. As our new tab should contain customer data, we will change some properties of the new IconTabFilter control.
- In the canvas, select the icon of the new tab filter. Note that in the Outline pane, sap.m.IconTabFilter is selected -but more on that later.
- In the Properties/Data pane, the Properties with all its sections are expanded.
- Go to the Appearance section and select the value Default for the Icon Color field.
- As we do not need any numbers in our tab, we delete the default value of the Count field in the Data section and enter the value Customer for the Key field.
- In the Misc section, change the value of the Icon field to sap-icon://customer and the value of the Text field to Customer.
8. Now the new icon tab filter needs some content (some fields to display customer detail data). To add that, we make use of the SimpleForm control.
- In the palette, expand the Layout section or search for the simple form via the search field.
- Drag the SimpleForm control from the palette to the canvas and drop it on the icon of the new tab filter.
9. Cool, with the simple form already some field elements are provided, we only need to adjust them a bit.
- In the canvas, select the title in the simple form.
- In the Properties/Data pane, in the Properties section, under Appearance, change the value of the Text field to Customer Details. Hint: You have to hit Enter to make your entries visible in the canvas.
- In the canvas, select Label 1 in the simple form.
- In the Properties/Data pane, in the Properties section, under Misc, change the value of the Text field to Sales Organization.
- In the canvas, select Label 2 in the simple form.
- In theProperties/Data pane, under Properties, under Misc, change the value of the Text field to Sales Organization Name.
- Delete the second input field under Sales Organization.
- Now we need to bind the two input fields to some value.
- In the canvas, select the Sales Organization input field in the simple form.
- In the Outline pane, the corresponding control is marked in the control tree. Expand the highlighted sap.m.Input node, then the properties node, and select the property value.
- In the Properties/Data pane you noticed that this time Data is expanded. Open up the SalesOrders node and select SalesOrganization. Hint: In the Outline pane, the binding is indicated by the text {SalesOrders.SalesOrganization} next to the property value.
- Do the same steps for the input field of Sales Organization Name in the simple form but select SalesOrganizationName from the SalesOrder tree in the Properties/Data pane.
- Finished! Just save your changes.
Let’s check what the result looks like
- In your project folder, select the file index.html.
- In the context menu, select Run -> Run with Mock Data.
- In the Run with Mock Data dialog box, choose Run (no further input required).
- The application preview is started, the application is loading and data is being mocked based on the service structure you have created.
Hint: As the preview with mock data opens up in a pop-up window you might need to allow pop-ups from this webpage in your browser settings.
Hope you had fun following this small tutorial. Let us know what you think about the new layout editor 😉
Excellent Stuff 🙂
Awesome editor!. I was looking for something like this.
Nice blog.
Thank you Lisa for sharing such a useful information 🙂
Thanks for writing this blog. 🙂
To be honest, based on earlier MS FrontPage results, I have till now reservations against "click&play development". Maybe I'm wrong and old fashioned, but I like to control my code to make sure it behaves just the way I intended it to do...
I know that it is a new challenge for the development community that designer and developer have to be more and more one person (and I will never become a good designer). So the route of march is market driven, and it seems as this is the way to go
🙂 Yes, yes, yes.....
Good work ! 🙂
Properties/Data pane in RDE can be better !
..and also the colors...comparing to Sublime:
According to the colors - I assume you refer to the code editor ...
Did you already detect the customizing for the code editor (Tool Bar Menu -> Tools -> User preferences -> Code Editor)? There you can choose from four different themes. I think SAP Morlock is quite close ...?
Hi
Could you please provide how to get in RDE tool,Where to download & Process step
If possible any link good for freshers
Hi,
please have a look at the "Get Started" section in the SAP River RDE developer guide: https://help.hana.ondemand.com/SAP_RDE/frameset.htm?6284a94889db4f3cad001ba674282f20.html
Best regards,
Lisa
Thank you Lisa 🙂
Sure Janarthanan,
Best to start is with this overview page about RRDE: http://scn.sap.com/docs/DOC-55465. There you can get some valuable how-to guides and information how to access the trial version of RRDE.
As quick starter: You can access SAP River RDE beta from the SAP HANA Cloud Platform website. The necessary steps for setting up RRDE from the HANA Cloud Cockpit are described in the Getting Started documentation.
Hi Margot
Thanks for the information and its help me to start new learning
Thank you somuch 🙂
Hi
I am getting error message as shown below when i try to import OData model
"Unhandled Error: Cannot read property 'addContent' of undefined"
Otherwise I am loving this
Hi Timothy,
Hmm, quite strange. Never got this message before. Did you used the OData Model file provided in the documentation or did you create your own one? In case you used our file - do you get any errors displayed in the console?
The error disappeared after I cleared the browser cache.
Thank you for an excellent blog
Hi Lisa,
Great blog here. Thanks a lot for the step-by-step guide.
I was wondering if you could help me in editing the mockdata provided by the metadata.xml file you have mentioned.
So, I followed this documentation - SAP Web IDE Developer Guide
However, I don't find the option "Edit Mock Data" as mentioned in the developer guide.
Could you please help me ?
Please find the attached image.
Regards,
Prerana
Hi Prerana,
Please check that the following line is the first line of the metadata.xml file:
<?xml version="1.0" encoding="utf-8"?>
Regards,
Raz
Hi Raz,
Yes, that helped. Thank you.
Regards,
Prerana
Hi Raz,
many thanks for pointing this out. This issue will be fixed with the upcoming version 1.6.
Best regards,
Lisa
Hi,
Thanks for sharing wonderful stuff.
I followed the below URL to install WEB Ide in my local system.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70eaf452-a341-3210-7395-b9b6dfdf0f3e?QuickLink=index&…
In myWEB IDE I am not getting Layout Editor.I am getting only text editor to edit the xml files.
How to get the Layout editor in my WEB IDE.
Please help me.
Regards
Sridevi
Hello Sridevi,
The Local Installation capabilities are a subset of the HCP productive landscape.
The Layout Editor is an experimental feature for non-productive use only. Thus, it is only available on the HCP trial landscape.
Regards,
Raz
Hi Sridevi,
the current local trial installation is a subset of the functionality available on the HCP trial landscape. It includes the layout editor, which you should get for an XML view file (created form the Fiori Starter App template) with right mouse -> Open With -> Layout Editor.
(It is planned to have the layout editor also available on the productive HCP landscape soon, once the user feedback has been implemented.)
Best regards,
Oliver
Will this be available in the local SAP WebIDE? Many people work in companies that refuse to have connections from an ERP to a Cloud Platform, I can't use this in HCP.
I'm pretty sure a lot of people share my particular problem, and it's a barrier to entry for your new UI strategy.
Hi Joao,
yes, the Layout Editor is available, see my post above.
Cheers, Oliver
Hi all, Layout Editor has changed with Web IDe 1.10 and data binding is now different from the steps above... can we please update the final data binding steps of above example considering the new changes ?
thank you !
basically from step 10...
Hi all,
Firstly thanks for the blog.
I just had a small question, can I get this layout editor for HTML views.
I see it available only for XML views.
Please correct me if I'm wrong. I already worked on XML views and just started testing with HTML views.
Please suggest.
Sai