YouTube Icon

Interview Questions.

Top 50 Sap Ui5 Interview Questions - Jul 28, 2022

fluid

Top 50 Sap Ui5 Interview Questions

Q1. Name Some Standard Controller Hooks In Sapui5?

OnInit – an event that is referred to as while the view and the controller are instantiated

onExit – an event that is referred to as when the view and the controller are destroyed

Q2. What Is Metadata Annotations?

The service metadata record describes the structure of all sources within the provider. This structural metadata makes it smooth to understand a service. We can discover provider metadata at the cope with “$metadata” relative to the provider root.

Q3. What Is The Purpose Of The "static Area" In The Dom?

To show dialogs and popup controls over the utility UI

Q4. What Are Fragments Primarily Used For?

To make parts of your view reusable

Q5. How Can You Compose Filters In Sapui5?

By creating multiple filters and concatenating them both with AND or OR

By creating a unmarried sap.Ui.Version.Filter item and specifying a course, an operator, and up to two values

Q6. What Do You Need If You Want To Bind A List To Data In Your Jsonmodel?

An array with the records within the JSONModel that you want to bind to the list

A template list object to be cloned

A bound list control

Q7. What Are Common Metadata Annotations?

Following are a number of the service metadata annotations which might be not unusual and a the front stop developer need to recognise those so as to apprehend the carrier and combine it:

edm:EntityContainer

edm:EntitySet

edm:EntityType

edm:Property

edm:NavigationProperty

edm:AssociationSet

Q8. Which Of The Following Namespaces Can Be Used In The Manifest.Json File?

Sap.Ui5

sap.App

sap.Ui

Q9. Which Options Are Available In Sapui5 If You Want To Create A Custom Control?

Extend an existing manipulate together with your own functions.

Create a composite manage that reuses current controls internally.

Extend the sap.Ui.Core.Control base elegance and construct a brand new manage.

Q10. What Is A Component Within Sapui5?

An impartial and reusable part that may be used to shape SAPUI5 programs

Q11. What Is Sinon.Js?

A standalone unit trying out library for JavaScript that gives spies, stubs, and mocks

Q12. How Do You Register A Unit Test In Qunit?

Call QUnit.Test() for your check code with a speaking take a look at description and a callback that carries at least one assertion.

Q13. What Are Semantic Colors In Sapui5?

They are representations of states consisting of achievement, warning, and blunders.

Q14. What Happens When You Instantiate A Dialog From A Single-rooted Fragment?

The dialog example is back when you invoke the fragment factory.

The conversation is instantiated however not displayed.

Q15. What Is The Correct Sequence Of Called Functions / Handled Callbacks Of The Odata Model In The Add Controller?

On metadataLoaded - createEntry - submit - on fulfillment

Q16. Which Property Of The Routing Configuration In The Manifest.Json File Should You Use To Automatically Display A Target That Is Not Found?

Bypassed

Q17. What Information Can Be Stored Inside The Manifest.Json File Of Your App?

Content densities

Root view

Models of your app

Q18. What Is The Role Of The Application Template In The Development Process?

To generate an initial set of documents that function the place to begin for the development of a effective application

Q19. Which Control Adapts Its Appearance On Touch Devices?

The PullToRefresh manipulate: It is represented as a easy button on non-contact devices, however the user needs to drag the web page content down on contact devices to refresh it.

Q20. What Is The Benefit Of Data Binding Within Sapui5?

SAPUI5 uses statistics binding to bind  facts sources or information assets together to hold them in sync. This way: All adjustments in one supply also are reflected in the different one.

Q21. What Are Sapui5 Fragments?

Fragments are very mild weight UI controls. Fragments aren't completely like perspectives however they act like a view. Fragments are defined similar like perspectives and are names like “Fragment.Fragment.Xml“.

Q22. 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 replica its URL into a new browser tab.

In your app's appear.Json record, visit “offerings”, reproduction the URI, and use it to update the record course inside the URL from Step @

Append “/$metadata” and press input.

Q23. What Is Component?

It is the primary factor of the application, it serves as an index, which encapsulates all of the utility details, like  view names, routing details, principal view, packages kind(Full Screen or SplitApp), application provider configuration and so forth.

There are 2 types of compponents:

Faceless additives: Mainly with out UIs, Used for commercial enterprise common sense and helper techniques e.G. Formatters.

UI Component: commonly factor.Js file that's made by using extending sap.Ui.Center.UI Component magnificence.
 

Q24. What Is The Best Practice For Showing Or Hiding An Sapui5 Control At Runtime?

Set the “visible” property of the manage to “authentic” or “fake”.

Q25. 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" />

Q26. Name Some Semantic States In Sapui5?

Positive

Negative

Critical

Q27. What Is The Correct Syntax For Defining Namespaces In Xml Views?

Xmlns:m="sap.M"

Q28. What Can You Do To Structure Your Application Code Better?

Use subdirectories for associated views and controllers.

Use fragments to outline reused UI elements most effective once.

Put the capability utilized in multiple controllers right into a base controller and increase this controller within the different controllers for your app.

Q29. Where Are Filters Applied In Sapui5?

To an aggregation binding

Q30. Which Benefits Does The Hash-based Navigation In Sapui5 Offer?

Hash-based navigation adjusts the current hash for your interactions with the app, in order that the URL can always be bookmarked.

It lets in you to build one-web page apps where the contextual navigation is accomplished by way of changing the hash, so the browser does now not must reload the page.

Q31. Which Of The Following Are Part Of The Control Metadata?

Aggregations

Properties

Events

Q32. Which Testing Features Are Provided By The Sap Fiori Worklist Application Template?

A test suite that calls all your unit and integration assessments

Clear separation of take a look at and production code

Unit take a look at setup (QUnit) and primary take a look at insurance

Q33. How Navigation Works In Sapui5?

Sap uses two mechanisms, routing and EventBus. Routing Is mainly used for bookmarking the URL. We define routing in issue.Js inside the metadata. It additionally defines the navigation course and hash changer which is used at the runtime to exchange the url of the particular display screen.

Q34. Why Is Not All Javascript Code Put In A <script> Tag Directly On The Index.Html Page?

To sincerely separate concerns according to the MVC idea.

To make your code tons less complicated to examine and preserve

To allow your code to dynamically load sources as they may be wanted

Q35. 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" segment of the show up.Json file

Q36. What Do You Have To Consider When Choosing The Sapui5 Version For The Application Template?

The SAPUI5 version have to be to be had to your target deployment system.

Q37. What Do You Have To Do To Be Notified When The Hash Has Changed To A Certain Pattern?

Register to the patternMatched event of the path.

Q38. How Can Sap.M.Table Behave On Smaller Devices Such As Phones And Tablets?

It hides less crucial columns.

It shows much less essential columns as a "pop-in"; it stacks them vertically in the row making the table large in peak.

Q39. Why Sapui5 Instead Of Html5?

As HTML5 international is the brand new age the front generation across all factor of internet programs SAP was kind of trailing in this age because SAP was using age old WebDynpro for building SAP Web Applications which lacks in wealthy and user-pleasant UI. SAP identified this and came up with its very own custom HTML5 library i.E. SAPUI5.

Q40. What Is Formatter In Sapui5 And How To Use It?

We need to apply formatter whilst we need to perform some changes at the returned end property statistics at the front cease.

We are able to use formatter while records  binding to a property like as follows:

oControl = new sap.Ui.Commons.TextField(

price : direction : “/direction”, formatter : feature(oEvent)

go back “Value:”+oEvent;

);

Q41. Does Fragment Have Its Own Controller?

Fragments are created without controllers, they don’t have their own controllers they percentage controller of the view which is invoking it.

Q42. How Many Types Of Data Model Are Available In Sapui5?

SAPUI5 has following predefined four statistics fashions to be had:

JSON Model: Client-aspect version, helps  manner binding.

XML Model : Client-aspect model and supposed for small facts units this is very hardly ever used version.

Resource Model : This is also purchaser side model used to maintain resource bundles, especially texts.

ODATA Model : This is maximum critical model of the 4 furnished.

Q43. Which Predefined Sizes For Margins That Stand For 8px (zero.5rem), 16px (1rem), 32px (2rem), Or 48px (3rem) Are Available In Sapui5?

'Tiny', 'Small', 'Medium' or 'Large'

Q44. When Should You Put Code From Your View Into A Separate View Or Fragment And Nest It Into The Original View?

When you recognise which you want to reuse this code in numerous different places and perspectives for your app.

Q45. How Many Filters Can You Apply On A List Binding?

As many as wanted

Q46. What Is The Main Difference Between Html5 And Sap Ui5?

HTML5 is a markup language and it doesn’t have programming abilities however SAP UI5 is a framework that's primarily based on MVC method to build internet applications. HTML5 is mainly for the cause of making a easy website without formatting and good judgment however UI5 affords popular fashion and components to construct wealthy UIs.

Q47. Which Filter Operation Can You Use To Filter Items With A Numeric Value Lower Than X?

Sap.Ui.Version.FilterOperator.LT

Q48. How Are Unit Tests For Your App Started In Sap Web Ide?

By choosing the run configuration Run Unit Tests

By right-clicking the unitTests.Qunit.Html file and selecting an alternative from the Run menu

Q49. How Can You Access The List Item Control In An Event Handler For The Press Event?

Call the getSource() method on the occasion item parameter.

Q50. How Do You Enable The Debugging Option For Sap Netweaver Odata Services?

Use the URL parameter sap-ds-debug=genuine.




CFG