You have two internal tables itab1 and itab2.What is true for using the expression itab1 = corresponding #( itab2 )? Note: There are 2 correct answers to this question.
Answer : B, C
The expression itab1 = corresponding #( itab2 ) is a constructor expression with the component operator CORRESPONDING that assigns the contents of the internal table itab2 to the internal table itab1. The following statements are true for using this expression:
The following statements are false for using this expression:
In RESTful Application Programming, a business object contains which parts? Note: There are 2 correct answers to this question.
Answer : A, B
The following are not parts of a business object in RESTful Application Programming, because:
What are the effects of this annotation? Note: There are 2 correct answers to this question.
Answer : A, B
The following code snippet defines a CDS view ZI_FLIGHT_TEXTS with an input parameter p_langu that is annotated with @Environment.systemField: #LANGUAGE:
define view ZI_FLIGHT_TEXTS with parameters p_langu : syst_langu @<Environment.systemField: #LANGUAGE as select from sflight left outer join scarr on sflight.carrid = scarr.carrid left outer join stext on scarr.carrid = stext.carrid { sflight.carrid, sflight.connid, sflight.fldate, scarr.carrname, stext.text as carrtext } where stext.langu = :p_langu
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in ABAP without specifying the value of p_langu in the WHERE clause. The value of sy-langu will be automatically passed to the CDS view:
SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts INTO TABLE @DATA(lt_flights).
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in another CDS view ZI_FLIGHT_REPORT. The value of sy-langu will be automatically passed to the nested CDS view ZI_FLIGHT_TEXTS:
define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @<Environment.systemField: #LANGUAGE as select from zi_flight_texts(p_langu) { carrid, connid, fldate, carrname, carrtext, count(*) as flight_count } group by carrid, connid, fldate, carrname, carrtext
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in ABAP with a specified value of p_langu in the WHERE clause. The value 'E' will be passed to the CDS view instead of the value of sy-langu:
SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts WHERE p_langu = 'E' INTO TABLE @DATA(lt_flights).
The following code snippet shows how to use the CDS view ZI_FLIGHT_TEXTS in another CDS view ZI_FLIGHT_REPORT with a specified value of p_langu in the WHERE clause. The value 'E' will be passed to the nested CDS view ZI_FLIGHT_TEXTS instead of the value of sy-langu:
define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @<Environment.systemField: #LANGUAGE as select from zi_flight_texts(p_langu) { carrid, connid, fldate, carrname, carrtext, count(*) as flight_count } where p_langu = 'E' group by carrid, connid, fldate, carrname, carrtext
What are some characteristics of secondary keys for internal tables? Note: There are 3 correct answers to this question.
Answer : A, B, D
A) Secondary keys must be chosen explicitly when you actually read from an internal table. This means that when you use a READ TABLE or a LOOP AT statement to access an internal table, you have to specify the secondary key that you want to use with the USING KEY addition. For example, the following statement reads an internal table itab using a secondary key sec_key:
READ TABLE itab USING KEY sec_key INTO DATA(wa).
If you do not specify the secondary key, the system will use the primary key by default2.
B) Multiple secondary keys are allowed for any kind of internal table. This means that you can define more than one secondary key for an internal table, regardless of the table type. For example, the following statement defines an internal table itab with two secondary keys sec_key_1 and sec_key_2:
DATA itab TYPE SORTED TABLE OF ty_itab WITH NON-UNIQUE KEY sec_key_1 COMPONENTS field1 field2 sec_key_2 COMPONENTS field3 field4.
You can then choose which secondary key to use when you access the internal table1.
D) Sorted secondary keys do NOT have to be unique. This means that you can define a sorted secondary key for an internal table that allows duplicate values for the key fields. A sorted secondary key maintains a predefined sorting order for the internal table, which is defined by the key fields in the order in which they are specified. For example, the following statement defines a sorted secondary key sec_key for an internal table itab that sorts the table by field1 in ascending order and field2 in descending order:
DATA itab TYPE STANDARD TABLE OF ty_itab WITH NON-UNIQUE SORTED KEY sec_key COMPONENTS field1 ASCENDING field2 DESCENDING.
The following are not characteristics of secondary keys for internal tables, because:
C) Hashed secondary keys do NOT have to be unique. This is false because hashed secondary keys must be unique. This means that you can only define a hashed secondary key for an internal table that does not allow duplicate values for the key fields. A hashed secondary key does not have a predefined sorting order for the internal table, but uses a hash algorithm to store and access the table rows. For example, the following statement defines a hashed secondary key sec_key for an internal table itab that hashes the table by field1 and field2:
DATA itab TYPE STANDARD TABLE OF ty_itab WITH UNIQUE HASHED KEY sec_key COMPONENTS field1 field2.
You can then access the internal table using the hashed secondary key with a direct access algorithm, which is very fast.
Which of the following are incomplete ABAP types? Note: There are 2 correct answers to this question.
Answer : C, D
The following are incomplete ABAP types:
The following are not incomplete ABAP types, because they specify all the attributes of a data type:
B) T is a type for time values in the format HHMMSS. The length of the time value is fixed at 6 characters and does not have to be specified when a data object or a constant is defined with this type. For example, DATA time TYPE t defines a data object named time with a type t and a length of 6 characters.
Which statement can you use to change the contents of a row of data in an internal table?
Answer : B
The statement that can be used to change the contents of a row of data in an internal table is MODIFY table. The MODIFY table statement can be used to change the contents of one or more rows of an internal table, either by specifying the table index, the table key, or a condition. The MODIFY table statement can also be used to change the contents of a database table, by specifying the table name and a work area or an internal table. The MODIFY table statement can use the TRANSPORTING addition to specify which fields should be changed, and the WHERE addition to specify which rows should be changed.
The other statements are not suitable for changing the contents of a row of data in an internal table, as they have different purposes and effects. These statements are:
APPEND table: This statement can be used to add a new row of data to the end of an internal table, either by specifying a work area or an inline declaration. The APPEND table statement does not change the existing rows of the internal table, but only increases the number of rows by one.
INSERT table: This statement can be used to insert a new row of data into an internal table, either by specifying the table index, the table key, or a sorted position. The INSERT table statement does not change the existing rows of the internal table, but only shifts them to make room for the new row. The INSERT table statement can also be used to insert a new row of data into a database table, by specifying the table name and a work area or an inline declaration.
UPDATE table: This statement can be used to update the contents of a database table, by specifying the table name and a work area or an internal table. The UPDATE table statement can use the SET addition to specify which fields should be updated, and the WHERE addition to specify which rows should be updated. The UPDATE table statement does not affect the internal table, but only the corresponding database table.
You want to provide a short description of the data definition for developers that will be attached to the database view
Which of the following annotations would do this if you inserted it on line #27
Answer : D
The following code snippet uses the @EndUserText.label annotation to provide a short description of the data definition for the CDS view ZCDS_VIEW:
@AbapCatalog.sqlViewName: 'ZCDS_VIEW' @AbapCatalog.compiler.compareFilter: true @AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'CDS view for flight data' 'short description for developers define view ZCDS_VIEW as select from sflight { key carrid, key connid, key fldate, seatsmax, seatsocc }
You cannot do any of the following: