In RESTful Application Programming, a business object contains which parts? Note: There are 2 correct answers to this question.
CDS view
Behavior definition
Authentication rules
Process definition
In RESTful Application Programming, a business object contains two main parts: a CDS view and a behavior definition1.
The following are not parts of a business object in RESTful Application Programming, because:
References: 1: Business Object | SAP Help Portal 2: CDS View Entities | SAP Help Portal 3: Behavior Definition | SAP Help Portal 4: Service Binding | SAP Help Portal 5: Workflow | SAP Help Portal
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.
Fields with the same name but with different types may be copied from itab2 to itab1.
itab1 and itab2 must have at least one field name in common.
Fields with the same name and the same type will be copied from itab2 to itab1.
itab1 and itab2 must have the same data type.
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:
References:Â CORRESPONDING - Component Operator - ABAP Keyword Documentation
Which restrictions exist for ABAP SQL arithmetic expressions? Note: There are 2 correct answers to this question.
Floating point types and integer types can NOT be used in the same expression.
The operator/is allowed only in floating point expressions.
Decimal types and integer types can NOT be used in the same expression.
The operator is allowed only in floating point expressions.
ABAP SQL arithmetic expressions have different restrictions depending on the data type of the operands. The following are some of the restrictions:
References: sql_exp - sql_arith - ABAP Keyword Documentation, SQL Expressions, Arithmetic Calculations - ABAP Keyword Documentation
What are valid statements? Note: There are 2 correct answers to this question.
"zcxl" is a dictionary structure, and "paraml" and "param2" are this structure.
"paraml11 and "param2" are predefined names.
The code creates an exception object and raises an exception.
"previous" expects the reference to a previous exception
The code snippet in the image is an example of using the RAISE EXCEPTION statement to raise a class-based exception and create a corresponding exception object. The code snippet also uses the EXPORTING addition to pass parameters to the instance constructor of the exception class12. Some of the valid statements about the code snippet are:
You cannot do any of the following:
References: 1: RAISE EXCEPTION - ABAP Keyword Documentation - SAP Online Help 2: Class-Based Exceptions - ABAP Keyword Documentation - SAP Online Help
Which of the following integration frameworks have been released for ABAP cloud development? Note: There are 3 correct answers to this question.
SOAP consumption
CDS Views
Business Add-ins (BAdls)
Business Events
OData services
The following are the integration frameworks that have been released for ABAP cloud development:
The other integration frameworks are not released for ABAP cloud development, as they are either not supported or not recommended for cloud scenarios. These frameworks are:
References: Consuming SOAP Services - ABAP Keyword Documentation, Business Events - ABAP Keyword Documentation, OData Services - ABAP Keyword Documentation, CDS Data Model Views - ABAP Keyword Documentation, [Business Add-Ins (BAdIs) - ABAP Keyword Documentation]
Which statement can you use to change the contents of a row of data in an internal table?
Append table
Modify table
Insert table
Update table
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:
References: MODIFY table - ABAP Keyword Documentation, APPEND table - ABAP Keyword Documentation, INSERT table - ABAP Keyword Documentation, UPDATE table - ABAP Keyword Documentation
Which type of legacy code does SAP recommend you eliminate when you review modifications as part of an SAP S/4HANA system conversion? Note: There are 2 correct answers to this question.
Code that supports a critical business process
Code that now is identical to a standard SAP object
Code that has less than 10% usage according to usage statistics
Code that can be redesigned as a key user extension
SAP recommends that you eliminate the following types of legacy code when you review modifications as part of an SAP S/4HANA system conversion:
The other types of legacy code are not recommended to be eliminated, as they may still be relevant or necessary for your business processes. However, you should still review and adjust them according to the SAP S/4HANA simplification items and best practices. These types of code are:
References: Custom Code Management (CCM) During an SAP S/4HANA Conversion, Custom Code Migration Guide for SAP S/4HANA 2020
Which of the following types are permitted to be used for
A database table from the ABAP Dictionary
A CDS DDIC-based view
An external view from the ABAP Dictionary
A database view from the ABAP Dictionary
The
You cannot do any of the following:
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
What would be the correct expression to change a given string value 'mr joe doe' into 'JOE' in an ABAP SQL field list?
SELECT FROM TABLE dbtabl FIELDS
Of1,
upper(left( 'mr joe doe', 6)) AS f2_up_left, f3,
SELECT FROM TABLE dbtabl FIELDS
Of1,
left(lower(substring( 'mr joe doe', 4, 3)), 3) AS f2_left_lo_sub, f3,
SELECT FROM TABLE dbtabl FIELDS
Of1,
substring(upper('mr joe doe'), 4, 3) AS f2_sub_up, f3,...
SELECT FROM TABLE dbtabl FIELDS
Of1,
substring(lower(upper( 'mr joe doe' ) ), 4, 3) AS f2_sub_lo_up, f3,
The correct expression to change a given string value ‘mr joe doe’ into ‘JOE’ in an ABAP SQL field list is C. SELECT FROM TABLE dbtabl FIELDS Of1, substring(upper(‘mr joe doe’), 4, 3) AS f2_sub_up, f3,… This expression uses the following SQL functions for strings12:
You cannot do any of the following:
References: 1: SQL Functions for Strings - ABAP Keyword Documentation - SAP Online Help 2: sql_func - String Functions - ABAP Keyword Documentation - SAP Online Help
In this nested join below in which way is the join evaluated?
From the left to the right in the order of the tables:
1.
a is joined with b
2.
b is joined with c
From the right to the left in the order of the tables:
1.
b is joined with c.
2.
b is joined with a.
From the top to the bottom in the order of the on conditions
1.
b is joined with c
2.
a is joined with b
From the bottom to the top in the order of the on conditions:
1.
a is joined with b
2.
b is joined with c
The nested join is evaluated from the top to the bottom in the order of the ON conditions. This means that the join expression is formed by assigning each ON condition to the directly preceding JOIN from left to right. The join expression can be parenthesized implicitly or explicitly to show the order of evaluation. In this case, the implicit parentheses are as follows:
SELECT * FROM (a INNER JOIN (b INNER JOIN c ON b~c = c~c) ON a~b = b~b)
This means that the first join expression is b INNER JOIN c ON b~c = c~c, which joins the columns of tables b and c based on the condition that b~c equals c~c. The second join expression is a INNER JOIN (b INNER JOIN c ON b~c = c~c) ON a~b = b~b, which joins the columns of table a and the result of the first join expression based on the condition that a~b equals b~b. The final result set contains all combinations of rows from tables a, b, and c that satisfy both join conditions.
References:Â 1: SELECT, FROM JOIN - ABAP Keyword Documentation - SAP Online Help
Which of the following is a generic internal table type?
SORTED TABLE
INDEX TABLE
STANDARD TABLE
HASHED TABLE
A generic internal table type is a table type that does not define all the attributes of an internal table in the ABAP Dictionary; it leaves some of these attributes undefined. A table type is generic in the following cases1:
A generic table type can be used only for typing formal parameters or field symbols. A generic table type cannot be used for defining data objects or constants2.
Therefore, the correct answer is B. INDEX TABLE, which is a generic table type that does not specify the access type or the table key. The other options are not generic table types, because:
References: 1: Generic Table Types - ABAP Dictionary - SAP Online Help 2: Generic ABAP Types - ABAP Keyword Documentation - SAP Online Help 3: Sorted Tables - ABAP Keyword Documentation - SAP Online Help 4: Standard Tables - ABAP Keyword Documentation - SAP Online Help 5: Hashed Tables - ABAP Keyword Documentation - SAP Online Help
What are the effects of this annotation? Note: There are 2 correct answers to this question.
The value of sy-langu will be passed to the CDS view automatically both when you use the -1 CDS view in ABAP and in another CDS view entity (view on view).
You can still override the default value with a value of your own.
The value of sy-langu will be passed to the CDS view automatically when you use the CDS view in ABAP but not when you use it in another view entity
It is no longer possible to pass your own value to the parameter.
The annotation @Environment.systemField: #LANGUAGE is used to assign the ABAP system field sy-langu to an input parameter of a CDS view or a CDS table function. This enables the implicit parameter passing in Open SQL, which means that the value of sy-langu will be automatically passed to the CDS view without explicitly specifying it in the WHERE clause. This also applies to the CDS views that use the annotated CDS view as a data source, which means that the value of sy-langu will be propagated to the nested CDS views (view on view)12. For example:
define view ZI_FLIGHT_TEXTS with parameters p_langu : syst_langu @ SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts INTO TABLE @DATA(lt_flights). define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @ The annotation @Environment.systemField: #LANGUAGE does not prevent the possibility of overriding the default value with a value of your own. You can still specify a different value for the input parameter p_langu in the WHERE clause, either in ABAP or in another CDS view. This will override the value of sy-langu and pass the specified value to the CDS view12. For example: SELECT carrid, connid, fldate, carrname, carrtext FROM zi_flight_texts WHERE p_langu = ‘E’ INTO TABLE @DATA(lt_flights). define view ZI_FLIGHT_REPORT with parameters p_langu : syst_langu @ References: 1: ABAP CDS - parameter_annot - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - session_variable - ABAP Keyword Documentation - SAP Online Help
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
@UI headerinto description label
@UI.badge.title.label
@EndUserText.quickInfo
@EndUserText label
The annotation that can be used to provide a short description of the data definition for developers that will be attached to the database view is the @EndUserText.label annotation. This annotation is used to specify a text label for the data definition that can be displayed in the development tools or in the documentation. The annotation can be inserted on line #27 in the code snippet provided in the question12. For example:
@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:
References: 1: ABAP CDS - SAP Annotations - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help
Which RESTful Application Programming object can be used to organize the display of fields in an app?
Data model view
Metadata extension
Service definition
Projection view
A metadata extension is a RESTful Application Programming object that can be used to organize the display of fields in an app. A metadata extension is a CDS view that annotates another CDS view with UI annotations, such as labels, icons, or facets. These annotations define how the data should be presented in the app, such as which fields should be shown on the object page, which fields should be editable, or which fields should be used for filtering or sorting. A metadata extension can also be used to add custom actions or validations to the app12. References: 1: Refine the Object Page with Annotations | SAP Tutorials 2: ABAP RAP : Enabling custom actions with a dialog for additional input fields | SAP Blogs
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?
#15
#4
#6
#8
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:
References: SELECT - ABAP Keyword Documentation, Inline Declarations - ABAP Keyword Documentation
Exhibit:
What are valid statements? Note: There are 3 correct answers to this question.
go_if 1 may call method ml with go_ift->ml().
Instead of go ell = NEW #(...) you could use go ifl = NEW cll(. ... ).
go_cll may call method ml with go_dl->ifl-ml().
Instead of go_cll = NEW #() you could use go_iff - NEW #(...).
go_ifl may call method m2 with go if->m2(...).
The following are the explanations for each statement:
The other statements are not valid, as they have syntax errors or logical errors. These statements are:
References: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword Documentation, NEW - ABAP Keyword Documentation
Which function call returns 0?
Count_any_of ( val - ‘ABAP ABAP abap' sub "AB" )
Count (val - 'ABAP ABAP abap' sub - 'AB' )
find_any_of (val = "ABAP ABAP abap' sub = "AB")
find_any_not_of( val 'ABAP ABAP abap’ sub = 'AB')
The function find_any_not_of returns the position of the first character in the string val that is not contained in the string sub. If no such character is found, the function returns 0. In this case, the string val contains only the characters A, B, and a, which are all contained in the string sub, so the function returns 0. The other functions return positive values, as follows:
Which extensibility type does SAP recommend you use to enhance the existing UI for an SAP Fiori app?
Key user
Classic
Side-by-side
Developer
According to the SAP clean core extensibility and ABAP cloud topic, SAP recommends using developer extensibility to enhance the existing UI for an SAP Fiori app. Developer extensibility allows you to use the UI adaptation editor in SAP Web IDE to modify the UI layout, add or remove fields, and bind them to the data model. You can also use the SAPUI5 framework to create custom controls, views, and controllers. Developer extensibility is based on the in-app extensibility concept, which means that the extensions are part of the same application and are deployed together with the app. Developer extensibility requires developer skills and access to the source code of the app. References: SAP Learning Hub, SAP S/4HANA Cloud Extensibility - In-App Extensibility, SAP Fiori: Extensibility
What RESTful Application Programming object contains only the fields required for a particular app?
Database view
Metadata extension
Projection View
Data model view
A projection view is a RESTful Application Programming object that contains only the fields required for a particular app. A projection view is a CDS view entity that defines a projection on an existing CDS view entity or CDS DDIC-based view. A projection view exposes a subset of the elements of the projected entity, which are relevant for a specific business service. A projection view can also define aliases, virtual elements, and annotations for the projected elements. A projection view is the top-most layer of a CDS data model and prepares data for a particular use case. A projection view can have different provider contracts depending on the type of service it supports, such as transactional query, analytical query, or transactional interface.
A database view is a CDS DDIC-based view that defines a join or union of database tables. A database view has an SQL view attached and can be accessed by Open SQL or native SQL. A database view can be used as a projected entity for a projection view, but it does not contain only the fields required for a particular app.
A metadata extension is a RESTful Application Programming object that defines additional annotations for a CDS view entity or a projection view. A metadata extension can be used to enhance the metadata of a CDS data model without changing the original definition. A metadata extension does not contain any fields, but only annotations.
A data model view is a CDS view entity that defines a data model based on database tables or other CDS view entities. A data model view can have associations, aggregations, filters, parameters, and annotations. A data model view can be used as a projected entity for a projection view, but it does not contain only the fields required for a particular app.
References: CDS Projection Views - ABAP Keyword Documentation, CDS Projection Views in ABAP CDS: What’s Your Flavor, Business Object Projection - ABAP Keyword Documentation
Which of the following are valid sort operations for internal tables? Note: There are 3 correct answers to this question.
Sort a standard table using
SORT itab ASCENDING.
Sort a sorted table using
SORT itab BY fieldl ASCENDING field2 DESCENDING.
Sort a standard table using
SORT itab BY field1 field2.
Sort a standard table using
SORT itab.
Sort a sorted table using
SORT itab DESCENDING.
Which of the following are ABAP Cloud Development Model rules?
Note: There are 2 correct answers to this question.
Use public SAP APIs and SAP extension points.
Build ABAP RESTful application programming model-based services.
Reverse modifications when a suitable public SAP API becomes available.
Build ABAP reports with either ABAP List Viewer (ALV) or SAP Fiori.
TESTED 09 May 2024