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 actions cause an indirect change to a database table requiring a table conversion? Note: There are 2 correct answers to this question.
Renaming a field in a structure that is included in the table definition
Changing the field labels of a data element that is used in the table definition.
Deleting a field from a structure that is included in the table definition.
Shortening the length of a domain used in a data element that is used in the table definition.
The following are the explanations for each action:
References: Converting Database Tables - ABAP Keyword Documentation, Adjustment of Database Structures - ABAP Keyword Documentation
Image:
In the following ABAP SQL code, what are valid case distinctions? Note: There are 2 correct answers to this question.
A)
B)
C)
D)
Option A
Option B
Option C
Option D
In the assignment, data (gv_result) = 1/8. what will be the data type of gv_result?
OTYPE I
TYPE DEFLOAT 16
TYPE P DECIMALS 3
TYPE P DECIMALS 2
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:
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.
References: 1: ABAP Assignment Rules - ABAP Keyword Documentation - SAP Online Help 2: ABAP Data Types - ABAP Keyword Documentation - SAP Online Help
Which of the following are features of Core Data Services? Note: There are 3 correct answers to this question.
Inheritance
Associations
Annotations
Delegation
Structured Query Language (SQL)
Core Data Services (CDS) is a framework for defining and consuming semantically rich data models in SAP HANA. CDS supports various features that enhance the capabilities of SQL and enable developers to create data models that are optimized for performance, readability, and extensibility12. Some of the features of CDS are:
You cannot do any of the following:
References: 1: Core Data Services (CDS) | CAPire 2: Core Data Services [CDS] in SAP S/4 HANA | SAP Blogs 3: Associations in Core Data Services (CDS) | SAP Help Portal 4: [CDS DDL - Association - ABAP Keyword Documentation - SAP Online Help] 5: [Annotations in Core Data Services (CDS) | SAP Help Portal] : [CDS DDL - Annotation - ABAP Keyword Documentation - SAP Online Help] : [Structured Query Language (SQL) | SAP Help Portal] : [CDS DDL - SQL Features - ABAP Keyword Documentation - SAP Online Help] : [Object-Oriented Programming in ABAP | SAP Help Portal]
What are some properties of database tables? Note: There are 2 correct answers to this question.
They store information in two dimensions.
They may have key fields.
They can have any number of key fields.
They can have relationships to other tables.
Database tables are data structures that store information in two dimensions, using rows and columns. Each row represents a record or an entity, and each column represents an attribute or a field. Database tables may have key fields, which are columns that uniquely identify each row or a subset of rows. Key fields can be used to enforce data integrity, perform efficient searches, and establish relationships to other tables. Database tables can have relationships to other tables, which are associations or links between the key fields of two or more tables. Relationships can be used to model the logical connections between different entities, join data from multiple tables, and enforce referential integrity12.
References: 1: Table (database) - Wikipedia 2: Database design basics - Microsoft Support
Which internal table type allows unique and non-unique keys?
Sorted
Hashed
Standard
The internal table type that allows both unique and non-unique keys is the standard table. A standard table has an internal linear index that can be used to access the table entries. The key of a standard table is always non-unique, which means that the table can contain duplicate entries. However, the system does not check the uniqueness of the key when inserting new entries, so the programmer can ensure that the key is unique by using appropriate logic. A standard table can be accessed either by using the table index or the key, but the response time for key access is proportional to the table size.
The other two internal table types, sorted and hashed, do not allow non-unique keys. A sorted table is filled in sorted order according to the defined table key, which must be unique. A sorted table can be accessed either by using the table index or the key, but the response time for key access is logarithmically proportional to the table size. A hashed table can only be accessed by using a unique key, which must be specified when declaring the table. A hashed table has no index, and the response time for key access is constant, regardless of the table size.
References: Internal Tables - ABAP Keyword Documentation, SAP ABAP: Types Of Internal Table Declaration - dan852.com
You have a superclass superl and a subclass subl of superl. Each class has an instance constructor and a static constructor. The first statement of your program creates an instance of subl. In which sequence will the constructors be executed?
The sequence in which the constructors will be executed is as follows:
References: Constructors of Classes - ABAP Keyword Documentation, METHODS - constructor - ABAP Keyword Documentation
In class ZCL_CLASS_A, you use the statement DATA var TYPE ***
What may stand in place of ***? Note: There are 2 correct answers to this question.
The name of a type defined privately in class ZCL_CLASS_A
The name of a data element from the ABAP Dictionary
The name of a type defined privately in another class
The name of a domain from the ABAP Dictionary
In class ZCL_CLASS_A, you use the statement DATA var TYPE *** to declare a data object named var with a data type specified by ***. The data type can be any of the following1:
Therefore, the possible values for *** are B. the name of a data element from the ABAP Dictionary and D. the name of a domain from the ABAP Dictionary. The other options are not valid because:
References: 1: DATA - ABAP Keyword Documentation 2: Data Elements - ABAP Dictionary - SAP Online Help 3: Domains - ABAP Dictionary - SAP Online Help 4: Global Types - ABAP Keyword Documentation 5: Local Types - ABAP Keyword Documentation : Private Types - ABAP Keyword Documentation
In which products must you use the ABAP Cloud Development Model? Note: There are 2 correct answers to this question.
SAP S/4HANA Cloud, private edition
SAP BTP, ABAP environment
SAP S/4HANA on premise
SAP S/4HANA Cloud, public edition
The ABAP Cloud Development Model is the ABAP development model to build cloud-ready business apps, services, and extensions. It comes with SAP BTP and SAP S/4HANA. It works with public or private cloud, and even on-premise1. However, the complete ABAP Cloud Development Model, including the cloud-optimized ABAP language and public local SAP APIs and extension points, is available only in SAP BTP ABAP Environment and in the 2208/2022 versions of the SAP S/4HANA editions1. Therefore, you must use the ABAP Cloud Development Model in SAP BTP, ABAP environment and SAP S/4HANA Cloud, private edition. You can also use it in SAP S/4HANA on premise, but it is not mandatory. You cannot use it in SAP S/4HANA Cloud, public edition, because it does not allow custom ABAP code2. References: 1: ABAP Cloud | SAP Blogs 2: SAP S/4HANA Cloud Extensibility – Overview and Comparison | SAP Blogs
What are valid statements? Note: There are 2 correct answers to this question.
##NEEDED is checked by the syntax checker.
The pragma is not checked by the syntax checker.
#EC_NEEDED is not checked by the syntax checker.
The pseudo-comment is checked by the syntax checker
Both statements are valid in ABAP, but they have different effects on the program.
You cannot do any of the following:
References: 1: Pragmas - ABAP Keyword Documentation - SAP Online Help 2: [What are pragmas and pseudo comments in ABAP? | SAP Blogs - SAP Community] 3: ABAP Keyword Documentation - SAP Online Help 4: What are PRAGMAS and Pseudo comments in SAP ABAP
In what order are objects created to generate a RESTful Application Programming application?
Database table 1
Service binding Projection view 4
Service definition 3
Data model view 2
D A B C
B D C A
A D C B
The order in which objects are created to generate a RESTful Application Programming application is A, D, C, B. This means that the following steps are followed:
References: CDS Data Model Views - ABAP Keyword Documentation, CDS Service Definitions - ABAP Keyword Documentation, CDS Service Bindings - ABAP Keyword Documentation, CDS Projection Views - ABAP Keyword Documentation
After you created a database table in the RESTful Application Programming model, what do you create next?
A metadata extension
A projection view
A data model view
A service definition
After you created a database table in the RESTful Application Programming model (RAP), the next step is to create a projection view on the database table. A projection view is a CDS artefact that defines a view on one or more data sources, such as tables, views, or associations. A projection view can select, rename, or aggregate the fields of the data sources, but it cannot change the properties of the fields, such as whether they are read-only or not. The properties of the fields are inherited from the data sources or the behaviour definitions of the business objects12. For example:
define view ZI_AGENCY as select from /dmo/agency { key agency_id, agency_name, street, city, region, postal_code, country, phone_number, url }
The projection view is used to expose the data of the database table to the service definition, which is the next step in the RAP. The service definition is a CDS artefact that defines the interface and the binding of a service. A service is a CDS entity that exposes the data and the functionality of one or more business objects as OData, InA, or SQL services. A service definition can specify the properties of the fields of a service, such as whether they are filterable, sortable, or aggregatable12. For example:
define service ZI_AGENCY_SRV { expose ZI_AGENCY as Agency; }
You cannot do any of the following:
References: 1: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Service Definitions - ABAP Keyword Documentation - SAP Online Help
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.
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
Which of the following ON conditions must you insert in place of "???"?
ON Z_Sourcel.camer_id = 7_Source2 carrier_id
ON Sprojection Camer=Source2 carrier_id
ON Sprojection. Carrier Source2.carrier
ON Sprojection.carrier_id=Z_Source2.carrier_id
The correct ON condition that must be inserted in place of “???” is:
ON Sprojection.carrier_id=Z_Source2.carrier_id
This ON condition specifies the join condition between the CDS view Sprojection and the database table Z_Source2. The join condition is based on the field carrier_id, which is the primary key of both the CDS view and the database table. The ON condition ensures that only the records that have the same value for the carrier_id field are joined together1.
The other options are not valid ON conditions, because:
References: 1: ON Condition - ABAP Keyword Documentation
Setting a field to read-only in which object would make the field read-only in all applications of the RESTful Application Programming model?
Service definition
Behaviour definition
Projection view
Metadata extension
The object that can be used to set a field to read-only in all applications of the RESTful Application Programming model (RAP) is the behaviour definition. The behaviour definition is a CDS artefact that defines the business logic and the UI behaviour of a business object. A business object is a CDS entity that represents a business entity or concept, such as a customer, an order, or a product. The behaviour definition can specify the properties of the fields of a business object, such as whether they are mandatory, read-only, or transient. These properties are valid for all applications that use the business object, such as transactional, analytical, or draft-enabled apps12. For example:
define behavior for ZI_PB_APPLICATION { field ( read only ) APPLICATION; … }
You cannot do any of the following:
References: 1: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Behavior Definitions - ABAP Keyword Documentation - SAP Online Help
What RESTful Application Programming feature is used to ensure the uniqueness of a semantic key?
Validation
Action
Determination
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:
References: Behavior Implementation - ABAP Keyword Documentation, Behavior Definition - ABAP Keyword Documentation
When accessing the subclass instance through go_super, what can you do? Note: There are 2 correct answers to this question.
Access the inherited private components.
Access the inherited public components.
Call a subclass specific public method
Call inherited public redefined methods.
When accessing the subclass instance through go_super, you can do both of the following:
You cannot do any of the following:
References: 1: Object Oriented - ABAP Development - Support Wiki 2: Inheritance and Instantiation - ABAP Keyword Documentation
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
Exhibit:
With Icl_super being superclass for Icl_subl and Icl_sub2 and with methods subl_methl and sub2_methl being subclass-specific methods of Id_subl or Icl_sub2, respectivel. What will happen when executing these casts? Note:
There are 2 correct answers to this question
go subl = CAST # go super), will not work
go_sub2 = CAST # go super), will work. go_subl CAST #go_super), will work
go_sub2 = CAST #(go_super). will not work. ] go sub2->sub2 meth 1(...). will work
go_subl->subl_meth !(...)• w'll work.
The following are the explanations for each statement:
References: NEW - ABAP Keyword Documentation, CAST - ABAP Keyword Documentation, Method Call - ABAP Keyword Documentation
What are some features of a unique secondary key? Note: There are 2 correct answers to this question.
It is created when a table is filled.
It is updated when the modified table is read again.
It is created with the first read access of a table.
It is updated when the table is modified.
A unique secondary key is a type of secondary key that ensures that the key combination of all the rows in a table is unique. A unique secondary key has two purposes: firstly, to speed up access to the table, and secondly, to enforce data integrity1.
You cannot do any of the following:
References: 1: Improving Internal Table Performance Using Secondary Keys - SAP Learning 2: [Secondary Key - ABAP Keyword Documentation - SAP Online Help] 3: [Secondary Table Key - ABAP Keyword Documentation - SAP Online Help]
The class zcl_demo_class is in a software component with the language version set to "Standard ABAP". The function module "ZF11 is in a software component with the language version set to "ABAP Cloud". Both the class and function module are customer created. Regarding line #6, which of the following is a valid statement?
'ZF1' can be called whether it has been released or not for cloud development.
'ZF1' can be called via a wrapper that itself has been released for cloud development.
'ZF1' can be called via a wrapper that itself has not been released for cloud development.
'ZF1' must be released for cloud development to be called.
The function module ZF1 is in a software component with the language version set to “ABAP Cloud”. This means that it follows the ABAP Cloud Development Model, which requires the usage of public SAP APIs and extension points to access SAP functionality and data. These APIs and extension points are released by SAP and documented in the SAP API Business Hub1. Customer-created function modules are not part of the public SAP APIs and are not released for cloud development. Therefore, calling a function module directly from a class with the language version set to “Standard ABAP” is not allowed and will result in a syntax error. However, there is a possible way to call a function module indirectly from a class with the language version set to “Standard ABAP”:
For example, the following code snippet shows how to create a wrapper class for the function module ZF1 and call it from the class zcl_demo_class:
@EndUserText.label: ‘Wrapper for ZF1’ CLASS zcl_wrapper_zf1 DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. CLASS-METHODS: call_zf1 IMPORTING iv_a TYPE i iv_b TYPE i EXPORTING ev_result TYPE i. ENDCLASS.
CLASS zcl_wrapper_zf1 IMPLEMENTATION. METHOD call_zf1. CALL FUNCTION ‘ZF1’ EXPORTING a = iv_a b = iv_b IMPORTING result = ev_result. ENDMETHOD. ENDCLASS.
CLASS zcl_demo_class DEFINITION. METHODS: m1. ENDCLASS.
CLASS zcl_demo_class IMPLEMENTATION. METHOD m1. DATA(lv_result) = zcl_wrapper_zf1=>call_zf1( iv_a = 2 iv_b = 3 ). WRITE: / lv_result. ENDMETHOD. ENDCLASS.
The output of this code is:
5
References: 1: SAP API Business Hub 2: Creating an ABAP Cloud Project | SAP Help Portal
What are valid statements? Note: There are 3 correct answers to this question
In class CL1, the interface method is named if-ml.
Class CL2 uses the interface.
Class CL1 uses the interface.
In class CL2, the interface method is named ifl-ml.
Class CL1 implements the interface.
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
Copyright © 2014-2024 Certensure. All Rights Reserved