/DMO/I_Connection is a CDS view. What variable type is connection full based on the following code? DATA connection full TYPE /DMD/I_Connection.
Correct Answer: C
Question 62
As a consultant you are posed the following question from a client who is using SAP S/4HANA Cloud, public edition and also SAP BTP, ABAP environment. "We are currently using an SAP Fiori app based on SAP Fiori elements that analyzes open orders. We have determined that it should be extended via a new button on the UI which will perform an on- the-fly calculation and display the result in a quick popup for the enduser. We have been informed by SAP that all underlying stack layers for the SAP Fiori app have been extensibility enabled." Based on this which of the following extension types would you recommend to the customer to add the new button?
Correct Answer: B
Question 63
Which of the following types are permitted to be used for <source> on line #4? Note: There are 2 correct answers to this question.
Correct Answer: A,B
The <source> clause in the CDS View Entity Data Definition can be used to specify the data source for the view entity. The <source> clause can accept different types of data sources, depending on the type of the view entity1. * A database table from the ABAP Dictionary: This is a valid type of data source for a CDS View Entity Data Definition. A database table from the ABAP Dictionary is a table that is defined in the ABAP Dictionary using the keyword TABLE or TABLE OF. The name of the database table must be unique within its namespace and must not contain any special characters2. * A CDS DDIC-based view: This is also a valid type of data source for a CDS View Entity Data Definition. A CDS DDIC-based view is a view that is defined in the Core Data Services using the keyword DEFINE VIEW ENTITY. The name of the CDS DDIC-based view must be unique within its namespace and must not contain any special characters3. You cannot do any of the following: * An external view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. An external view from the ABAP Dictionary is a view that is defined in an * external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the external view must be unique within its namespace and must not contain any special characters4. * A database view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. A database view from the ABAP Dictionary is a view that is defined in an external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the database view must be unique within its namespace and must not contain any special characters4. References: 1: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 2: ABAP Dictionary Tables - SAP Online Help 3: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 4: ABAP Dictionary Views - SAP Online Help
Question 64
To adhere to the most recent ABAP SQL syntax conventions from SAP, on which line must you insert the "INTO TABLE @gt flights" clause to complete the SQL statement?
Correct Answer: B
Explanation To adhere to the most recent ABAP SQL syntax conventions from SAP, you must insert the "INTO TABLE @gt flights" clause on line #4 to complete the SQL statement. This is because the INTO or APPENDING clause should be specified immediately after the SELECT clause, according to the ABAP SQL syntax conventions1. The INTO or APPENDING clause defines the data object to which the results set of the SELECT statement is assigned. The data object can be an internal table, a work area, or an inline declaration. In this case, the data object is an internal table named gt_flights, which is created using the inline declaration operator @DATA. The inline declaration operator allows you to declare and create a data object in the same statement where it is used, without the need for a separate DATA statement2. The other lines are not suitable for inserting the "INTO TABLE @gt flights" clause, as they would violate the ABAP SQL syntax conventions or cause syntax errors. These lines are: #6: This line is not suitable for inserting the "INTO TABLE @gt flights" clause, as it would cause a syntax error. This is because the FROM clause must be specified before the INTO or APPENDING clause, according to the ABAP SQL syntax conventions1. The FROM clause defines the data sources from which the data is read, such as database tables, CDS view entities, or CDS DDIC-based views. In this case, the data source is the database table flights. #8: This line is not suitable for inserting the "INTO TABLE @gt flights" clause, as it would cause a syntax error. This is because the ORDER BY clause must be specified after the INTO or APPENDING clause, according to the ABAP SQL syntax conventions1. The ORDER BY clause defines the sort order of the results set of the SELECT statement. In this case, the results set is sorted by the fields carrid, connid, and fltime. #15: This line is not suitable for inserting the "INTO TABLE @gt flights" clause, as it would violate the ABAP SQL syntax conventions. This is because the INTO or APPENDING clause should be specified as close as possible to the SELECT clause, according to the ABAP SQL syntax conventions1. The INTO or APPENDING clause should not be separated from the SELECT clause by other clauses, such as the WHERE clause, the GROUP BY clause, the HAVING clause, the UNION clause, or the ORDER BY clause. This is to improve the readability and maintainability of the ABAP SQL statement. References: SELECT - ABAP Keyword Documentation, Inline Declarations - ABAP Keyword Documentation
Question 65
In the assignment, data (gv_result) = 1/8. what will be the data type of gv_result?
Correct Answer: B
The data type of gv_result in the assignment data (gv_result) = 1/8 will be TYPE DECFLOAT 16. This is because the assignment operator (=) in ABAP performs an implicit type conversion from the source type to the target type, according to the following rules12: If the target type is specified explicitly, the source value is converted to the target type. If the target type is not specified explicitly, the source type is used as the target type, unless the source type is a literal or an expression, in which case the target type is determined by the following priority order: DECFLOAT34, DECFLOAT16, P, F, I, C, N, X, STRING, XSTRING. In this case, the target type is not specified explicitly, and the source type is an expression (1/8). Therefore, the target type is determined by the priority order, and the first matching type is DECFLOAT16, which is a decimal floating point type with 16 digits of precision12.