Hana specific code to data Flashcards
(34 cards)
Are keywords case sensitive in HANA native or Open SQL?
No
In HANA native SQL are table and column names converted to uppercase?
Only if they are not enclosed in double quotes
If I need to access a data source not defined in the ABAP data dictionary, what must I use?
HANA native SQL
In HANA native SQL where must the element list be placed?
After the FROM clauses
What is the source/field separator in HNSql?
a period
table.field
What is the difference in Schema handling between HNSql and OSql?
HNSql uses the default implicit (user) schema or schema name before table name
OSql can only use the default schema
In Hana Native SQL how is the client handled?
It must be specified, there is no implicit client handling
What is the difference in the syntax of HNSql and OSql when it comes to limiting the number of rows selected?
In HNSql it is the keyword TOP In OSql it is the phrase UP TO # ROWS e.g TOP 50 UP TO 50 ROWS
Does HANA Native SQL have access to CDS views?
Yes and no, it won’t have access to the CDS as defined in the data dictionary but it will have access to the underlying SQL view created by the CDS
What are two common Open SQL clauses that are not supported in HANA native SQL?
FOR ALL ENTRIES
CORRESPONDING FIELDS
There is no syntax check for HANA Native SQL in ABAP. How can a syntax check be carried out?
In Eclipse, use SQL Console to test the statements
What is difference between dats_days_between and days_between
the dats_ are used in open sql because dates are stored as numeric strings yyyymmdd
In hana dates are stored based on the sql standard of yyyy-mm-dd and can use standard sql functions like days_between
What are the advantages of AMDPs?
AMDPs allow database procedures to be fully maintained and managed in ABAP.
All SQLscript syntax checking, debugging, transporting..
How are AMDPs created?
As a method in a class where the method definition includes the keywords BY DATABASE PROCEDURE in the implementation. This method then contains SQLscript instead of ABAP commands. e.g. METHOD my_method BY DATABASE PROCEDURE. ...sqlscript ...sqlscript ENDMETHOD.
If an AMDP method will be part of a class, what interface must be present in the public section of the class.
IF_AMDP_MARKER_HDB
What types must be used for parameters of AMDP methods?
Scalar types. These are SQL-92 compliant types
Or table types with scalar columns
AMPD methods can have all types of paramters; Import export changing returning?
No, returning is not available
Parameters of AMDP can refer to ABAP dictionary structures as long as the structure only contains elementary components?
False. You cannot use ABAP dictionary structure type regardless of their components
Table types can be used as parameters in AMDPs?
Yes, but the line of the table must be simple. Nothing nested is allowed. All fields must be scalar.
Can the parameters of the AMDP have default values?
Yes
The AMDP method must be in the public section of the class?
Incorrect, it can be public, protected, or private
Write an example of method that calls a AMDP
Method my_amdp BY DATABASE PROCEDURE FOR hdb LANGUAGE sqlscript OPTIONS read-only -- not required USING bkpf vbak ...sqlscript starts here
AMDP methods are instance methods?
Yes and no. They are defined in as methods, not class-methods, but they are executed as static methods
If the AMPD uses ABAP tables or other objects, or calls other AMDPs, these must be listed in the USING clause of the method implementation
True