[2025年04月18日]C_ABAPD_2309日本語試験問題集でリアル試験と100%同じ問題と解答 [Q41-Q62]

Share

[2025年04月18日]C_ABAPD_2309日本語試験問題集でリアル試験と100%同じ問題と解答

C_ABAPD_2309日本語テストエンジン問題集トレーニングには83問あります

質問 # 41
この注釈の効果は何ですか? 注: この質問には 2 つの正解があります。

  • A. パラメータに独自の値を渡すことはできなくなりました。
  • B. ABAP で -1 CDS ビューを使用する場合と、別の CDS ビュー エンティティ (ビュー上) で使用する場合の両方で、sy-langu の値が CDS ビューに自動的に渡されます。
  • C. デフォルト値を独自の値で上書きすることもできます。
  • D. sy-langu の値は、ABAP で CDS ビューを使用する場合は CDS ビューに自動的に渡されますが、別のビュー エンティティで使用する場合は渡されません。

正解:B、C

解説:
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:
* 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 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:
* 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 References: 1: ABAP CDS - parameter_annot - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - session_variable - ABAP Keyword Documentation - SAP Online Help


質問 # 42
ABAP SQL フィールド リスト内の特定の文字列値「mr joe doe」を「JOE」に変更する正しい式は何でしょうか?

  • A. テーブル dbtabl フィールドから選択
    1、
    左(下(部分文字列( 'mr joe doe', 4, 3)), 3) AS f2_left_lo_sub, f3,
  • B. テーブル dbtabl フィールドから選択
    1、
    部分文字列(下位(上位( 'ジョー・ドウさん' ) ), 4, 3) AS f2_sub_lo_up, f3,
  • C. テーブル dbtabl フィールドから選択
    1、
    部分文字列(upper('mr joe doe'), 4, 3) AS f2_sub_up, f3,...
  • D. テーブル dbtabl フィールドから選択
    1、
    上(左( 'ジョー・ドウさん', 6)) AS f2_up_left, f3,

正解:C

解説:
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:
* upper: This function converts all lowercase characters in a string to uppercase. For example, upper('mr joe doe') returns 'MR JOE DOE'.
* substring: This function returns a substring of a given string starting from a specified position and with a specified length. For example, substring('MR JOE DOE', 4, 3) returns 'JOE'.
* AS: This keyword assigns an alias or a temporary name to a field or an expression in the field list. For example, AS f2_sub_up assigns the name f2_sub_up to the expression substring(upper('mr joe doe'), 4,
3).
You cannot do any of the following:
* A. SELECT FROM TABLE dbtabl FIELDS Of1, upper(left( 'mr joe doe', 6)) AS f2_up_left, f3,...:
This expression uses the wrong SQL function for strings to get the desired result. The left function returns the leftmost characters of a string with a specified length, ignoring the trailing blanks. For example, left( 'mr joe doe', 6) returns 'mr joe'. Applying the upper function to this result returns 'MR JOE', which is not the same as 'JOE'.
* B. SELECT FROM TABLE dbtabl FIELDS Of1, left(lower(substring( 'mr joe doe', 4, 3)), 3) AS f2_left_lo_sub, f3,...: This expression uses unnecessary and incorrect SQL functions for strings to get the desired result. The lower function converts all uppercase characters in a string to lowercase. For example, lower(substring( 'mr joe doe', 4, 3)) returns 'joe'. Applying the left function to this result with the same length returns 'joe' again, which is not the same as 'JOE'.
* D. SELECT FROM TABLE dbtabl FIELDS Of1, substring(lower(upper( 'mr joe doe' ) ), 4, 3) AS f2_sub_lo_up, f3,...: This expression uses unnecessary and incorrect SQL functions for strings to get the desired result. The lower function converts all uppercase characters in a string to lowercase, and the upper function converts all lowercase characters in a string to uppercase. Applying both functions to the same string cancels out the effect of each other and returns the original string. For example, lower(upper( 'mr joe doe' ) ) returns 'mr joe doe'. Applying the substring function to this result returns
'joe', which is not the same as 'JOE'.
References: 1: SQL Functions for Strings - ABAP Keyword Documentation - SAP Online Help 2: sql_func - String Functions - ABAP Keyword Documentation - SAP Online Help


質問 # 43
次のどれが汎用的な内部テーブル タイプですか?

  • A. ハッシュテーブル
  • B. ソートされたテーブル
  • C. インデックステーブル
  • D. 標準テーブル

正解:C

解説:
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:
* You have selected Index Table or Not Specified as the access type.
* You have not specified a table key or specified an incomplete table key.
* You have specified a generic secondary table key.
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:
* A. SORTED TABLE is a table type that specifies the access type as sorted and the table key as a unique or non-unique primary key3.
* C. STANDARD TABLE is a table type that specifies the access type as standard and the table key as a non-unique standard key that consists of all the fields of the table row in the order in which they are defined4.
* D. HASHED TABLE is a table type that specifies the access type as hashed and the table key as a unique primary key5.
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


質問 # 44
/DMO/I_Connection は CDS ビューです。
次のコードに基づくと、接続が完全である変数タイプは何ですか? DATA 接続が完全である TYPE
/DMD/I_接続。

  • A. 単純な変数
  • B. 内部テーブル
  • C. 構造

正解:C

解説:
Based on the following code, the variable type of connection_full is a structure. A structure is a complex data type that consists of a group of related data objects, called components, that have their own data types and names. A structure can be defined using the TYPES statement or based on an existing structure type, such as a CDS view entity or a CDS DDIC-based view. In this case, the variable connection_full is declared using the TYPE addition, which means that it has the same structure type as the CDS view entity /DMO/I_Connection.
The CDS view entity /DMO/I_Connection is a data model view that defines a data model based on the database table /DMO/Connection. The CDS view entity /DMO/I_Connection has the following components:
carrid, connid, airpfrom, airpto, distance, and fltime. Therefore, the variable connection_full has the same components as the CDS view entity /DMO/I_Connection, and each component has the same data type and length as the corresponding field in the database table /DMO/Connection.
References: CDS Data Model Views - ABAP Keyword Documentation, DATA - ABAP Keyword Documentation, Structure Types - ABAP Keyword Documentation


質問 # 45
有効なステートメントは何ですか? 注: この質問には 2 つの正解があります。

  • A. #EC_NEEDED は構文チェッカーによってチェックされません。
  • B. ##NEEDED は構文チェッカーによってチェックされます。
  • C. 疑似コメントは構文チェッカーによってチェックされます
  • D. プラグマは構文チェッカーによってチェックされません。

正解:B、D

解説:
Both statements are valid in ABAP, but they have different effects on the program.
* ##NEEDED is a pragma that can be used to hide warnings from the ABAP compiler syntax check. It tells the check tools that a variable or a parameter is needed for further processing, even if it is not used in the current statement. For example, if you declare a variable without assigning any value to it, you can use ##NEEDED to suppress the warning about unused variables12.
* The pragma is not checked by the syntax checker means that you can use any pragma to hide any warning from the ABAP compiler syntax check, regardless of its effect on the program logic or performance. For example, if you use ##SHADOW to hide a warning about an obscured function, you can also use it to hide a warning about an invalid character in a string12.
You cannot do any of the following:
* #EC_NEEDED is not checked by the syntax checker: This is not a valid statement in ABAP. There is no pseudo-comment with #EC_NEEDED in ABAP3.
* The pseudo-comment is checked by the syntax checker: This is false. Pseudo-comments are obsolete and should no longer be used in ABAP. They were replaced by pragmas since SAP NW 7.0 EhP2 (Enhancement Package)4.
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


質問 # 46
「???」の代わりに次のどの ON 条件を挿入する必要がありますか?

  • A. ON Z_Sourcel.camer_id = 7_Source2 carrier_id
  • B. ON Sprojection. Carrier Source2.carrier
  • C. ON Sprojection Camer=Source2 carrier_id
  • D. ON Sprojection.carrier_id=Z_Source2.carrier_id

正解:D

解説:
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:
* A. ON Z_Sourcel.camer_id = 7_Source2 carrier_id is not valid because Z_Sourcel and 7_Source2 are not valid data sources in the given code. There is no CDS view or database table named Z_Sourcel or
* 7_Source2. The correct names are Z_Source1 and Z_Source2. Moreover, the field camer_id is not a valid field in the given code. There is no field named camer_id in any of the data sources. The correct name is carrier_id.
* B. ON Sprojection Camer=Source2 carrier_id is not valid because Sprojection and Source2 are not valid data sources in the given code. There is no CDS view or database table named Sprojection or Source2.
The correct names are Sprojection and Z_Source2. Moreover, the field Camer is not a valid field in the given code. There is no field named Camer in any of the data sources. The correct name is carrier_id. Furthermore, the ON condition is missing the dot (.) operator between the data source name and the field name, which is required to access the fields of the data source1.
* C. ON Sprojection. Carrier Source2.carrier is not valid because Carrier and carrier are not valid fields in the given code. There is no field named Carrier or carrier in any of the data sources. The correct name is carrier_id. Moreover, the ON condition is missing the dot (.) operator between the data source name and the field name, which is required to access the fields of the data source1.
References: 1: ON Condition - ABAP Keyword Documentation


質問 # 47
Core Data Services の機能は次のどれですか? 注: この質問には 3 つの正解があります。

  • A. 関連付け
  • B. 注釈
  • C. 委任
  • D. 構造化クエリ言語 (SQL)
  • E. 継承

正解:A、B、D

解説:
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:
* Associations: Associations are a way of defining relationships between CDS entities, such as tables or views. Associations enable navigation and path expressions in CDS queries, which allow accessing data from related entities without explicit joins. Associations also support cardinality, referential constraints, and cascading options34.
* Annotations: Annotations are a way of adding metadata to CDS entities or their elements, such as fields or parameters. Annotations provide additional information or instructions for the CDS compiler, the database, or the consumers of the CDS views. Annotations can be used for various purposes, such as defining access control, UI rendering, OData exposure, or search capabilities5 .
* Structured Query Language (SQL): SQL is the standard language for querying and manipulating data in relational databases. CDS is based on SQL and extends it with additional features and syntax. CDS supports SQL features such as joins, aggregations, filters, expressions, functions, and subqueries. CDS also supports SQL Script, which is a scripting language for stored procedures and functions in SAP HANA .
You cannot do any of the following:
* Inheritance: Inheritance is not a feature of CDS. Inheritance is a concept in object-oriented programming that allows a class to inherit the properties and methods of another class. CDS does not support object-oriented programming or classes.
* Delegation: Delegation is not a feature of CDS. Delegation is a concept in object-oriented programming that allows an object to delegate some of its responsibilities to another object. CDS does not support object-oriented programming or objects.
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]


質問 # 48
SAP Fiori アプリの既存の UI を強化するために、SAP が推奨する拡張性タイプはどれですか?

  • A. 並べて表示
  • B. クラシック
  • C. 開発者
  • D. キーユーザー

正解:C

解説:
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


質問 # 49
ABAP SQL を使用して、行番号 17 の mat フィールドを選択するのはどの SELECT ステートメントですか?

  • A. Material から mat を選択...
  • B. demo_sales_so_i から mat を選択...
  • C. demo_sales_cds_so_i_ve から mat を選択...
  • D. デモ販売 CD マテリアル ve から mat を選択...

正解:C

解説:
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:
* A. SELECT mat FROM Material... is not valid because Material is not a valid data source in the given code. There is no CDS view or database table named Material.
* C. SELECT mat FROM demo_sales_so_i... is not valid because demo_sales_so_i is not a valid data source in the given code. There is no CDS view named demo_sales_so_i, only a database table. To access a database table, the keyword TABLE must be used, such as SELECT mat FROM TABLE demo_sales_so_i...
* D. SELECT mat FROM demo sales cds material ve... is not valid because demo sales cds material ve is not a valid data source in the given code. There is no CDS view or database table named demo sales cds material ve. The correct name of the CDS view is demo_sales_cds_material_ve, with underscores instead of spaces.
References: 1: Projection Views - ABAP Keyword Documentation


質問 # 50
SAP S/4HANA Cloud プライベート エディション テナントに次のコードがあるとします。

クラス zcl_demo_class は、言語バージョンが「ABAP Cloud」に設定されたソフトウェア コンポーネント内にあります。 ファンクション モジュール ZF1' は、言語バージョンが「Standard ABAP」に設定された別のソフトウェア コンポーネント内にあります。
クラスと関数モジュールは両方とも顧客が作成します。
6 行目に関して、次の記述のうち有効なものはどれですか? 注: この質問には 2 つの正解があります。

  • A. ZF1" は、ラッパーが作成されているが、ラッパー自体がクラウド開発用にリリースされていない場合に呼び出すことができます。
  • B. 'ZF1' は、ラッパーが作成され、ラッパー自体がクラウド開発用にリリースされている場合に呼び出すことができます。
  • C. 「ZF1」はクラウド開発用にリリースされているかどうかに関係なく呼び出すことができます
  • D. ZF1' は、クラウド開発用にリリースされている場合にのみ呼び出すことができます。

正解:B、D

解説:
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:
* Create a wrapper class or interface for the function module and release it for cloud development. A wrapper is a class or interface that encapsulates the function module and exposes its functionality through public methods or attributes. The wrapper must be created in a software component with the language version set to "Standard ABAP" and must be marked as released for cloud development using the annotation @EndUserText.label. The wrapper can then be called from an ABAP Cloud class using the public methods or attributes2.
* Use the ABAP Cloud Connector to call the function module as a remote function call (RFC) from an ABAP Cloud class. The ABAP Cloud Connector is a service that enables the secure and reliable communication between SAP BTP, ABAP environment and on-premise systems. The function module must be exposed as an RFC-enabled function module in the on-premise system and must be registered in the ABAP Cloud Connector. The ABAP Cloud class can then use the class cl_rfc_destination_service to get the destination name and the class cl_abap_system to create a proxy object for the function module. The proxy object can then be used to call the function module3.
References: 1: SAP API Business Hub 2: Creating an ABAP Cloud Project | SAP Help Portal 3: Calling Remote Function Modules | SAP Help Portal


質問 # 51
DO...ENDDO ステートメントを使用してループを処理する場合、暗黙的なループ カウンターが含まれるシステム変数は何ですか?

  • A. およびインデックス
  • B. sy-linno
  • C. and-subrc
  • D. sy-labix

正解:A

解説:
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


質問 # 52
次のどれがこの質問に対する回答の一部ですか。

  • A. セマンティックテーブル属性
  • B. パーティション属性
  • C. フィールドリスト
  • D. 拡張子

正解:C、D

解説:
A CDS view is a data definition that defines a data structure and a data selection from one or more data sources. A CDS view consists of several parts, but two of them are:
* Extension: An extension is an optional clause that allows a CDS view to extend another CDS view by adding new elements, annotations, or associations. The extension clause has the syntax EXTEND VIEW view_name WITH view_name. The first view_name is the name of the CDS view that is being extended, and the second view_name is the name of the CDS view that is doing the extension1.
* Field list: A field list is a mandatory clause that specifies the elements of the CDS view. The field list has the syntax SELECT FROM data_source { element_list }. The data_source is the name of the data
* source that the CDS view selects data from, and the element_list is a comma-separated list of elements that the CDS view exposes. The elements can be fields of the data source, expressions, associations, or annotations2.
The following example shows a CDS view that extends another CDS view and defines a field list:
@AbapCatalog.sqlViewName: 'ZCDS_EXT' define view Z_CDS_Extension extend view Z_CDS_Base with Z_CDS_Extension as select from ztable { // field list key ztable.id as ID, ztable.name as Name, ztable.age as Age, // extension @Semantics.currencyCode: true ztable.currency as Currency } The other options are not parts of a CDS view, but rather related concepts:
* Partitioning attributes: Partitioning attributes are attributes that are used to partition a table into smaller subsets of data. Partitioning attributes are defined in the ABAP Dictionary for transparent tables and can improve the performance and scalability of data access. Partitioning attributes are not part of the CDS view definition, but rather the underlying table definition3.
* Semantic table attributes: Semantic table attributes are attributes that provide additional information about the meaning and usage of a table. Semantic table attributes are defined in the ABAP Dictionary for transparent tables and can be used to enhance the data modeling and consumption of the table. Semantic table attributes are not part of the CDS view definition, but rather the underlying table definition4.
References: 1: Extending CDS Views | SAP Help Portal 2: SELECT List - ABAP Keyword Documentation 3:
Partitioning Attributes - ABAP Keyword Documentation 4: Semantic Table Attributes - ABAP Keyword Documentation


質問 # 53
2 つの内部テーブル itab1 と itab2 があります。式 itab1 = 対応する #( itab2 ) を使用する場合、正しいのはどれですか? 注: この質問には 2 つの正解があります。

  • A. 同じ名前と同じタイプのフィールドが itab2 から itab1 にコピーされます。
  • B. 同じ名前だが型が異なるフィールドを itab2 から itab1 にコピーできます。
  • C. itab1 と itab2 には少なくとも 1 つの共通フィールド名が必要です。
  • D. itab1 と itab2 は同じデータ型である必要があります。

正解:A、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:
* B: itab1 and itab2 must have at least one field name in common. This is because the component operator CORRESPONDING assigns the identically named columns of itab2 to the identically named columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for internal tables. If itab1 and itab2 do not have any field name in common, the expression will not assign any value to itab1 and it will remain initial or unchanged1
* C: Fields with the same name and the same type will be copied from itab2 to itab1. This is because the component operator CORRESPONDING assigns the identically named columns of itab2 to the identically named columns of itab1 by default, according to the rules of MOVE-CORRESPONDING for
* internal tables. If the columns have the same name but different types, the assignment will try to perform a conversion between the types, which may result in a loss of precision, a truncation, or a runtime error, depending on the types involved1 The following statements are false for using this expression:
* A: Fields with the same name but with different types may be copied from itab2 to itab1. This is not true, as explained in statement C. The assignment will try to perform a conversion between the types, which may result in a loss of precision, a truncation, or a runtime error, depending on the types involved1
* D: itab1 and itab2 must have the same data type. This is not true, as the component operator CORRESPONDING can assign the contents of an internal table of one type to another internal table of a different type, as long as they have at least one field name in common. The target type of the expression is determined by the left-hand side of the assignment, which is itab1 in this case. The expression will create an internal table of the same type as itab1 and assign it to itab11 References: CORRESPONDING - Component Operator - ABAP Keyword Documentation


質問 # 54
次の Core Data Service ビュー エンティティ データ定義があるとします。
1 @AccessControl.authorizationCheck: #NOT_REQUIRED
2 DEFINE VIEW ENTITY demo_flight_info_join
3 AS SELECT
4 FROM scarr AS a
5 LEFT OUTER JOIN scounter AS c
6 LEFT OUTER JOIN sairport AS p
7 ON p.id = c.airport
8 ON a.carrid = c.carrid
9 {
10 a.carridAS carrier_id,
11 p.idAS airport_id,
12 c.countnumAS counter_number
13 }
結合ステートメントはどのような順序で実行されますか?

  • A. sairport は最初に scounter に結合され、その結果が scarr に結合されます。
  • B. 最初に scarr が sairport と結合され、その結果が scounter と結合されます。
  • C. 最初に scounter が sairport に結合され、その結果が scarr に結合されます。
  • D. 最初に scarr が scounter と結合され、その結果が sairport と結合されます。

正解:D

解説:
The order in which the join statements will be executed is:
scarr will be joined with scounter first and the result will be joined with sairport.
This is because the join statements are nested from left to right, meaning that the leftmost data source is joined with the next data source, and the result is joined with the next data source, and so on. The join condition for each pair of data sources is specified by the ON clause that follows the data source name. The join type for each pair of data sources is specified by the join operator that precedes the data source name. In this case, the join operator is LEFT OUTER JOIN, which means that all the rows from the left data source are included in the result, and only the matching rows from the right data source are included. If there is no matching row from the right data source, the corresponding fields are filled with initial values1.
Therefore, the join statements will be executed as follows:
* First, scarr AS a will be joined with scounter AS c using the join condition a.carrid = c.carrid. This means that all the rows from scarr will be included in the result, and only the rows from scounter that have the same value for the carrid field will be included. If there is no matching row from scounter, the countnum field will be filled with an initial value.
* Second, the result of the first join will be joined with sairport AS p using the join condition p.id = c.airport. This means that all the rows from the first join will be included in the result, and only the rows from sairport that have the same value for the id field as the airport field from the first join will be included. If there is no matching row from sairport, the id field will be filled with an initial value.
References: 1: Join - ABAP Keyword Documentation


質問 # 55

有効なステートメントは何ですか? 注: この質問には 2 つの正解があります。

  • A. 「previous」は前の例外への参照を期待します
  • B. コードは例外オブジェクトを作成し、例外を発生させます。
  • C. 「paraml11」と「param2」は定義済みの名前です。
  • D. 「zcxl」は辞書構造であり、「paraml」と「param2」はこの構造です。

正解:A、B

解説:
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:
* The code creates an exception object and raises an exception: This is true. The RAISE EXCEPTION statement raises the exception linked to the exception class zcxl and generates a corresponding exception object. The exception object contains the information about the exception, such as the message, the source position, and the previous exception12.
* "previous" expects the reference to a previous exception: This is true. The previous parameter is a predefined parameter of the instance constructor of the exception class cx_root, which is the root class of all class-based exceptions. The previous parameter expects the reference to a previous exception object that was caught during exception handling. The previous parameter can be used to chain multiple exceptions and preserve the original cause of the exception12.
You cannot do any of the following:
* "zcxl" is a dictionary structure, and "paraml" and "param2" are this structure: This is false. zcxl is not a dictionary structure, but a user-defined exception class that inherits from the predefined exception class cx_static_check. param1 and param2 are not components of this structure, but input parameters of the instance constructor of the exception class zcxl. The input parameters can be used to pass additional information to the exception object, such as the values that caused the exception12.
* "paraml" and "param2" are predefined names: This is false. param1 and param2 are not predefined names, but user-defined names that can be chosen arbitrarily. However, they must match the names of the input parameters of the instance constructor of the exception class zcxl. The names of the input parameters can be declared in the interface of the exception class using the RAISING addition12.
References: 1: RAISE EXCEPTION - ABAP Keyword Documentation - SAP Online Help 2: Class-Based Exceptions - ABAP Keyword Documentation - SAP Online Help


質問 # 56
データベース ビューに添付されるデータ定義の簡単な説明を開発者に提供したいのですが、次の注釈のどれを行 #27 に挿入すると、この説明が実現しますか。

  • A. @EndUserText.quickInfo
  • B. @UI.バッジ.タイトル.ラベル
  • C. @EndUserText ラベル
  • D. @UI ヘッダーを説明ラベルに挿入

正解:C

解説:
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:
* 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:
* @UI.headerInfo.description.label: This annotation is used to specify a text label for the description field of the header information of a UI element. This annotation is not relevant for the data definition of a database view12.
* @UI.badge.title.label: This annotation is used to specify a text label for the title field of a badge UI element. This annotation is not relevant for the data definition of a database view12.
* @EndUserText.quickInfo: This annotation is used to specify a quick information text for the data definition that can be displayed as a tooltip in the development tools or in the documentation. This annotation is not the same as a short description or a label for the data definition12.
References: 1: ABAP CDS - SAP Annotations - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help


質問 # 57
セマンティック キーの一意性を保証するために使用される RESTful アプリケーション プログラミング機能は何ですか?

  • A. アクション
  • B. 決意
  • C. 検証

正解:B

解説:
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 References: Behavior Implementation - ABAP Keyword Documentation, Behavior Definition - ABAP Keyword Documentation


質問 # 58
アクセス制御オブジェクトでは、どの句が使用されますか? 注: この質問には 3 つの正解があります。

  • A. Crant (データソースを識別するため)
  • B. 取り消し(データソースへのアクセスを削除する)
  • C. 戻りコード(権限チェックの戻りコードを割り当てる)
  • D. ロールを定義する(ロール名を指定する)
  • E. 場所(アクセス条件を指定する)

正解:B、D、E

解説:
An Access Control Object (ACO) is a CDS annotation that defines the access control rules for a CDS view entity. An ACO consists of one or more clauses that specify the role name, the data source, the access conditions, and the return code of the authority check12. Some of the clauses that are used in an ACO are:
* Where (to specify the access conditions): This clause is used to define the logical expression that determines whether a user has access to the data source or not. The expression can use the fields of the data source, the parameters of the CDS view entity, or the predefined variables $user and $session. The expression can also use the functions check_authorization and check_role to perform additional authority checks12.
* Define role (to specify the role name): This clause is used to assign a name to the role that is defined by the ACO. The role name must be unique within the namespace of the CDS view entity and must not contain any special characters. The role name can be used to reference the ACO in other annotations, such as @AccessControl.authorizationCheck or @AccessControl.grant12.
* Revoke (to remove access to the data source): This clause is used to explicitly deny access to the data source for a user who meets the conditions of the where clause. The revoke clause overrides any grant clause that might grant access to the same user. The revoke clause can be used to implement the principle of least privilege or to enforce data segregation12.
You cannot do any of the following:
* Grant (to identify the data source): This is not a valid clause in an ACO. The grant clause is a separate annotation that is used to grant access to a CDS view entity or a data source for a user who has a specific role. The grant clause can reference an ACO by its role name to apply the access conditions defined by the ACO12.
* Return code (to assign the return code of the authority check): This is not a valid clause in an ACO. The return code of the authority check is a predefined variable that is set by the system after performing the access control check. The return code can be used in the where clause of the ACO to specify different access conditions based on the outcome of the check12.
References: 1: Access Control Objects - ABAP Keyword Documentation - SAP Online Help 2: Access Control in Core Data Services (CDS) | SAP Help Portal


質問 # 59
内部テーブル行アクセスにフィールド シンボルを使用する利点は何ですか? 注: この質問に対する回答があります。

  • A. フィールド シンボルを使用する方が、作業領域を使用するよりも高速です。
  • B. フィールド シンボルは他のプログラムで再利用できます。
  • C. 変更された内容をテーブルに書き戻すための MODIFY ステートメントは必要ありません。
  • D. 行の内容は作業領域ではなくフィールドシンボルにコピーされます

正解:A、C

解説:
A field symbol is a pointer that allows direct access to a row of an internal table without copying it to a work area. Using a field symbol for internal table row access has some advantages over using a work area, such as12:
* A MODIFY statement to write changed contents back to the table is not required: This is true. When you use a work area, you have to copy the row content from the internal table to the work area, modify it, and then copy it back to the internal table using the MODIFY statement. This can be costly in terms of performance and memory consumption. When you use a field symbol, you can modify the row content directly in the internal table without any copying. Therefore, you do not need the MODIFY statement12.
* Using a field symbol is faster than using a work area: This is true. As explained above, using a field
* symbol avoids the overhead of copying data between the internal table and the work area. This can improve the performance of the loop considerably, especially for large internal tables. According to some benchmarks, using a field symbol can save 25-40% of the runtime compared to using a work area12.
You cannot do any of the following:
* The field symbol can be reused for other programs: This is false. A field symbol is a local variable that is only visible within the scope of its declaration. It cannot be reused for other programs unless it is declared globally or passed as a parameter. Moreover, a field symbol must have the same type as the line type of the internal table that it accesses. Therefore, it cannot be used for any internal table with a different line type12.
* The row content is copied to the field symbol instead to a work area: This is false. As explained above, using a field symbol does not copy the row content to the field symbol. Instead, the field symbol points to the memory address of the row in the internal table and allows direct access to it. Therefore, there is no copying involved when using a field symbol12.
References: 1: Using Field Symbols to Process Internal Tables - SAP Learning 2: Access to Internal Tables - ABAP Keyword Documentation - SAP Online Help


質問 # 60
次のどれが新しいデータベース テーブルの定義の一部ですか?注: この質問には 2 つの正解があります。

  • A. パーティション属性
  • B. フィールドリスト
  • C. セマンティックテーブル属性
  • D. 拡張子

正解:B、C


質問 # 61
内部テーブルに対して有効なソート操作は次のどれですか? 注: この質問には 3 つの正解があります。

  • A. itab をフィールド 1 昇順、フィールド 2 降順でソートします。
    標準テーブルをソートするには
  • B. 標準テーブルをソートする
    itab を昇順にソートします。
    ソートされたテーブルをソートする
  • C. itab をフィールド1、フィールド2でソートします。
    標準テーブルをソートするには
  • D. itab を降順でソートします。
  • E. itab をソートします。
    ソートされたテーブルをソートする

正解:B、C、E


質問 # 62
......

C_ABAPD_2309日本語練習テストPDF試験材料:https://www.passtest.jp/SAP/C_ABAPD_2309-JPN-shiken.html