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
Using ABAP SQL, which select statement selects the mat field on line #17?
SELECT mat FROM Material...
SELECT mat FROM demo_sales_cds_so_i_ve...
SELECT mat FROM demo_sales_so_i...
SELECT mat FROM demo sales cds material ve...
Using ABAP SQL, the select statement that selects the mat field on line #17 is:
SELECT mat FROM demo_sales_cds_so_i_ve…
This statement selects the mat field from the CDS view demo_sales_cds_so_i_ve, which is defined on line #1. The CDS view demo_sales_cds_so_i_ve is a projection view that projects the fields of the CDS view demo_sales_cds_so_i, which is defined on line #2. The CDS view demo_sales_cds_so_i is a join view that joins the fields of the database table demo_sales_so_i, which is defined on line #3, and the CDS view demo_sales_cds_material_ve, which is defined on line #4. The CDS view demo_sales_cds_material_ve is a value help view that provides value help for the material field of the database table demo_sales_so_i. The mat field is an alias for the material field of the database table demo_sales_so_i, which is defined on line #91.
The other options are not valid because:
References: 1: Projection Views - 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 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
When processing a loop with the statement DO... ENDDO, what system variable contains the implicit loop counter?
sy-linno
sy-labix
sy-subrc
sy-index
When processing a loop with the statement DO… ENDDO, the system variable that contains the implicit loop counter is sy-index. The loop counter is a numeric value that indicates how many times the loop has been executed. The loop counter is initialized to 1 before the first execution of the loop and is incremented by 1 after each execution. The loop counter can be used to control the number of loop iterations or to access the loop elements by index. The loop counter can also be accessed or modified within the loop body, but this is not recommended as it may cause unexpected results or errors1.
For example, the following code snippet uses the loop counter sy-index to display the numbers from 1 to 10:
DO 10 TIMES. WRITE: / sy-index. ENDDO.
The output of this code is:
1 2 3 4 5 6 7 8 9 10
References: 1: DO - ABAP Keyword Documentation
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.
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
Given the following code in an SAP S/4HANA Cloud private edition tenant:
The class zcl_demo_class is in a software component with the language version set to "ABAP Cloud". The function module ZF1' is in a different software component with the language version set to "Standard ABAP". Both the class and function module are customer created.
Regarding line #6, which of the following are valid statements? Note: There are 2 correct answers to this question.
ZF1' can be called only if it is released for cloud development.
'ZF1' can be called if a wrapper is created for it and the wrapper itself is released for cloud development.
"ZF1" can be called whether it is released or not for cloud development
ZF1" can be called if a wrapper is created for it but the wrapper itself is not released for cloud development.
The ABAP Cloud Development Model requires that only public SAP APIs and extension points are used 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 an ABAP Cloud class is not allowed and will result in a syntax error. However, there are two possible ways to call a function module indirectly from an ABAP Cloud class:
References: 1: SAP API Business Hub 2: Creating an ABAP Cloud Project | SAP Help Portal 3: Calling Remote Function Modules | SAP Help Portal
Exhibit
Which of the following ABAP SQL snippets are syntactically correct ways to provide a value for the parameter on line #4? Note: There are 2 correct answers to this question
...SELECT * FROM deno_cds_param_view_entity (p_date = @ (cl_abap_context_info->get_system_date ())...
...SELECT * FROM deno_cds_param_view_entity (p_date - '20230101')... )
...SELECT * FROM demo_cds_param_view_entity (p_date: 20238181')... )
...SELECT * FROM demo_cds_param_view entity (p_date: $session.system_date)...
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 ABAP SQL clause allows the use of inline declarations?
FROM
INTO CORRESPONDING FIELDS OF
INTO
FIELDS
The ABAP SQL clause that allows the use of inline declarations is the INTO clause. The INTO clause is used to specify the target variable or field symbol where the result of the SQL query is stored. The INTO clause can use inline declarations to declare the target variable or field symbol at the same position where it is used, without using a separate DATA or FIELD-SYMBOLS statement. The inline declaration is performed using the DATA or @DATA operators in the declaration expression12. For example:
SELECT * FROM scarr INTO TABLE @DATA (itab).
SELECT SINGLE * FROM scarr INTO @
You cannot do any of the following:
References: 1: SELECT - ABAP Keyword Documentation - SAP Online Help 2: Inline Declarations - 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
Class super has subclass sub. Which rules are valid for the sub constructor? Note: There are 2 correct answers to this question.
The method signature can be changed.
Import parameters can only be evaluated after calling the constructor of super.
The constructor of super must be called before using any components of your own instance.
Events of your own instance cannot be raised before the registration of a handler in super.
The sub constructor is the instance constructor of the subclass sub that inherits from the superclass super. The sub constructor has some rules that it must follow when it is defined and implemented12. Some of the valid rules are:
You cannot do any of the following:
References: 1: Inheritance and Constructors - ABAP Keyword Documentation - SAP Online Help 2: Using Static and Instance constructor methods | SAP Blogs
What are some of the reasons that Core Data Services are preferable to the classical approach to data modeling? Note: There are 2 correct answers to this question.
They implement code pushdown.
They avoid data transfer completely.
They transfer computational results to the application server.
They compute results on the application server.
Core Data Services (CDS) are preferable to the classical approach to data modeling for several reasons, but two of them are:
References: 1: ABAP - Core Data Services (ABAP CDS) - ABAP Keyword Documentation 2: Open SQL - ABAP Keyword Documentation
In a RESTful Application Programming application, in which objects do you bind a CDS view to create a value help? Note: There are 3 correct answers to this question.
Data model view
Behavior definition
Metadata Extension
Service Definition
Projection View
In a RESTful Application Programming (RAP) application, you can bind a CDS view to create a value help in the following objects:
You cannot bind a value help provider CDS view to a behavior definition or a service definition, because these objects do not define the data structure or the metadata of an entity in the RAP application. A behavior definition defines the behavior and the validation rules of an entity, such as the create, read, update, and delete (CRUD) operations, the draft handling, the authorization checks, and the side effects4. A service definition defines the service exposure and the service binding of an entity, such as the protocol, the version, the namespace, and the service name5.
References: 1: Value Help with Additional Binding | SAP Help Portal 2: Metadata Extensions - ABAP Keyword Documentation 3: Projection Views - ABAP Keyword Documentation 4: Behavior Definition - ABAP Keyword Documentation 5: Service Definition - ABAP Keyword Documentation
when you attempt to activate the definition, what will be the response?
Activation error because the field names of the union do not match
Activation error because the field types of the union do not match
Activation error because the key fields of the union do not match
Activation successful
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.
References: 1: UNION - ABAP Keyword Documentation
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
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:
What is the purpose of a foreign key relationship between two tables in the ABAP Dictionary?
To document the relationship between the two tables
To ensure the integrity of data in the corresponding database tables
To create a corresponding foreign key relationship in the database
The purpose of a foreign key relationship between two tables in the ABAP Dictionary is to ensure the integrity of data in the corresponding database tables. A foreign key relationship defines a logical link between a foreign key table and a check table, where the foreign key fields of the former are assigned to the primary key fields of the latter. This means that the values entered in the foreign key fields must exist in the check table, otherwise the system will reject the entry. This way, the foreign key relationship prevents the insertion of invalid or inconsistent data in the database tables.
A foreign key relationship also serves to document the relationship between the two tables in the ABAP Dictionary, but this is not its primary purpose. A foreign key relationship does not necessarily create a corresponding foreign key relationship in the database, as this depends on the database system and the settings of the ABAP Dictionary. Some database systems do not support foreign keys at all, while others require additional steps to activate them. Therefore, the foreign key relationship in the ABAP Dictionary is mainly a logical concept that is enforced by the ABAP runtime environment.
References: Foreign Keys (SAP Library - ABAP Dictionary), Foreign Keys (SAP Library - BC - ABAP Dictionary)
https://help.sap.com/doc/saphelp_snc70/7.0/en-US/cf/21ea77446011d189700000e8322d00/content.htm
TESTED 09 May 2024
Copyright © 2014-2024 DumpsTool. All Rights Reserved