リアルSAP C_ABAPD_2309日本語試験問題集には正解83問題と解答があります
有効なC_ABAPD_2309日本語テスト解答とSAP C_ABAPD_2309日本語試験PDF問題を試そう
質問 # 13
有効なステートメントは何ですか? 注: この質問には 2 つの正解があります。
- A. #EC_NEEDED は構文チェッカーによってチェックされません。
- B. ##NEEDED は構文チェッカーによってチェックされます。
- C. プラグマは構文チェッカーによってチェックされません。
- D. 疑似コメントは構文チェッカーによってチェックされます
正解:B、C
解説:
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
質問 # 14
クラス zcl_demo_class は、言語バージョンが「標準 ABAP」に設定されたソフトウェア コンポーネント内にあります。 機能モジュール「ZF11」は、言語バージョンが「ABAP Cloud」に設定されたソフトウェア コンポーネント内にあります。 クラスと機能モジュールは両方とも顧客が作成したものです。 行番号 6 に関して、次のどれが有効な記述ですか?
- A. クラウド開発を呼び出すには、「ZF1」をリリースする必要があります。
- B. クラウド開発用にリリースされているかどうかに関係なく、「ZF1」を呼び出すことができます。
- C. 'ZF1' は、クラウド開発用にリリースされていないラッパーを介して呼び出すことができます。
- D. 'ZF1' は、クラウド開発用にリリースされたラッパーを介して呼び出すことができます。
正解:D
解説:
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":
* 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 "ABAP Cloud" and must be marked as released for cloud development using the annotation @EndUserText.label. The wrapper can then be called from a class with the language version set to "Standard ABAP" using the public methods or attributes2.
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
質問 # 15 
行番号 4 で参照されている「demo_ods_assoc_spfi」データ ソースには、要素リストに公開するフィールド「connid」が含まれています。
次のステートメントのうち、行番号 8 に挿入すると、これが実行されますか?
- A. spfli-connid,
- B. _spfli.connid/
- C. demo_ods_assoc_spfli-connid/
- D. demo_ods_assoc_spfli.connid,
正解:D
解説:
The statement that can be used to expose the field "connid" of the data source "demo_ods_assoc_spfli" in the element list is A. demo_ods_assoc_spfli.connid,. This statement uses the dot notation to access the field
"connid" of the data source "demo_ods_assoc_spfli", which is an association defined on line #4. The association "demo_ods_assoc_spfli" links the data source "demo_ods" with the table "spfli" using the field
"carrid". The statement also ends with a comma to separate it from the next element in the list12.
You cannot do any of the following:
* B. demo_ods_assoc_spfli-connid/: This statement uses the wrong syntax to access the field "connid" of the data source "demo_ods_assoc_spfli". The dash notation is used to access the components of a structure or a table, not the fields of a data source. The statement also ends with a slash, which is not a valid separator for the element list12.
* C. spfli-connid,: This statement uses the wrong data source name to access the field "connid". The data source name should be "demo_ods_assoc_spfli", not "spfli". The statement also uses the wrong syntax to access the field "connid", as explained above12.
* D. _spfli.connid/: This statement uses the wrong data source name and the wrong separator to access the field "connid". The data source name should be "demo_ods_assoc_spfli", not "_spfli". The statement also ends with a slash, which is not a valid separator for the element list12.
References: 1: ABAP CDS - SELECT, select_list - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - SELECT, from - ABAP Keyword Documentation - SAP Online Help
質問 # 16
プログラムではこのソースコードが見つかります
権限チェックオブジェクト '/DWO/TRVL ( ID 'CNTRY' フィールド 'DE*
ID ACTVT フィールド '03"。
次のどれが当てはまりますか? 注: この質問には 2 つの正解があります。
- A. ユーザーが 'CNTRY' = 'DE' または 'ACTVT' = '03 に対して権限を持っていない場合、プログラムは終了します。
- B. ユーザーが 'CNTRY = 'DE' および 'ACTVT = '03 に対して承認されている場合、戻りコードは 0 になります。
- C. AUTHORITY CHECK は、リストされたフィールド値を使用して、ユーザーが「/DMO/TRVL」に対して承認されているかどうかを確認します。
- D. ユーザーが 'CNTRY = 'DE' に対して承認されている場合、戻りコードは常に 0 になります。
正解:B、C
質問 # 17 
go_super を介してサブクラスのインスタンスにアクセスする場合、何ができますか? 注: この質問には 2 つの正解があります。
- A. サブクラス固有のパブリックメソッドを呼び出す
- B. 継承されたパブリックの再定義されたメソッドを呼び出します。
- C. 継承されたプライベート コンポーネントにアクセスします。
- D. 継承されたパブリック コンポーネントにアクセスします。
正解:C、D
解説:
When accessing the subclass instance through go_super, you can do both of the following:
* Access the inherited private components: A subclass inherits all the private attributes and methods of its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the inherited private components of the superclass through go_super, as long as they are not hidden by other attributes or methods in the subclass12.
* Access the inherited public components: A subclass inherits all the public attributes and methods of its superclass, unless they are explicitly overridden by the subclass. Therefore, you can access the inherited public components of the superclass through go_super, as long as they are not hidden by other attributes or methods in the subclass12.
You cannot do any of the following:
* Call a subclass specific public method: A subclass does not have any public methods that are not inherited from its superclass. Therefore, you cannot call a subclass specific public method through go_super12.
* Call inherited public redefined methods: A subclass does not have any public methods that are redefined from its superclass. Therefore, you cannot call inherited public redefined methods through go_super12.
References: 1: Object Oriented - ABAP Development - Support Wiki 2: Inheritance and Instantiation - ABAP Keyword Documentation
質問 # 18
内部テーブルへのアクセスが高速になるのは次のうちどれですか? 注: この質問には 3 つの正解があります。
- A. ハッシュされた内部テーブルで、主キーを完全に指定します。
- B. ソートされた内部テーブルで、主キーを左から隙間なく部分的に指定します。
- C. 標準の内部テーブルで、主キーを左から隙間なく部分的に指定します。
- D. ハッシュされた内部テーブルで、主キーを左から隙間なく部分的に指定します。
- E. ソートされた内部テーブルで、主キーを完全に指定します。
正解:A、D、E
解説:
The access to internal tables can be optimized by using the appropriate table type and specifying the table key.
The table key is a set of fields that uniquely identifies a row in the table and determines the sorting order of the table. The table key can be either the primary key or a secondary key. The primary key is defined by the table type and the table definition, while the secondary key is defined by the user using the KEY statement1.
The following results in faster access to internal tables:
* B. In a sorted internal table, specifying the primary key completely. A sorted internal table is a table type that maintains a predefined sorting order, which is defined by the primary key in the table definition. The primary key can be either unique or non-unique. A sorted internal table can be accessed using the primary key or the table index. The access using the primary key is faster than the access using the table index, because the system can use a binary search algorithm to find the row. However, the primary key must be specified completely, meaning that all the fields of the primary key must be given in the correct order and without gaps2.
* D. In a hashed internal table, specifying the primary key partially from the left without gaps. A hashed internal table is a table type that does not have a predefined sorting order, but uses a hash algorithm to store and access the rows. The primary key of a hashed internal table must be unique and cannot be changed. A hashed internal table can only be accessed using the primary key, not the table index. The access using the primary key is very fast, because the system can directly calculate the position of the row using the hash algorithm. The primary key can be specified partially from the left without gaps, meaning that some of the fields of the primary key can be omitted, as long as they are the rightmost fields and there are no gaps between the specified fields.
* E. In a hashed internal table, specifying the primary key completely. A hashed internal table is a table type that does not have a predefined sorting order, but uses a hash algorithm to store and access the rows. The primary key of a hashed internal table must be unique and cannot be changed. A hashed internal table can only be accessed using the primary key, not the table index. The access using the primary key is very fast, because the system can directly calculate the position of the row using the hash algorithm. The primary key can be specified completely, meaning that all the fields of the primary key must be given in the correct order.
The following do not result in faster access to internal tables, because:
* A. In a sorted internal table, specifying the primary key partially from the left without gaps. A sorted internal table is a table type that maintains a predefined sorting order, which is defined by the primary key in the table definition. The primary key can be either unique or non-unique. A sorted internal table can be accessed using the primary key or the table index. The access using the primary key is faster than the access using the table index, because the system can use a binary search algorithm to find the row.
However, the primary key must be specified completely, meaning that all the fields of the primary key must be given in the correct order and without gaps. If the primary key is specified partially from the left without gaps, the system cannot use the binary search algorithm and has to perform a linear search, which is slower2.
* C. In a standard internal table, specifying the primary key partially from the left without gaps. A standard internal table is a table type that does not have a predefined sorting order, but uses a sequential storage and access of the rows. The primary key of a standard internal table is the standard key, which consists of all the fields of the table row in the order in which they are defined. A standard internal table can be accessed using the primary key or the table index. The access using the primary key is slower than the access using the table index, because the system has to perform a linear search to find the row.
The primary key can be specified partially from the left without gaps, but this does not improve the access speed, because the system still has to perform a linear search.
References: 1: Internal Tables - Overview - ABAP Keyword Documentation 2: Sorted Tables - ABAP Keyword Documentation : Hashed Tables - ABAP Keyword Documentation : Standard Tables - ABAP Keyword Documentation
質問 # 19
ABAP ディクショナリ内の 2 つのテーブル間の外部キー関係の目的は何ですか?
- A. データベース内に対応する外部キー関係を作成する
- B. 2つのテーブル間の関係を文書化する
- C. 対応するデータベーステーブル内のデータの整合性を確保するため
正解:C
解説:
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
質問 # 20
展示する:
次の記述のうち正しいものはどれですか? 注: この質問には 2 つの正解があります。
- A. FORはsource_itabの内容を実行するループを定義します。
- B. 行は定義済みの名前であり、任意に選択することはできません。
- C. source_itab はループ内でのみ表示されます。
- D. 行はループ内でのみ表示されます。
正解:A、D
解説:
The code snippet in the image is an example of using the FOR statement to create an internal table with a constructor expression. The FOR statement introduces an iteration expression that runs over the content of source_itab and assigns each row to the variable row. The variable row is then used to populate the fields of target_itab12. Some of the correct statements about the code snippet are:
* FOR defines a loop that runs over the content of source_itab: This is true. The FOR statement iterates over the rows of source_itab and assigns each row to the variable row. The iteration expression can also specify a range or a condition for the loop12.
* row is only visible within the loop: This is true. The variable row is a local variable that is only visible within the scope of the iteration expression. It cannot be accessed outside the loop12.
You cannot do any of the following:
* source_itab is only visible within the loop: This is false. The variable source_itab is not a local variable that is defined by the FOR statement. It is an existing internal table that is used as the data source for the iteration expression. It can be accessed outside the loop12.
* row is a predefined name and cannot be chosen arbitrarily: This is false. The variable row is not a
* predefined name that is reserved by the FOR statement. It is a user-defined name that can be chosen arbitrarily. However, it must not conflict with any existing names in the program12.
References: 1: FOR - Iteration Expressions - ABAP Keyword Documentation - SAP Online Help 2: ABAP 7.4 Syntax - FOR Loop iteration | SAP Community
質問 # 21
RESTful アプリケーション プログラミング アプリケーションを生成するためにオブジェクトはどのような順序で作成されますか?
- A. ダブリュービーシー
- B. データモデルビュー 2
- C. サービスバインディング投影ビュー 4
- D. ADCB
- E. サービス定義3
- F. BDCA
- G. データベーステーブル1
- H. CBAB
正解:E
解説:
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:
* First, a database table is created to store the data for the application. A database table is a CDS DDIC-based view that defines a join or union of database tables. A database table has an SQL view attached and can be accessed by Open SQL or native SQL.
* Second, a data model view is created to define a data model based on the database table or other CDS view entities. A data model view is a CDS view entity that can have associations, aggregations, filters, parameters, and annotations. A data model view can also define the behavior definition and implementation for the business object.
* Third, a service definition is created to define the service interface for the application. A service definition is a CDS view entity that defines a projection on a data model view or another service definition. A service definition can also define service metadata, such as service name, version, description, and annotations.
* Fourth, a service binding is created to define the service binding for the application. A service binding is a CDS view entity that defines a projection on a service definition. A service binding can also define the service protocol, such as OData V2, OData V4, or REST, and the service URL.
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
質問 # 22
次のどれがこの質問に対する回答の一部ですか。
- A. 拡張子
- B. パーティション属性
- C. フィールドリスト
- D. セマンティックテーブル属性
正解:A、C
解説:
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
質問 # 23
RESTful アプリケーション プログラミング アプリケーションでは、どのオブジェクトに CDS ビューをバインドして値のヘルプを作成しますか? 注: この質問には 3 つの正解があります。
- A. データモデルビュー
- B. 投影ビュー
- C. サービス定義
- D. 動作定義
- E. メタデータ拡張
正解:A、B、E
解説:
In a RESTful Application Programming (RAP) application, you can bind a CDS view to create a value help in the following objects:
* Data model view: A data model view is a CDS view that defines the data structure and the associations of an entity in the RAP application. You can use the annotation @Consumption.valueHelpDefinition to bind a value help provider CDS view to an element of the data model view. The value help provider CDS view must contain the key fields of the value help entity and the fields that are displayed in the value help dialog. The value help annotation specifies the entity name, the element name, and optionally the additional binding conditions for the value help provider1.
* Metadata Extension: A metadata extension is a CDS view that extends the metadata of another CDS view without changing its data structure. You can use the annotation @MetadataExtension.extendView to specify the target CDS view that you want to extend. You can then use the same annotation
@Consumption.valueHelpDefinition to bind a value help provider CDS view to an element of the target CDS view. The metadata extension allows you to add value help definitions to existing CDS views without modifying them2.
* Projection View: A projection view is a CDS view that defines the projection of another CDS view. You can use the annotation @AbapCatalog.sqlViewType: #PROJECTION to specify that the CDS view is a projection view. You can then use the same annotation @Consumption.valueHelpDefinition to bind a value help provider CDS view to an element of the projection view. The projection view allows you to add value help definitions to projected elements of another CDS view3.
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
質問 # 24
次のどれが汎用的な内部テーブル タイプですか?
- 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
質問 # 25
ABAP SQL フィールド リスト内の特定の文字列値「mr joe doe」を「JOE」に変更する正しい式は何でしょうか?
- A. テーブル dbtabl フィールドから選択
1、
上(左( 'ジョー・ドウさん', 6)) AS f2_up_left, f3, - B. テーブル dbtabl フィールドから選択
1、
左(下(部分文字列( 'mr joe doe', 4, 3)), 3) AS f2_left_lo_sub, f3, - C. テーブル dbtabl フィールドから選択
1、
部分文字列(下位(上位( 'ジョー・ドウさん' ) ), 4, 3) AS f2_sub_lo_up, f3, - D. テーブル dbtabl フィールドから選択
1、
部分文字列(upper('mr joe doe'), 4, 3) AS f2_sub_up, f3,...
正解:D
解説:
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
質問 # 26
どのオブジェクトのフィールドを読み取り専用に設定すると、RESTful アプリケーション プログラミング モデルのすべてのアプリケーションでフィールドが読み取り専用になりますか?
- A. メタデータ拡張
- B. サービス定義
- C. 動作定義
- D. 投影ビュー
正解:C
解説:
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:
* The following code snippet defines a behaviour definition for a business object ZI_PB_APPLICATION.
It sets the field APPLICATION to read-only for all applications that use this business object:
define behavior for ZI_PB_APPLICATION { field ( read only ) APPLICATION; ... } You cannot do any of the following:
* A. Service definition: A 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 aggregatable. However, these properties are only valid for the specific service that uses the business object, not for all applications that use the business object12.
* C. Projection view: 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.
* D. Metadata extension: A metadata extension is a CDS artefact that defines additional annotations for a CDS entity, such as a business object, a service, or a projection view. A metadata extension can specify the properties of the fields of a CDS entity for UI or analytical purposes, such as whether they are visible, editable, or hidden. However, these properties are only valid for the specific UI or analytical application that uses the metadata extension, not for all applications that use the CDS entity12.
References: 1: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Behavior Definitions - ABAP Keyword Documentation - SAP Online Help
質問 # 27
入力パラメータを使用して次の CDS ビュー エンティティを定義します。
ビュー エンティティ Z_CONVERT をパラメータ currency を使用して定義します: ???
「????」の代わりに使用できるのは次のうちどれですか? 注: この質問には 2 つの正解があります。
- A. 組み込みのABAPディクショナリ型
- B. データ要素
- C. ABAPディクショナリ構造のコンポーネント
- D. 組み込みABAP型
正解:B、D
解説:
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
質問 # 28
この注釈の効果は何ですか? 注: この質問には 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
質問 # 29
一意のキーと一意でないキーを許可する内部テーブル タイプはどれですか?
- A. ソート済み
- B. ハッシュ化
- C. 標準
正解:C
解説:
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
質問 # 30
次のアクションのうち、テーブル変換を必要とするデータベース テーブルへの間接的な変更を引き起こすものはどれですか? 注:
この質問には正解が2つあります。
- A. テーブル定義に含まれる構造からフィールドを削除します。
- B. テーブル定義で使用されるデータ要素で使用されるドメインの長さを短縮します。
- C. テーブル定義で使用されるデータ要素のフィールド ラベルを変更します。
- D. テーブル定義に含まれる構造内のフィールドの名前を変更する
正解:A、D
解説:
The following are the explanations for each action:
* A: Renaming a field in a structure that is included in the table definition causes an indirect change to the database table, as the field name in the table is derived from the structure. This change requires a table conversion, as the existing data in the table must be copied to a new table with the new field name, and the old table must be deleted.
* B: Changing the field labels of a data element that is used in the table definition does not cause an indirect change to the database table, as the field labels are only used for documentation and display purposes. This change does not require a table conversion, as the existing data in the table is not affected by the change.
* C: Deleting a field from a structure that is included in the table definition causes an indirect change to the database table, as the field is removed from the table as well. This change requires a table conversion, as the existing data in the table must be copied to a new table without the deleted field, and the old table must be deleted.
* D: Shortening the length of a domain used in a data element that is used in the table definition causes an indirect change to the database table, as the field length in the table is derived from the domain. This change requires a table conversion, as the existing data in the table must be checked for compatibility with the new field length, and any data that exceeds the new length must be truncated or rejected.
References: Converting Database Tables - ABAP Keyword Documentation, Adjustment of Database Structures - ABAP Keyword Documentation
質問 # 31
データベース ビューに添付されるデータ定義の簡単な説明を開発者に提供したいのですが、次の注釈のどれを行 #27 に挿入すると、この説明が実現しますか。
- A. @UI ヘッダーを説明ラベルに挿入
- B. @EndUserText.quickInfo
- C. @UI.バッジ.タイトル.ラベル
- D. @EndUserText ラベル
正解:D
解説:
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
質問 # 32
RESTful アプリケーション プログラミングでは、どの EML ステートメントがオブジェクトを取得しますか?
- A. エンティティを選択
- B. エンティティの読み取り
- C. エンティティを取得
- D. エンティティを検索
正解:C
解説:
In RESTful Application Programming, the EML statement that retrieves an object is GET entity. The GET entity statement is used to read data of an entity instance from the database or the transaction buffer. The GET entity statement can specify the entity name, the entity key, and the entity elements to be retrieved. The GET entity statement can also use the IN LOCAL MODE addition to bypass the access control, authorization control, and feature control checks. The GET entity statement returns a single entity instance or raises an exception if no instance is found or multiple instances match the key.
The other EML statements are not used to retrieve an object, but have different purposes and effects. These statements are:
* FIND entity: This statement is used to search for entity instances that match a given condition. The FIND entity statement can specify the entity name, the entity elements to be returned, and the condition to be applied. The FIND entity statement can also use the IN LOCAL MODE addition to bypass the access control, authorization control, and feature control checks. The FIND entity statement returns a table of entity instances or an empty table if no instances match the condition.
* SELECT entity: This statement is used to query data of entity instances from the database or the transaction buffer. The SELECT entity statement can specify the entity name, the entity elements to be returned, and the filter, order, and aggregation options to be applied. The SELECT entity statement can also use the IN LOCAL MODE addition to bypass the access control, authorization control, and feature control checks. The SELECT entity statement returns a table of entity instances or an empty table if no instances match the query.
* READ entity: This statement is not a valid EML statement, but an ABAP statement. The READ statement is used to access a single row of an internal table using the table index or the table key. The READ statement can also use the TRANSPORTING addition to specify which fields should be returned, and the INTO addition to specify the target variable. The READ statement returns a single row of the internal table or raises an exception if no row is found or multiple rows match the key.
References: GET ENTITY - ABAP Keyword Documentation, FIND ENTITY, ENTITIES - ABAP Keyword Documentation, SELECT ENTITY, ENTITIES - ABAP Keyword Documentation, READ - ABAP Keyword Documentation
質問 # 33
......
C_ABAPD_2309日本語試験問題と有効なC_ABAPD_2309日本語問題集でPDF:https://www.passtest.jp/SAP/C_ABAPD_2309-JPN-shiken.html