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: A
Question 27
Which of the following are ABAP Cloud Development Model rules? Note: There are 2 correct answers to this question.
Correct Answer: A,C
* Use public SAP APIs and SAP extension points. This rule ensures that the ABAP Cloud code is stable, reliable, and compatible with the SAP solutions and the cloud operations. Public SAP APIs and SAP extension points are the only allowed interfaces and objects to access the SAP platform and the SAP applications. They are documented, tested, and supported by SAP. They also guarantee the lifecycle stability and the upgradeability of the ABAP Cloud code1. * Build ABAP RESTful application programming model-based services. This rule ensures that the ABAP Cloud code follows the state-of-the-art development paradigm for building cloud-ready business services. The ABAP RESTful application programming model (RAP) is a framework that provides a consistent end-to-end programming model for creating, reading, updating, and deleting (CRUD) business data. RAP also supports draft handling, authorization checks, side effects, validations, and custom actions. RAP exposes the business services as OData services that can be consumed by SAP Fiori apps or other clients2.
Question 28
Refer to the Exhibit. when you attempt to activate the definition, what will be the response?
Correct Answer: A
The response will be an activation error because the field names of the union do not match. This is because the field names of the union must match in order for the definition to be activated. The union operator combines the result sets of two or more queries into a single result set. The queries that are joined by the union operator must have the same number and type of fields, and the fields must have the same names1. In the given code, the field names of the union do not match, because the first query has the fields carrname, connid, cityfrom, and cityto, while the second query has the fields carrname, carrier_id, cityfrom, and cityto. The field connid in the first query does not match the field carrier_id in the second query. Therefore, the definition cannot be activated.
Question 29
You want to define the following CDS view entity with an input parameter: Define view entity Z_CONVERT With parameters currency : ??? Which of the following can you use to replace "???? Note: There are 2 correct answers to this question.
Correct Answer: A,C
The possible replacements for "???" in the CDS view entity definition with an input parameter are A. built-in ABAP type and C. A data element. These are the valid types that can be used to specify the data type of an input parameter in a CDS view entity. A built-in ABAP type is a predefined elementary type in the ABAP language, such as abap.char, abap.numc, abap.dec, etc. A data element is a reusable semantic element in the ABAP Dictionary that defines the technical attributes and the meaning of a field12. For example: * The following code snippet defines a CDS view entity with an input parameter currency of type abap. cuky, which is a built-in ABAP type for currency key: Define view entity Z_CONVERT With parameters currency : abap.cuky as select from ... { ... } * The following code snippet defines a CDS view entity with an input parameter currency of type waers, which is a data element for currency key: Define view entity Z_CONVERT With parameters currency : waers as select from ... { ... } You cannot do any of the following: * B. A built-in ABAP Dictionary type: This is not a valid type for an input parameter in a CDS view entity. A built-in ABAP Dictionary type is a predefined elementary type in the ABAP Dictionary, such as CHAR, NUMC, DEC, etc. However, these types cannot be used directly in a CDS view entity definition. Instead, they have to be prefixed with abap. to form a built-in ABAP type, as explained above12. * D. A component of an ABAP Dictionary structure: This is not a valid type for an input parameter in a CDS view entity. A component of an ABAP Dictionary structure is a field that belongs to a structure type, which is a complex type that consists of multiple fields. However, an input parameter in a CDS view entity can only be typed with an elementary type, which is a simple type that has no internal structure12. References: 1: ABAP CDS - SELECT, parameter_list - ABAP Keyword Documentation - SAP Online Help 2: ABAP Data Types - ABAP Keyword Documentation - SAP Online Help
Question 30
What RESTful Application Programming feature is used to ensure the uniqueness of a semantic key?
Correct Answer: C
The RESTful Application Programming feature that is used to ensure the uniqueness of a semantic key is determination. A determination is a type of behavior implementation that defines a logic that is executed automatically when certain events occur, such as create, update, delete, or activate. A determination can be used to calculate or derive values for certain fields, such as semantic keys, based on other fields or external sources. A determination can also be used to check the uniqueness of a semantic key by comparing it with the existing values in the database or the transaction buffer. A determination can use the ABAP SQL or the EML syntax to access and manipulate data. A determination can be defined using the DETERMINE action clause in the behavior definition of a CDS view entity or a projection view. A determination can also be annotated with the @ObjectModel.determination annotation to specify the event, the timing, and the scope of the determination12 The other RESTful Application Programming features are not used to ensure the uniqueness of a semantic key, but have different purposes and effects. These features are: Validation: A validation is a type of behavior implementation that defines a logic that is executed automatically when certain events occur, such as create, update, delete, or activate. A validation can be used to check the consistency and correctness of the data, such as mandatory fields, data types, value ranges, or business rules. A validation can use the ABAP SQL or the EML syntax to access and manipulate data. A validation can be defined using the VALIDATE action clause in the behavior definition of a CDS view entity or a projection view. A validation can also be annotated with the @ObjectModel.validation annotation to specify the event, the timing, and the scope of the validation12 Action: An action is a type of behavior implementation that defines a logic that is executed explicitly by the user or the application. An action can be used to perform a specific business operation, such as creating, updating, deleting, or activating an entity instance, or triggering a workflow or a notification. An action can use the ABAP SQL or the EML syntax to access and manipulate data. An action can be defined using the ACTION clause in the behavior definition of a CDS view entity or a projection view. An action can also be annotated with the @ObjectModel.action annotation to specify the name, the description, the parameters, and the visibility of the action12