[2025年07月21日] 最新のC_ABAPD_2309日本語試験の的確なSAP Certified Associate - Back-End Developer - ABAP Cloud (C_ABAPD_2309日本語版)のPDF問題
C_ABAPD_2309日本語試験問題を練習するならFast2test顕著なSAP Certified Associate - Back-End Developer - ABAP Cloud (C_ABAPD_2309日本語版)試験練習問題集
質問 # 14 
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
質問 # 15
RESTful アプリケーション プログラミング モデルでデータベース テーブルを作成した後、次に何を作成しますか?
- A. 投影ビュー
- B. データモデルビュー
- C. サービス定義
- D. メタデータ拡張
正解:A
解説:
After you created a database table in the RESTful Application Programming model (RAP), the next step is to create a projection view on the database table. A projection view is a CDS artefact that defines a view on one or more data sources, such as tables, views, or associations. A projection view can select, rename, or aggregate the fields of the data sources, but it cannot change the properties of the fields, such as whether they are read-only or not. The properties of the fields are inherited from the data sources or the behaviour definitions of the business objects12. For example:
* The following code snippet defines a projection view ZI_AGENCY on the database table /DMO
/AGENCY:
define view ZI_AGENCY as select from /dmo/agency { key agency_id, agency_name, street, city, region, postal_code, country, phone_number, url } The projection view is used to expose the data of the database table to the service definition, which is the next step in the RAP. The service definition is a CDS artefact that defines the interface and the binding of a service. A service is a CDS entity that exposes the data and the functionality of one or more business objects as OData, InA, or SQL services. A service definition can specify the properties of the fields of a service, such as whether they are filterable, sortable, or aggregatable12. For example:
* The following code snippet defines a service definition ZI_AGENCY_SRV that exposes the projection view ZI_AGENCY as an OData service:
define service ZI_AGENCY_SRV { expose ZI_AGENCY as Agency; }
You cannot do any of the following:
* A. A 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, a metadata extension is not the next step after creating a database table in the RAP, as it is not required to expose the data of the database table to the service definition. A metadata extension can be created later to customize the UI or analytical application that uses the service12.
* C. A data model view: A data model view is a CDS artefact that defines a view on one or more data sources, such as tables, views, or associations. A data model view can select, rename, or aggregate the fields of the data sources, and it can also change the properties of the fields, such as whether they are read-only or not. The properties of the fields are defined by the annotations or the behaviour definitions of the data model view. A data model view is used to define the data model of a business object, which is a CDS entity that represents a business entity or concept, such as a customer, an order, or a product.
However, a data model view is not the next step after creating a database table in the RAP, as it is not required to expose the data of the database table to the service definition. A data model view can be created later to define a business object that uses the database table as a data source12.
* D. 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, a service definition is not the next step after creating a database table in the RAP, as it requires a projection view or a data model view to expose the data of the database table. A service definition can be created after creating a projection view or a data model view on the database table12.
References: 1: ABAP CDS - Data Definitions - ABAP Keyword Documentation - SAP Online Help 2: ABAP CDS - Service Definitions - ABAP Keyword Documentation - SAP Online Help
質問 # 16
2 つの内部テーブル itab1 と itab2 があります。式 itab1 = 対応する #( itab2 ) を使用する場合、正しいのはどれですか? 注: この質問には 2 つの正解があります。
- A. itab1 と itab2 は同じデータ型である必要があります。
- B. itab1 と itab2 には少なくとも 1 つの共通フィールド名が必要です。
- C. 同じ名前だが型が異なるフィールドを itab2 から itab1 にコピーできます。
- D. 同じ名前と同じタイプのフィールドが itab2 から itab1 にコピーされます。
正解:B、D
解説:
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
質問 # 17
アクセス制御オブジェクトでは、どの句が使用されますか? 注: この質問には 3 つの正解があります。
- A. Crant (データソースを識別するため)
- B. ロールを定義する(ロール名を指定する)
- C. 場所(アクセス条件を指定する)
- D. 取り消し(データソースへのアクセスを削除する)
- E. 戻りコード(権限チェックの戻りコードを割り当てる)
正解:B、C、D
解説:
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
質問 # 18
データベース ビューに添付されるデータ定義の簡単な説明を開発者に提供したいのですが、次の注釈のどれを行 #27 に挿入すると、この説明が実現しますか。
- A. @EndUserText ラベル
- B. @UI.バッジ.タイトル.ラベル
- C. @UI ヘッダーを説明ラベルに挿入
- D. @EndUserText.quickInfo
正解:A
解説:
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
質問 # 19
画像:
次の ABAP SQL コードでは、有効な大文字と小文字の区別は何ですか? 注: この質問には 2 つの正解があります。
- A.

- B.

- C.

正解:B、C
質問 # 20 
行番号 4 の <source> に使用できるのは次のどのタイプですか? 注: この質問には 2 つの正解があります。
- A. CDS DDICベースのビュー
- B. ABAPディクショナリからのデータベーステーブル
- C. ABAPディクショナリからの外部ビュー
- D. ABAPディクショナリからのデータベースビュー
正解:A、B
解説:
The <source> clause in the CDS View Entity Data Definition can be used to specify the data source for the view entity. The <source> clause can accept different types of data sources, depending on the type of the view entity1.
* A database table from the ABAP Dictionary: This is a valid type of data source for a CDS View Entity Data Definition. A database table from the ABAP Dictionary is a table that is defined in the ABAP Dictionary using the keyword TABLE or TABLE OF. The name of the database table must be unique within its namespace and must not contain any special characters2.
* A CDS DDIC-based view: This is also a valid type of data source for a CDS View Entity Data Definition. A CDS DDIC-based view is a view that is defined in the Core Data Services using the keyword DEFINE VIEW ENTITY. The name of the CDS DDIC-based view must be unique within its namespace and must not contain any special characters3.
You cannot do any of the following:
* An external view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. An external view from the ABAP Dictionary is a view that is defined in an external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the external view must be unique within its namespace and must not contain any special characters4.
* A database view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. A database view from the ABAP Dictionary is a view that is defined in an external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the database view must be unique within its namespace and must not contain any special characters4.
References: 1: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 2:
ABAP Dictionary Tables - SAP Online Help 3: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 4: ABAP Dictionary Views - SAP Online Help
質問 # 21
展示する:
有効なステートメントは何ですか? 注: この質問には 3 つの正解があります。
- A. go_call = NEW #() の代わりに go_iff - NEW #(...) を使用できます。
- B. go_ifl は go if->m2(...) でメソッド m2 を呼び出す場合があります。
- C. go_cll は go_dl->ifl-ml() でメソッド ml を呼び出す場合があります。
- D. go_if 1 は go_ift->ml() でメソッド ml を呼び出す場合があります。
- E. go call = NEW #(...) の代わりに go ifl = NEW cll(. ...) を使用できます。
正解:B、D、E
解説:
The following are the explanations for each statement:
* A: This statement is valid. go_ifl may call method ml with go_ifl->ml(). This is because go_ifl is a data object of type REF TO ifl, which is a reference to the interface ifl. The interface ifl defines a method ml, which can be called using the reference variable go_ifl. The class cll implements the interface ifl, which means that it provides an implementation of the method ml. The data object go_ifl is assigned to a new instance of the class cll using the NEW operator and the inline declaration operator
@DATA. Therefore, when go_ifl->ml() is called, the implementation of the method ml in the class cll is executed123
* B: This statement is valid. Instead of go_cll = NEW #(...) you could use go_ifl = NEW cll(...). This is because go_ifl is a data object of type REF TO ifl, which is a reference to the interface ifl. The class cll implements the interface ifl, which means that it is compatible with the interface ifl. Therefore, go_ifl can be assigned to a new instance of the class cll using the NEW operator and the class name cll. The inline declaration operator @DATA is optional in this case, as go_ifl is already declared. The parentheses after the class name cll can be used to pass parameters to the constructor of the class cll, if any123
* E: This statement is valid. go_ifl may call method m2 with go_ifl->m2(...). This is because go_ifl is a data object of type REF TO ifl, which is a reference to the interface ifl. The class cll implements the interface ifl, which means that it inherits all the components of the interface ifl. The class cll also defines a method m2, which is a public method of the class cll. Therefore, go_ifl can call the method m2 using the reference variable go_ifl. The method m2 is not defined in the interface ifl, but it is accessible through the interface ifl, as the interface ifl is implemented by the class cll. The parentheses after the method name m2 can be used to pass parameters to the method m2, if any123 The other statements are not valid, as they have syntax errors or logical errors. These statements are:
* C: This statement is not valid. go_cll may call method ml with go_cll->ifl~ml(). This is because go_cll is a data object of type REF TO cll, which is a reference to the class cll. The class cll implements the interface ifl, which means that it inherits all the components of the interface ifl. The interface ifl defines a method ml, which can be called using the reference variable go_cll. However, the syntax for calling an interface method using a class reference is go_cll->ml(), not go_cll->ifl~ml(). The interface component selector ~ is only used when calling an interface method using an interface reference, such as go_ifl->ifl~ml(). Using the interface component selector ~ with a class reference will cause a syntax error123
* D: This statement is not valid. Instead of go_cll = NEW #() you could use go_ifl = NEW #(...). This is because go_ifl is a data object of type REF TO ifl, which is a reference to the interface ifl. The interface ifl cannot be instantiated, as it does not have an implementation. Therefore, go_ifl cannot be assigned to a new instance of the interface ifl using the NEW operator and the inline declaration operator @DATA.
This will cause a syntax error or a runtime error. To instantiate an interface, you need to use a class that implements the interface, such as the class cll123 References: INTERFACES - ABAP Keyword Documentation, CLASS - ABAP Keyword Documentation, NEW - ABAP Keyword Documentation
質問 # 22 
行番号 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/
正解:C
解説:
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
質問 # 23
定義をアクティブ化しようとすると、どのような応答が返されますか?
- A. ユニオンのフィールド型が一致しないため、アクティベーション エラーが発生します
- B. ユニオンのフィールド名が一致しないため、アクティベーション エラーが発生します
- C. ユニオンのキーフィールドが一致しないため、アクティベーションエラーが発生しました
- D. アクティベーション成功
正解:B
解説:
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
質問 # 24
LOOP AT itab... ENDLOOP ステートメントを使用して内部テーブルを処理する場合、現在の行番号はどのシステム変数に格納されますか?
- A. and-tabix
- B. and-subrc
- C. and-linno
- D. およびインデックス
正解:A
解説:
When processing an internal table with the statement LOOP AT itab... ENDLOOP, the system variable that contains the current row number is sy-tabix. The sy-tabix variable is a predefined field of the system structure sy that holds the index or the row number of the current line in an internal table loop. The sy-tabix variable is initialized with the value 1 for the first loop pass and is incremented by 1 for each subsequent loop pass. The sy-tabix variable can be used to access or modify the current line of the internal table using the index access12.
References: 1: LOOP AT itab - ABAP Keyword Documentation - SAP Online Help 2: System Fields - ABAP Keyword Documentation - SAP Online Help
質問 # 25
展示する
次の ABAP SQL スニペットのうち、行番号 4 のパラメータに値を提供する構文的に正しい方法はどれですか? 注: この質問には 2 つの正解があります。
- A. ... deno_cds_param_view_entity (p_date - '20230101') から * を選択... )
- B. ...demo_cds_param_view エンティティ (p_date: $session.system_date) から * を選択...
- C. ...SELECT * FROM deno_cds_param_view_entity (p_date = @
(cl_abap_context_info->get_system_date())... - D. ...demo_cds_param_view_entity (p_date: 20238181') から * を選択...)
正解:A、C
質問 # 26
次のどれが不完全な ABAP タイプですか? 注: この質問には 2 つの正解があります。
- A. 文字列
- B. T
- C. P
- D. C
正解:C、D
解説:
Incomplete ABAP types are types that do not specify all the attributes of a data type, such as the length, the number of decimal places, or the value range. Incomplete types can only be used for the typing of field symbols and formal parameters, not for the definition of data objects or constants. Incomplete types can be either predefined or user-defined1.
The following are incomplete ABAP types:
* C. C is a type for character strings with a generic length. The length of the character string has to be specified when a data object or a constant is defined with this type. For example, DATA text TYPE c LENGTH 10 defines a data object named text with a type c and a length of 10 characters2.
* D. P is a type for packed numbers with a generic length and a generic number of decimal places. The length and the number of decimal places of the packed number have to be specified when a data object or a constant is defined with this type. For example, DATA amount TYPE p LENGTH 8 DECIMALS 2 defines a data object named amount with a type p, a length of 8 bytes, and 2 decimal places3.
The following are not incomplete ABAP types, because they specify all the attributes of a data type:
* A. String is a type for variable-length character strings. The length of the character string is determined at runtime and can vary from 0 to 2,147,483,647 characters. The length does not have to be specified when a data object or a constant is defined with this type. For example, DATA text TYPE string defines a data object named text with a type string and a variable length4.
* B. T is a type for time values in the format HHMMSS. The length of the time value is fixed at 6 characters and does not have to be specified when a data object or a constant is defined with this type.
For example, DATA time TYPE t defines a data object named time with a type t and a length of 6 characters.
References: 1: Generic ABAP Types - ABAP Keyword Documentation 2: C - ABAP Keyword Documentation 3: P - ABAP Keyword Documentation 4: String - ABAP Keyword Documentation : T - ABAP Keyword Documentation
質問 # 27
データベース テーブルのプロパティにはどのようなものがありますか? 注: この質問には 2 つの正解があります。
- A. キー フィールドは任意の数だけ持つことができます。
- B. キーフィールドを持つ場合があります。
- C. 情報を 2 次元で保存します。
- D. 他のテーブルとの関係を持つことができます。
正解:C、D
解説:
Database tables are data structures that store information in two dimensions, using rows and columns. Each row represents a record or an entity, and each column represents an attribute or a field. Database tables may have key fields, which are columns that uniquely identify each row or a subset of rows. Key fields can be used to enforce data integrity, perform efficient searches, and establish relationships to other tables. Database tables can have relationships to other tables, which are associations or links between the key fields of two or more tables. Relationships can be used to model the logical connections between different entities, join data from multiple tables, and enforce referential integrity12.
References: 1: Table (database) - Wikipedia 2: Database design basics - Microsoft Support
質問 # 28
展示する:
DEFINE TABLE demo_table {
KEY field1 : REFERENCE TO abap.cint(3);
KEY field2 : abap.char(133);
@Semantics.quantity.unitOfMeasure : 'demo_table.field4'
field3 : abap.quan(2);
field4 : abap.unit(2);
}
どのフィールドの定義が間違っていますか?
- A. フィールド4
- B. フィールド1
- C. フィールド2
- D. フィールド3
正解:B
解説:
* Field 1 (field1)
* The syntax REFERENCE TO abap.cint(3) is incorrect for defining a database table field.
Database table fields must be based on valid HANA-compatible data types or ABAP dictionary data types.
* REFERENCE TO is used for object references in ABAP classes and is not valid in this context.
* Therefore, field1 is defined incorrectly, making option C correct.
* Field 2 (field2)
* The data type abap.char(133) is valid for defining a character-based field in a table.
* This field is correctly defined.
* Field 3 (field3)
* The data type abap.quan(2) is valid for defining a quantity field. The @Semantics.quantity.
unitOfMeasure annotation correctly links this field to field4, which is a unit of measure field.
* This field is correctly defined.
* Field 4 (field4)
* The data type abap.unit(2) is valid for defining a unit of measure field.
* This field is correctly defined.
References:
* SAP ABAP Documentation: ABAP Data Types for SAP HANA Tables
* SAP Training for Back-End Developer - ABAP Cloud
質問 # 29
ABAP SQL 算術式にはどのような制限がありますか? 注: この質問には 2 つの正解があります。
- A. 10 進数型と整数型を同じ式で使用することはできません。
- B. 演算子は浮動小数点式でのみ使用できます。
- C. 浮動小数点型と整数型を同じ式で使用することはできません。
- D. 演算子/は浮動小数点式でのみ使用できます。
正解:B、D
解説:
ABAP SQL arithmetic expressions have different restrictions depending on the data type of the operands. The following are some of the restrictions:
* Floating point types and integer types can be used in the same expression, as long as the integer types are cast to floating point types using the cast function. For example, CAST ( num1 AS FLTP ) / CAST ( num2 AS FLTP ) is a valid expression, where num1 and num2 are integer types.
* The operator / is allowed only in floating point expressions, where both operands have the type FLTP or f. For example, num1 / num2 is a valid expression, where num1 and num2 are floating point types. If the operator / is used in an integer expression or a decimal expression, a syntax error occurs.
* Decimal types and integer types can be used in the same expression, as long as the expression is a decimal expression. A decimal expression has at least one operand with the type DEC, CURR, or QUAN or p with decimal places. For example, num1 + num2 is a valid expression, where num1 is a decimal type and num2 is an integer type.
* The operator ** is allowed only in floating point expressions, where both operands have the type FLTP or f. For example, num1 ** num2 is a valid expression, where num1 and num2 are floating point types.
If the operator ** is used in an integer expression or a decimal expression, a syntax error occurs.
References: sql_exp - sql_arith - ABAP Keyword Documentation, SQL Expressions, Arithmetic Calculations
- ABAP Keyword Documentation
質問 # 30
どのパターンで例外が発生しますか? 注: この質問には 3 つの正解があります。
- A. データ: gv_target TYPE p DECIMALS 2. 定数: go intl TYPE i VALUE 3. gv_target -U EXACT (2 gcojntl)。
- B. データ: gv_target 型 文字列。定数: gco_string 型 長さ 16 値
0123456789ABCDEF*. gv_target = EXACT # gco_string+5 (5) ). - C. データ: gv_target タイプ d. s/ 定数: gco_date タイプ d 値 '20331233*. gv_target EXACT ( geo_date).
- D. データ: gv_target 型 c 長さ 5. V 定数: ECO 文字列 型 文字列 値
0123456789ABCDEF"。gv_target - EXACT (gco_string + 5 (6) )。 - E. データ: Ev target TYPE p DECIMALS 3. 定数: gcojntl TYPE i VALUE 2. Ev_target -U EXACT #2 / gcojntl )。
正解:A、C、D
解説:
The patterns that raise an exception are those that use the constructor operator EXACT to perform a lossless assignment or calculation, but the result cannot be converted to the target data type without data loss. The following are the explanations for each pattern:
* A: This pattern raises the exception CX_SY_CONVERSION_LOST because the result of the calculation 2 * 3 is 6, which cannot be assigned to a packed number with two decimal places without losing the integer part. The operator -U is used to perform a lossless calculation with the calculation type decfloat34.
* B: This pattern does not raise an exception because the result of the substring expression gco_string+5(5) is '6789A', which can be assigned to a string without data loss. The operator EXACT # is used to perform a lossless assignment with the data type of the argument.
* C: This pattern raises the exception CX_SY_CONVERSION_LOST because the result of the substring expression gco_string+5(6) is '6789AB', which cannot be assigned to a character field with length 5 without losing the last character. The operator EXACT is used to perform a lossless assignment with the data type of the target field.
* D: This pattern does not raise an exception because the result of the calculation 2 / 2 is 1, which can be assigned to a packed number with three decimal places without data loss. The operator -U is used to perform a lossless calculation with the calculation type decfloat34.
* E: This pattern raises the exception CX_SY_CONVERSION_ERROR because the constant gco_date contains an invalid value '20331233' for a date data type, which cannot be converted to a valid date.
The operator EXACT is used to perform a lossless assignment with the data type of the target field.
References: EXACT - Lossless Operator - ABAP Keyword Documentation, Lossless Assignments - ABAP Keyword Documentation
質問 # 31 
行番号 4 の <source> に使用できるのは次のどのタイプですか? 注: この質問には 2 つの正解があります。
- A. CDS DDICベースのビュー
- B. ABAPディクショナリからのデータベーステーブル
- C. ABAPディクショナリからの外部ビュー
- D. ABAPディクショナリからのデータベースビュー
正解:A、B
解説:
The <source> clause in the CDS View Entity Data Definition can be used to specify the data source for the view entity. The <source> clause can accept different types of data sources, depending on the type of the view entity1.
* A database table from the ABAP Dictionary: This is a valid type of data source for a CDS View Entity Data Definition. A database table from the ABAP Dictionary is a table that is defined in the ABAP Dictionary using the keyword TABLE or TABLE OF. The name of the database table must be unique within its namespace and must not contain any special characters2.
* A CDS DDIC-based view: This is also a valid type of data source for a CDS View Entity Data Definition. A CDS DDIC-based view is a view that is defined in the Core Data Services using the keyword DEFINE VIEW ENTITY. The name of the CDS DDIC-based view must be unique within its namespace and must not contain any special characters3.
You cannot do any of the following:
* An external view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. An external view from the ABAP Dictionary is a view that is defined in an
* external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the external view must be unique within its namespace and must not contain any special characters4.
* A database view from the ABAP Dictionary: This is not a valid type of data source for a CDS View Entity Data Definition. A database view from the ABAP Dictionary is a view that is defined in an external application using any language supported by SAP, such as SQL, PL/SQL, or Java. The name of the database view must be unique within its namespace and must not contain any special characters4.
References: 1: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 2:
ABAP Dictionary Tables - SAP Online Help 3: CDS DDL - DEFINE VIEW ENTITY - ABAP Keyword Documentation - SAP Online Help 4: ABAP Dictionary Views - SAP Online Help
質問 # 32 
どの述語条件で CAST が機能することを保証できますか?
- A. 初期値ではありません
- B. 提供される
- C. インスタンスである
- D. バインドされています
正解:C
解説:
The predicate condition that can be used to ensure that the CAST will work is IS INSTANCE OF. The IS INSTANCE OF predicate condition checks whether the operand is an instance of the specified class or interface. This is useful when you want to perform a downcast, which is a conversion from a more general type to a more specific type. A downcast can fail if the operand is not an instance of the target type, and this can cause a runtime error. Therefore, you can use the IS INSTANCE OF predicate condition to check whether the downcast is possible before using the CAST operator12. For example:
* The following code snippet uses the IS INSTANCE OF predicate condition to check whether the variable g_super is an instance of the class lcl_super. If it is, the CAST will work and the variable g_sub1 will be assigned the value of g_super.
DATA: g_super TYPE REF TO lcl_super, g_sub1 TYPE REF TO lcl_sub1. IF g_super IS INSTANCE OF lcl_super. g_sub1 = CAST #( g_super ). g_sub1->method( ... ). ENDIF.
You cannot do any of the following:
* IS SUPPLIED: The IS SUPPLIED predicate condition checks whether an optional parameter of a method or a function module has been supplied by the caller. This is useful when you want to handle different cases depending on whether the parameter has a value or not. However, this predicate condition has nothing to do with the CAST operator or the type of the operand12.
* IS NOT INITIAL: The IS NOT INITIAL predicate condition checks whether the operand has a non- initial value. This is useful when you want to check whether the operand has been assigned a value or not. However, this predicate condition does not guarantee that the CAST will work, because the operand may have a value but not be an instance of the target type12.
* IS BOUND: The IS BOUND predicate condition checks whether the operand is a bound reference variable. This is useful when you want to check whether the operand points to an existing object or not. However, this predicate condition does not guarantee that the CAST will work, because the operand may point to an object but not be an instance of the target type12.
References: 1: Predicate Expressions - ABAP Keyword Documentation - SAP Online Help 2: ABAP - Predicates | SAP Community
質問 # 33
......
試験問題と解答はC_ABAPD_2309日本語学習ガイド問題解答:https://jp.fast2test.com/C_ABAPD_2309-JPN-premium-file.html