SAPUI5 Interview Questions
SAPUI5 Interview Questions
Application is written in
javascript, which is highly in demand in web application programming.
SAP UI5 is an open source which supports technologies such as OpenAJAX, LESS, ARIA etc.
The layout of the app is prepared with the use of HTML5 and CSS3, which provides flexible
solutions dedicated to many devices and screen resolutions
. Support of jQuery means SAPUI5 has no constraints concerning the
development of animations and effects
Open source libraries delivered by SAP allow developers to extend
existing UI controls (dialogue windows, charts, tables, buttons, combo-boxes,
data pickers, accordions) as well as to create new ones from scratch. To edit
UI controls a developer can use the ECLIPSE editor
The SAPUI5 technology supports the MVC (modelviewcontroller)
architecture pattern, which enables every programmer get well-structured and
understandable code
The prepared SAPUI5 application can be stored directly on a built-in SAP
web server or on open source platforms like Apache and Tomcat. It also runs on
various platforms such as SAP NetWeaver AS ABAP/Java, Sybase (SAP Unwired
Platform) and SAP Hana XS
SAPUI5 can work with the newest version of Sybase Unwired Platform
Communication between a SAPUI5 app and the
SAP system is done through secure oData services - the newest standard prepared
by Microsoft. OData is proven secure technology which is currently used by
Facebook, eBay, Netflix and Stack Overflow.
SAPUI5 helps to increase your security
thanks to its cross-domain policy and indirect connection to the SAP server
through SAP NetWeawer Gateway, OData and the latest SUP (Sybase Unwired
Platform)
SAPUI5 enables the combination of multiple data sources such as oData services,
databases and external systems, as well as the data from multiple SAP systems,
all in one app
BY connection do you mean getting data from ABAP systems and populate it in UI ?
If yes, then you can introduce Gateway system in middle of ABAP and frontend. You have to connect
abap and gateway system with trusted RFC and create one gateway service which will get the data from
backend system,
Once you have the service, you can create a UI5 application and consume this service to populate data
in the UI.
Here are Some Important SAPUI5 interview questions, which could help you clear an
interview
What is required to start UI5 development in eclipse?
In the help menu in Eclipse, click Install New Software, paste one the URL according to the
version of the Eclipse.
https://tools.hana.ondemand.com/lunafor Eclipse Luna (4.4)
https://tools.hana.ondemand.com/kepler for Eclipse Kepler (4.3)
just import SAP UI5 toolkit from hana service marketplace. Also we need SAP
UI5 ABAP Repository connector to deploy project in ABAP System.
Which control libraries are used for UI5 application development?
sap.ui.commons, sap.ui.table and sap.suite.ui libraries for desktop application
development and sap.m library along with sap.ui.layout for Fiori application
development.
How Navigation works in SAPUI5.
Sap uses two mechanisms, routing and EventBus. Routing Is specifically used
for bookmarking the URL. We define routing in component.js within the
metadata. It also defines the navigation path and hash changer which is used
at the runtime to change the url of the particular screen.
What is Component?
It is the first point of the application, it serves as an index, which encapsulates all the
application details, like view names, routing details, main view, applications
type(Full Screen or SplitApp), application service configuration etc.
There are 2 types of compponents,
Faceless components: Mainly without UIs, Used for business logic and helper
methods e.g. Formatters.
UI Component: typically component.js file which is made by extending
sap.ui.core.UI Component class.
Part B
1) Which open standards and tools are the foundation of SAPUI5 technology?
Properties
Aggregations
JSON views
XML views
To control the application flow by handling user events or updating the view
onExit an event that is called when the view and the controller are destroyed
Supported themes
8) Which of the following namespaces can be used in the manifest.json file?
sap.ui5
sap.app
sap.ui
9) What is the name of the file where the descriptor for applications, components, and libraries is
stored?
Manifest.json
11) Which data binding mode means a binding from the model to the view and from the view to
the model (value changes in the model and in the view update all corresponding bindings and
the view and model, respectively)?
Two-way
12) How would you add an icon from the SAPUI5 icon font to a button in an XML view?
<Button text="Save Draft" icon="sap-icon://save" />
13) Which predefined sizes for margins that stand for 8px (0.5rem), 16px (1rem), 32px (2rem),
or 48px (3rem) are available in SAPUI5?
'Tiny', 'Small', 'Medium' or 'Large'
14) What is aggregation binding used for?
To bind a set of data entities to a list-like structure
"Employees" : [{
"Lastname" : "Karlson",
"Firstname" : "Karl"
}]
}
What is the binding path to Karl Karlson's first name?
/Employees/0/Firstname
16) What do you need if you want to bind a list to data in your JSONModel?
An array with the data in the JSONModel that you want to bind to the list
sap.ui.model.type.DateTime
sap.ui.model.type.Currency
19) What coding do you need to add to your XML view to enable grouping in your list binding?
group: true
20) Which of the following sequences of steps do you use to assemble the URL to access your
OData service's metadata?
Run your app from SAP Web IDE and copy its URL into a new browser tab.
In your app's manifest.json file, go to services, copy the URI, and use it to replace the file path
in the URL from Step 1.
Append /$metadata and press enter.
21) How many filters can you apply on a list binding?
As many as needed
22) What is the best practice for showing or hiding an SAPUI5 control at runtime?
Set the visible property of the control to true or false.
24) What is the difference between aggregation binding and element binding?
Aggregation binding is used for list-like structures, whereas element binding can be used to set
the binding context of any parent control.
$count
$expand
Part C
27) How do you enable the debugging option for SAP NetWeaver OData services?
Use the URL parameter sap-ds-debug=true.
28) What do you have to consider when choosing the SAPUI5 version for the application
template?
The SAPUI5 version must be available in your target deployment system.
29) How many complete columns (that include the header) will this table display on a phone?
<Table>
<columns>
<Column
demandPopin="false"
minScreenWidth="Tablet">
...
</Column>
<Column
demandPopin="true
minScreenWidth="Tablet">
...
</Column>
<Column
demandPopin="false"
minScreenWidth="Phone">
...
</Column>
<Column
demandPopin="true"
minScreenWidth="Phone">
...
</Column>
<columns>
...
</Table>
2
30) What happens when you set the minScreenWidth property of a sap.m.Column to Tablet?
The column is shown only on screens that are larger or equal than the size of a tablet.
Negative
Critical
By creating a single sap.ui.model.Filter object and specifying a path, an operator, and up to two
values
35) Which filter operation can you use to filter items with a numeric value lower than X?
sap.ui.model.FilterOperator.LT
36) What can you do to enable your SAPUI5 application to adapt to the users device?
As many controls are responsive out of the box, check whether you have to do anything at all.
To influence the user interface without coding, based on the characteristics of the device
38) What information is provided by the sap.ui.Device API?
The device type (phone/tablet)
41) What happens in the DOM tree when nesting XML views?
Each XML view creates its own DOM element regardless of the nesting level.
Put the functionality used in multiple controllers into a base controller and extend this controller in
the other controllers in your app.
They need to be added to the dependent aggregation of the view to get access to the models.
45) What happens when you instantiate a dialog from a single-rooted fragment?
The dialog instance is returned when you invoke the fragment factory.
The dialog is instantiated but not displayed.
46) Which property of the routing configuration in the manifest.json file should you use to
automatically display a target that is not found?
Bypassed
47) How many targets can you configure within a route in the manifest.json file?
As many as you like
48) What is the correct sequence of called functions / handled callbacks of the OData model in
the Add controller?
on metadataLoaded - createEntry - submit - on success
49) What is the recommended place to configure a "TwoWay" binding for the OData model so
that data changes in the view are written back to the model?
In the "models" section of the manifest.json file
50) How are unit tests for your app started in SAP Web IDE?
By selecting the run configuration Run Unit Tests
By right-clicking the unitTests.qunit.html file and selecting an option from the Run menu
52) Which testing features are provided by the SAP Fiori Worklist application template?
A test suite that calls all your unit and integration tests
53) Which options are available in SAPUI5 if you want to create a custom control?
Properties
Events
55) What do you have to consider when defining control metadata?
You can give an aggregation either one or many values by defining the multiplicity as one or
many.
You can make an aggregation invisible in the control API by setting the visibility to hidden.