SAP UI5 Interview Questions – Set 2


SAP UI5 is an SAP user interface for HTML5. It is a collection of libraries used by the users to develop mobile and desktop applications that run in a browser. In this, we are provided with a SAPUI5 Javascript toolkit. It is a front-end development tool. It makes use of CSS, HTML5, and Javascript.

This is the right place where you will get SAP UI5 job interview questions if you are preparing for such interviews. This article will provide you with all kinds of interview questions from basic to advanced levels. Go through Set 1 Interview questions here.

Association and navigation in SAP UI5

1. What is the use of association and navigation in SAP UI5?

Association and navigation are used in SAP UI5 to establish relationships between different UI5 controls.

Association is used to define a relationship between two controls, where one control acts as a source and the other as a target. This relationship can be used to pass data or events from the source control to the target control.

Navigation is used to navigate from one view to another in an SAP UI5 application. It is used to define the flow of an application, and to determine how different views are related and how the user can navigate between them. Navigation can be achieved using routing in SAP UI5, which uses the declarative approach to define the navigation flow in an application.

2. Explain association and navigation in SAP OData

Association and Navigation in SAP OData are concepts used to define relationships between entities in an SAP OData service.

Association is used to define a relationship between two entities in an OData service. An association defines the relationship between entities, and the cardinality of the relationship, such as one-to-one, one-to-many, or many-to-many.

Navigation is used to navigate from one entity to another in an SAP OData service. This allows the client to follow the relationships defined in the OData service to retrieve related data. For example, if you have two entities, “Orders” and “Customers,” and you have defined a one-to-many relationship between “Orders” and “Customers,” then you can use navigation to retrieve all orders for a specific customer.

In summary, association and navigation are used to model relationships between entities in an SAP OData service, and to retrieve related data in a structured manner.

3. Can I achieve the above even without using the association and navigation concept?

Yes, it is possible to retrieve related data in SAP OData without using the concepts of association and navigation.

For example, you could retrieve related data by defining a custom function in the OData service, which retrieves data from multiple entities based on a specific input, such as a customer ID. The function could then be called from the client to retrieve the related data.

However, using association and navigation in SAP OData has several advantages over custom functions, such as:

Standardization: Association and navigation are standard concepts in OData and are supported by OData clients and libraries.

Reusability: Once the associations and navigation paths are defined, they can be easily reused in multiple parts of an application, reducing the amount of custom code needed.

Readability: The relationships between entities are easily readable and understandable, making it easier to maintain and enhance the application.

Scalability: Association and navigation can handle complex relationships between entities and can scale to handle large amounts of data.

Therefore, while it is possible to retrieve related data without using association and navigation, it is generally recommended to use these concepts in SAP OData to take advantage of their benefits.

4. How to use association and navigation in SAP UI5 code?

In SAP UI5, association and navigation can be defined and used in the XML view, the controller, and the manifest file of an application.

Here’s an example of how to use association and navigation in SAP UI5 code:

1. XML View: To define an association between two controls, you can use the “association” property in the XML view. For example, to define an association between a table and a detail form, you could use the following code:

<Table id=”table” items=”{/Orders}” selectionChange=”onSelectionChange”>
<!– Table content –>

<form:SimpleForm id=”form” layout=”ResponsiveGridLayout”
association=”Orders” >
<!– Form content –>

2. Controller: To navigate between views, you can use the “byId” method in the controller to retrieve the target view, and then use the “to” method to navigate to the target view. For example:
onSelectionChange: function (oEvent) {
var oSelectedItem = oEvent.getParameter(“listItem”);
this.getRouter().navTo(“detail”, {
orderId: oSelectedItem.getBindingContext().getProperty(“OrderID”)

3. Manifest File: To configure routing in SAP UI5, you need to define the routes and targets in the manifest file. For example:
“routing”: {
“config”: {
“routerClass”: “sap.m.routing.Router”,
“viewType”: “XML”,
“viewPath”: “”,
“controlId”: “app”,
“controlAggregation”: “pages”,
“bypassed”: {
“target”: “notFound”
“routes”: [
“pattern”: “”,
“name”: “master”,
“target”: “master”
“pattern”: “orders/{orderId}”,
“name”: “detail”,
“target”: “detail”
“targets”: {
“master”: {
“viewName”: “Master”,
“viewLevel”: 1
“detail”: {
“viewName”: “Detail”,
“viewLevel”: 2
“notFound”: {
“viewName”: “NotFound”,
“viewLevel”: 3

This is just a basic example to show how to use association and navigation in SAP UI5 code. In practice, the implementation will depend on the specific requirements of your application.

5. Explain the concept of $expand in SAP UI5 using an example.

The “$expand” operator in SAP UI5 is used to retrieve related data from multiple entities in a single OData request. The “$expand” operator is applied to the main entity in the request and specifies the related entities that should be included in the response.

For example, consider a scenario where you have two entities: “Orders” and “Customers”. The “Orders” entity has a one-to-many relationship with the “Customers” entity.

To retrieve all orders along with the customer details in a single request, you can use the “$expand” operator as follows:


This request will return all orders along with the customer details in a single response. This can be useful when you want to retrieve related data in a single request, reducing the number of network requests and improving performance.

Note that the “$expand” operator can also be used to retrieve multiple levels of related data. For example:


This request will retrieve all orders along with the customer details, and the orders for each customer.

In SAP UI5, the “$expand” operator can be used in conjunction with OData models to retrieve related data. For example:

var oModel = new sap.ui.model.odata.v2.ODataModel("/service/");"/Orders", {
urlParameters: {
"$expand": "Customers"
success: function (oData, response) {
// Handle success
error: function (oError) {
// Handle error

In this example, the “$expand” operator is passed as a URL parameter in the “read” method of the OData model, to retrieve all orders along with the customer details in a single request.

Component and Library Questions

  1. Name the control libraries that are used for UI5 application development?
  2. Explain the working of navigation in SAPUI5?
  3. What is a component?
  4. Name the various types of components?
  5. Define Responsive Web Design?
  6. Write the syntax to define control in UI5?

Formatter and Fragments Interview Questions

  1. Explain Formatter in SAPUI5?
  2. Explain the use of Formatter?
  3. Name the various types of views present in SAPUI5?
  4. Define SAPUI5 fragments?

Model and Life cycle Interview Questions

  1. List the various types of data models that are available in SAPUI5?
  2. Explain the life cycle that is available in SAPUI5’s views controller?
  3. Name the view types offered by SAPUI5?
  4. Explain the purpose of a controller?

OData and Bootstrapping Interview Questions

  1. Highlight the difference between the Odata model and JSON model?
  2. Define SAPUI5 Bootstrapping?

Binding Interview Questions

  1. What are the different ways to bind data to the controls?
  2. Are fragments created with controllers?
  3. Explain metadata annotations?
  4. Explain the use of Aggregation Binding?
  5. What are the requirements to bind a list to data in your JSON model?

Fiori Basics Interview Questions

  1. Name the common metadata annotations?
  2. Define SAP Fiori?
  3. Explain the procedure to access the validation errors in SAPUI5?
  4. Name the types in SAPUI5?
  5. Write down the steps you will use to assemble the Url to access your Odata service’s metadata?

Fiori Controls Interview Questions

  1. Name the various types of Fiori applications?
  2. Compare and contrast SAP Fiori and SAPUI5?
  3. What type of information can be stored in the Manifest.json file of your app?
  4. Name the various namespaces that can be used in the manifest.json file?
  5. How many filters can a user use to apply on a list binding?
  6. What is the best practice to hide a SAPUI5 control at runtime?

Fiori & UI5 Advanced

  1. Explain the Fiori launchpad?
  2. Is it possible to get the client’s web browser on which the SAP Fiori application is running? How?
  3. Explain the principles of Fiori designs?
  4. When to use element-binding?
  5. List the difference between aggregation binding and element-binding?
  6. How can we accomplish paging in Odata Query?
  7. Name some Odata query parameters?
  8. Define semantic colours in SAPUI5?
  9. Name the semantic states in SAPUI5?
  10. What are various ways to compose Filters in SAPUI5?
  11. Where do we use filters in SAPUI5?
  12. Write down the filter operation a user can use to filter items with a numeric value lower than X?
  13. What a user can do to enable the SAPUI5 application to adapt to the user’s device?
  14. What is the use of a “Device mode”?
  15. What type of information is provided by the Sap.ui.device.API?
  16. Name the control that adapts its appearance on touch devices?
  17. What is the importance of having fragments in your applications?
  18. During nesting XML views, what happens in Dom Tree?
  19. What are various ways to structure your application code better?
  20. What is the primary use of fragments?
  21. Explain Dialogs in SAPUI5?
  22. What happens when you invoke the fragment factory?
  23. Name the property of the routing configuration in the manifest.json file that is used to automatically display a target that is not found?
  24. Write the correct sequence of handled callbacks of the Odata Model in the Add Controller?
  25. What are ways to start the unit test of the application in SAP Web IDE?
  26. How do you register for a unit test in Qunit?
  27. Name the testing features provided by the SAP Fiori worklist application template?
  28. What are the options available in SAPUI5 to create a custom control?
  29. Name the parts of the control metadata?
  30. What are the various considerations to be marked while defining control metadata?
  31. What is the way to enable the debugging option for SAP Netweaver Odata services?
  32. While choosing the SAPUI5 version for the application template, what are the basic requirements to fulfil?
  33. Explain Openui5?
  34. Write the correct syntax for defining namespaces in XML Views?
  35. Why not enclose all javascript code in a <script> tag directly on the index.html page?
  36. Explain components within SAPUI5?
  37. What type of information does Manifest.json file holds?
  38. Explain the importance of data binding within SAPUI5?
  39. Write the code to ass a margin all-around a control?
  40. Which base class is extended while implementing a custom type?
  41. Distinguish between absolute and relative binding paths?
  42. Write the code to sort and group your SAP.m.list when added to the view.xml?
  43. Which method is used to access the list item in an event handler for the press event?
  44. Explain the role of the application template in the development process?
  45. What is the behaviour of Sap.m.table on smaller devices like phones?
  46. Name the filter operation that is appropriate for a textual search in SAPUI5?
  47. List the responsiveness features you realize by setting standard CSS classes provided by SAPUI5?
  48. Name the various options available for code reuse in SAPUI5?
  49. How can we reuse the code in several other places and views in the application?
  50. How to grant a Dialog Access to the surrounding view’s models?
  51. What is the main purpose of the “static area” in the Dom?
  52. List the various benefits that Hash-based Navigation in SAPUI5 offers to a user?
  53. What would a user do to get notified when the hash has changed to a certain pattern?
  54. What do you understand by Sinon.js?
  55. Where does Opa fit in the testing pyramid?
  56. Why Automated testing is considered beneficial for app development?
  57. Define model view controller?
  58. Why did you choose SAPUI5 over HTML5?
  59. Name the tools and open standards that are considered as the foundation of the SAPUI5 technology?
  60. What is the use of a multi-flow design pattern?
  61. How is splitting implemented in multi-flow design?
  62. Name the standard controller Hooks present in SAPUI5?
  63. What does JSON stand for?
  64. What are the requirements that are needed to start UI5 development in Eclipse?


  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.