First Simple UI5 Application

lightFirst Simple UI5 Application



The prerequisite is – You have installed the eclipse and SAPUI5.

From the menu choose, File->New->Other..


Select Application Project Under SAPUI5 Application Development and select Next.


Provide a Project name and in library section Choose  sap.ui.commons and un-check the check box for Create an Initial View and choose Finish.


A project created with Index.HTML file with a sample code.


The demo is to create a simple BUTTON on the HTML BODY. This can be done in simple 3 steps as highlighted with comments for each step.



 Inside script start and end tag put below code:

// Instantiate a new button
oBtn = new sap.ui.commons.Button(“btn1”);
// set button text with object
oBtn.setText(“I am a Button”);
// add button to the body


Then save the file.



Run and choose “Web App Preview”.


The button appears on the screen.


If u want to see it in web browser, then choose the highlighted button or simply copy the URL from ecplise and paste it in browser.9

App in browser.



One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s