SAP HANA Interview Questions
SAP HANA Interview Questions
Basically, we use main window when there is a need to display text or data which can cover several pages. Say
there is a requirement to display data of all the rows of a table (a table in which you are not very sure as to how
many row it has), in such cases we always use main windows.
As soon as a main window is completely filled with text/data, the system continues to display the text/data in the
main window of the next page. It automatically triggers the page break.
Only one window can be defined in a form as main window. The main window can be called in other pages of the
form but it must have the same width on each page, but can differ in height.
A page without main window must not call itself as next page, since this would trigger an endless loop. In such a
case, the system automatically terminates after three pages.
Mentioned below are the few reasons why to choose SAP HANA –
Real Time – SAP HANA Provides Real-Time Data Provisioning and Realtime Reporting.
Speed – SAP HANA provide high speeds processing on massive data due to In-Memory Technology.
Any Data/Source- SAP HANA can access various data source including Structured and Un-Structured data from SAP
or Non-SAP data source.
Cloud- SAP HANA database and application can be deployed to the Cloud environment.
Simplicity – SAP HANA reduce efforts behind ETL process, Data Aggregation, Indexing, and Mapping.
Cost – SAP claims that SAP HANA Software can reduce Total IT cost of a company.
Choice Option – SAP HANA is supported by different hardware vendor and Software provider, so based on the
requirement, the user can choose the best option.
SAP HANA In-Memory Strategy
SAP HANA has many processes running on the SUSE Linux Server. SUSE Linux server manages the reservation of
memory to all process.
When SAP HANA starts up, Linux OS reserves memory for the program code, program stack, and static data. OS
can dynamically reserve additional data memory upon request from the SAP HANA Server.
SAP HANA create a memory pool for managing and tracking the consumption of memory. The memory pool is used
to store all the in-memory data and system tables, thread stack, temporary computations and all other data
structure required for managing the database.
When more memory is required for table growth or temporary computations, the SAP HANA memorymanager
obtains this from the pool.
Q32. What are different techniques of creating a Calculation view?
Ans. Graphical Editor and SQL Script Editor
Q33. What is a Star Schema in ABAP on HANA?
Ans. When we combine data of dimension (master) with measure (transaction), it becomes Star Schema. And to
join two or more Star Schemas, it is done by Calculation View.
Q34. What is the limitation of Analytical view?
SAP HANA Analytic view is based on STAR Schema Modelling, and it represents OLAP/Multi-Dimensional Modelling
objects.
In SAP HANA Analytic view, dimension table are joined with the fact table that contains transaction data. A
dimension table contains descriptive data. (E.g. Product, Product Name, Vendor, customer, etc.). Fact Table
contains both descriptive data and Measureable data (Amount, Tax, etc.).
SAP HANA Analytic view forms a cube-like structure, which is used for analysis of data.
Analytic View is mainly used in a scenario where we need aggregated data from the underlying table.
Ans. This view can have only one measure. It cannot have multiple measure. Basically one fact table in an
Analytical view. Ideally only one Fact Table should only be used with Analytical view since Fact Table requires
an aggregate.
Q35. what are steps to create an Attribute view?
Attribute View act as Master data context, which provides Text or Description for Key/Non-key field.
Attribute View can be reuse in Analytic View and Calculation View.
Attributes View is used to select a subset of columns and rows from a database table.
Attributes (fields) can be calculated from multiple table fields.
There is no measure and aggregation option.
Ans. Steps to create an attribute view in HANA Studio since graphical representation is not available in ABAP on
Eclipse:
Name and description of attribute view
Table and Join
Hierarchies, Transformation, restricted and calculated columns
Save and Activate
Data Preview
Q36. what is the limitation of an Attribute view?
Ans. Attribute view cannot be used with aggregate functions.
Q37. What is Content in SAP HANA?
Ans. Content is collection of development packages where we add different development objects including
Information Models: which are HANA specific data type.
Q38. What is a Package in SAP HANA?
Ans. It provides a name space for your development object. Once an information model is activated, it creates a
view in the HANA DB and it is stored inside the schema.
Eg. <packagename>::<viewName> schema
It allows you to transport all logically related development objects. Grouping development artefacts
together known as Delivery Unit.
Q39. Why Fact Table should not be added in an Attribute View?
Ans. It is recommended to use an Attribute View with only Master Table because of performance criteria. It is
advisable that Fact/Transaction Table used with Analytical view, and not be used with Attribute view due to
performance implication since Attribute View is processed in the join Engine of SAP HANA, it is not processed by
OLAP Engine which is equipped to do aggregation.
Statement: To expose a View/Model to the user, you create a select query on top of your view and create an
OData on your query and create a fiori app to expose it to the user…sap.viz OR use ALV grid
Q40. What is View Proxy in ABAP?
Ans. View Proxy is used to pull the data from a view in ABAP. To expose a Data Model to the application layer
( ABAP Layer ), SAP NW7.4 SP02 onwards, provides a feature called View Proxy which allows SAP HANA data
models to communicate with the ABAP Layer using ADT in eclipse and lock the objects in a Delivery unit to
transport the objects.
Q41. What is Hierarchy?
And. Hierarchy is used to realize data based on relation of data characteristics.
Click on Semantics -> Hierarchy Tab ->
Two types of hierarchy
Level based hierarchy – Relation between master data w.r.t. groups, these groups can come from multiple tables.
Parent-child hierarch – the relation works as self-relation. In this the table has a relation with itself and mark one
of the column as parent and another a child. E.g. manager employee relation.
Q42. What are different types of JOINS in SAP HANA?
Ans.
Inner This join type returns all rows when there is at least one match in both the database tables. In short.
join between 2 tables must fulfill the join criteria
Left Outer This join type returns all rows from the left table, and the matched rows from the right table.
This join type returns all rows from the right table, and the matched rows from the left
Right Outer
Joins the tables as like inner join, additionaly it will include the record of the table in-direction for
which no corresponding records available in transaction table.
Referential This join type is similar to inner join type, but assumes referential integrity is maintained for the join
tables.
Its smart inner join.
If we have 2 tables connected via ref. join and a query is written on Attr. View and do not include the
join column or the column on master check table. Essentially you are just selecting data from main
table, The join will be “pruned” (exclude – don’t care). When you also apply an filter on data model,
the ref. join also acts like inner join
Text Join This join type is used to obtain language-specific data from the text tables using a language column.
Full Outer This join type displays results from both left and right outer joins and returns all (matched or
Joins unmatched) rows from the tables on both sides of the join clause.
Text Join A join between master table and its text table with language key
Temporal join for timeframe – also known as Equi-join. BETWEEN condition in select query. ** applicable only
Join on Analytical Views
Star join Its only used in calculation views, it is used to combine multiple fact table directly.
Spatial Join used to join coordinates table
Q43. What is an Analytical View?
Ans. When a Fact table to be connected to multiple dimensions, we use analytical view. The Analytical views are
built to perform complex Aggregations(SUM, MIN, MAX, AVG, COUNT ) on measure. These views are processed by
OLAP engine in SAP HANA. They are used to build so called STAR schema. Also has capabilities to define calculated
columns, restricted columns, filters, import parameters, complex conversions.
It is important that In an analytical view, we must mark attributes and measures at the end in semantic. Because an
aggregation will be applied only on measure.
Q44. How do you achieve currency conversion in Analytical view?
Ans. Use calculated columns and define the semantics.
Q45. What are components of a View Scenario?
Q46. What is a Calculation View?
Ans. To include multiple facts as part of data model, we can go for calculation view, these views are processed by
Calculation Engine in SAP HANA. They are suitable for more complex calculation. CVs can be created in two ways:
Graphical and SQL Script ( to achieve parallelization). SQL scripting in Calculation view can be implemented in two
ways: CE functions (to get better performance ) or pure SQL
Q47. Define Calculation Engine Architecture?
Q48. What are CE functions?
Ans. SAP HANA Provides ready-made functions which are implemented inside Calculations engine and executed
with in the engine with enhanced performance for common tasks like :
projection (selection of some columns)
Joins (connect two data object)
Selection ( where clause )
Join with a Fact Table
Selection of data from column table
Unions
Aggregations
CE_*
St. In case of CE functions the call/execution remains in the CE engine, whereas in case of SQL Scripts, it has to go
outside of the Caln Engine to SQL Script Optimizer to execute the function leading to a drop in performance.
Q49. What are the cases when can you use different views for different requirements?
Q66. What is the difference between PROCEDURES and USER DEFINED FUNCTIONS in HANA?
Ans.
Q101. What is the concept of Association?Ans. It represents join where the two columns are used in join where
one of the column is a Projection. To make it available in the Data Preview, it has to be exposed to the DB. In S/4
HANA the association is indicated with a name starting underscore. Eg. _Supplier, _BusinessPartner etc.
Q102. What is Projection in CDS?Ans. Columns are indicated using a Projection of a table, We can use $projection
in CDS for the same in association join condition.
Q103. Techniques to Expose CDS to OData based on NW version ?
Q104. How to create an ALV report in SAP HANA using CDS view?
Ans. SAP NW 7.4 onwards ABAP list viewer comes with an IDA ( Integrated Data Access )
Advantage of Using ALV with IDA:
Only Selected Columns will be fetched from the DB
it is possible for tables that contain very large quantities of data to be displayed on the
UI which is called Pagination and
Automatic Query (No need to write a SELECT Statement, since the IDA framework prepares the
Query, sends it to the DB, pulls the data and displays it in the ALV. Only Data Source Name needs
to be provided to the IDA f/w, this data source can be a CDS View, which leverages the strength
of CDS like code pushdown and performance). The results of operations such as sorting,
grouping, or filtering are also delivered with a very fast response time.
CLASS NAME: CL_SALV_GUI_TABLE_IDA=>CREATE_FOR_CDS_VIEW()
Q105. What is the purpose of Cloud Connector?
Ans. In order to consume the OData service based on CDS, to create a Fiori app, we used concept of Cloud
Connector. To communicate securely, over the internet , by S/4 HANA On-premise with the SAP Cloud Platform,
we need Cloud Connector.
Q107. What are advantages of CDS views over AMDP?Ans.
Reusability of database artefact.
Advanced Features such as Associations and Annotations.
Client handling can be achieved in CDS.
Q108. What is a CDS entity?
Ans. A CDS entity is enriched by annotations which are used to build end-to-end fiori app utilizing these
annotations. To consume a CDS view, instead of consuming it in ABAP program it is advisable to consume it
using “CDS entity” since it allows access to metadata.
Q109. What is the purpose of UI Annotations in CDS view?
Ans. In order to Develop CDS view for Analytical tools for BW, VDM – Virtual Data Model – Analytical
query can be build using CDS views.
An Analytical App can be build using a CDS view ( Consumption View ) on top of a simple CDS view
( interface view) using UI annotations.
Using UI annotations, we can define selection fields, the lines items of table, data points of chart,
measures and dimensions for chart and expose this CDS as an odata service and build a Fiori App
Q110. What is CDS Table Function?
Ans. CDS Table Function can only be implemented with NetWeaver 7.5 which calls an AMDP ( ABAP Managed
Data Procedure) using CDS view. Using CDS interface concept, underlying calls an AMDP.
This is required in case there is some functionality which CDS cannot achieve -> Eg. Data Type
Mismatch, Looping, Conditional Looping and Logic
Q111. How can you secure your Data Access using CDS view?
Ans. Right click -> Core Data Services Folder -> Create Access Control -> mention the PFCG Role Name
Q112. What are different UI annotation in CDS Views?Ans.
Start with VDM Annotation : Define it as Consumption View
@UI.headerInfo – used to set the title of the table
@UI. presentationVariant – to initialize the UI ( available only on S/4 HANA systems ), define SORT order, group
based on fields, define default visualization at the view level
Properties to be defined the fields in selection
@UI. selectionField – selection parameters
@UI.identification – to define label from a user point of view
@UI.lineItem – to define the position of the line item
@UI.chart -- need to mark @UI.dataPoint : { title: xyz }
@UI.dataPoint -- to specify a measure in the chart
Q113. What is Full Text Search in SAP HANA?Ans. To enable Full Text search – there has to be
a FULLTEXT index that needs to be present in the Table, which is a DB specific feature.
Syntax: CREATE FULLTEXT INDEX <indextextvariable> on <table_name(field)> FAST PREPROCESSOR OFF;
Q114. What does FAST PREPROCESSOR keyword Indicate?
Ans. HANA does pre-processing to enable searches which are case-sensitive.
It achieves this using following techniques:
o Normalization : converting each letter into its equivalent upper and lower care.
o Tokenization : breaking every statement into words
o It also does linguistic analysis of words: finding equivalent word with the nearest meaning
Q115. What is FUZZY search in SAP HANA?
Ans. FUZZY SEARCH in SAP HANA is a Fault Tolerant search which allows a level of accuracy ( which can be
specified in the WHERE clause as percentage ) , and returns the value with an approximate match.
Ex: Query
Result: