[2025年03月02日] 心強いC_ABAPD_2309日本語のPDF問題集はC_ABAPD_2309日本語問題 [Q49-Q68]

Share

[2025年03月02日] 心強いC_ABAPD_2309日本語のPDF問題集はC_ABAPD_2309日本語問題

正真正銘のC_ABAPD_2309日本語問題集で無料PDF問題で合格させる

質問 # 49
展示する:

次の記述のうち正しいものはどれですか? 注: この質問には 2 つの正解があります。

  • A. source_itab はループ内でのみ表示されます。
  • B. 行はループ内でのみ表示されます。
  • C. 行は定義済みの名前であり、任意に選択することはできません。
  • D. FORはsource_itabの内容を実行するループを定義します。

正解:B、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


質問 # 50
クラスZCL_CLASS_Aでは、DATA var TYPE ***というステートメントを使用します。
*** の代わりに何が使えるでしょうか? 注: この質問には 2 つの正解があります。

  • A. 別のクラスでプライベートに定義された型の名前
  • B. クラス ZCL_CLASS_A でプライベートに定義された型の名前
  • C. ABAPディクショナリのデータ要素の名前
  • D. ABAPディクショナリからのドメイン名

正解:C、D

解説:
In class ZCL_CLASS_A, you use the statement DATA var TYPE *** to declare a data object named var with a data type specified by ***. The data type can be any of the following1:
* A predefined ABAP type, such as i, f, c, string, xstring, and so on.
* A data element from the ABAP Dictionary, such as matnr, carrid, bukrs, and so on. A data element defines the semantic and technical attributes of a data field, such as the domain, the length, the data type, the description, and the value range2.
* A domain from the ABAP Dictionary, such as matnr_d, carrid_d, bukrs_d, and so on. A domain defines the technical attributes of a data field, such as the data type, the length, the output length, the number of decimal places, and the value range3.
* A type defined globally in a class, an interface, or a type pool, such as zcl_class_b=>type_a, zif_interface_c=>type_b, ztype_pool_d=>type_c, and so on. A global type is a type that is defined in a global repository object and can be used in any program or class4.
* A type defined locally in the current class, such as type_a, type_b, type_c, and so on. A local type is a type that is defined in the declaration part of a class and can only be used within the class5.
Therefore, the possible values for *** are B. the name of a data element from the ABAP Dictionary and D. the name of a domain from the ABAP Dictionary. The other options are not valid because:
* A. The name of a type defined privately in class ZCL_CLASS_A is a local type and cannot be used with the DATA statement. A local type can only be used with the TYPES statement5.
* C. The name of a type defined privately in another class is a private type and cannot be accessed from outside the class. A private type can only be used within the class that defines it.
References: 1: DATA - ABAP Keyword Documentation 2: Data Elements - ABAP Dictionary - SAP Online Help 3: Domains - ABAP Dictionary - SAP Online Help 4: Global Types - ABAP Keyword Documentation 5:
Local Types - ABAP Keyword Documentation : Private Types - ABAP Keyword Documentation


質問 # 51
SAP では、ソートされたテーブルとハッシュされたテーブルをそれぞれいつ使用することを推奨していますか? 注: この質問には 2 つの正解があります。

  • A. 単一のレコードを読み取り、完全なキーを指定する場合のハッシュ テーブル。
  • B. ループでサブセットを読み取り、キーの一部を左から隙間なく指定すると、ソートされたテーブルになります。
  • C. ループでサブセットを読み取り、キーの一部を隙間なく左から指定するハッシュ テーブル。
  • D. 単一のレコードを読み取り、キー以外のフィールドを指定する場合のソートされたテーブル。

正解:A、C


質問 # 52
RESTful アプリケーション プログラミングでは、どの EML ステートメントがオブジェクトを取得しますか?

  • A. エンティティを選択
  • B. エンティティを検索
  • C. エンティティの読み取り
  • D. エンティティを取得

正解:D

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


質問 # 53
展示する:
Icl_super は Icl_subl と Icl_sub2 のスーパークラスであり、メソッド subl_methl と sub2_methl はそれぞれ Id_subl または Icl_sub2 のサブクラス固有のメソッドです。これらのキャストを実行すると何が起こるでしょうか?
注記:
この質問には2つの正解があります

  • A. go_sub2 = CAST #(go_super). は動作しません。] go sub2->sub2 meth 1(...). は動作します
  • B. go_subl->subl_meth !(...)* は動作します。
  • C. go_sub2 = CAST # go super) は動作します。go_subl CAST #go_super) は動作します。
  • D. go subl = CAST # go super) は動作しません

正解:B、D

解説:
The following are the explanations for each statement:
* A: This statement is correct. go_subl = CAST #(go_super) will not work. This is because go_subl is a data object of type REF TO cl_subl, which is a reference to the subclass cl_subl. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_subl, but this is not possible, as go_super is not pointing to an instance of cl_subl, but to an instance of cl_super. Therefore, the CAST operator will raise an exception CX_SY_MOVE_CAST_ERROR at runtime12
* B: This statement is incorrect. go_sub2 = CAST #(go_super) will work. go_subl = CAST #(go_super) will not work. This is because go_sub2 is a data object of type REF TO cl_sub2, which is a reference to the subclass cl_sub2. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of cl_super.
* Therefore, the CAST operator will assign the reference of go_super to go_sub2 without raising an exception. However, the CAST operator will not work for go_subl, as explained in statement A12
* C: This statement is incorrect. go_sub2 = CAST #(go_super) will work. go_sub2->sub2_meth1(...) will not work. This is because go_sub2 is a data object of type REF TO cl_sub2, which is a reference to the subclass cl_sub2. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of cl_super.
Therefore, the CAST operator will assign the reference of go_super to go_sub2 without raising an exception. However, the method call go_sub2->sub2_meth1(...) will not work, as sub2_meth1 is a subclass-specific method of cl_sub2, which is not inherited by cl_super. Therefore, the method call will raise an exception CX_SY_DYN_CALL_ILLEGAL_METHOD at runtime123
* D: This statement is correct. go_subl->subl_meth1(...) will work. This is because go_subl is a data object of type REF TO cl_subl, which is a reference to the subclass cl_subl. subl_meth1 is a subclass-specific method of cl_subl, which is not inherited by cl_super. Therefore, the method call go_subl->subl_meth1(...) will work, as go_subl is pointing to an instance of cl_subl, which has the method subl_meth1123 References: NEW - ABAP Keyword Documentation, CAST - ABAP Keyword Documentation, Method Call - ABAP Keyword Documentation


質問 # 54
スーパークラス superl と、superl のサブクラス subl があります。各クラスには、インスタンス コンストラクターと静的コンストラクターがあります。プログラムの最初のステートメントは、subl のインスタンスを作成します。コンストラクターはどのような順序で実行されますか?

正解:

解説:

Explanation:
The sequence in which the constructors will be executed is as follows:
* Class constructor of superl. This is because the class constructor is a static method that is executed automatically before the class is accessed for the first time. The class constructor is used to initialize the static attributes and components of the class. The class constructor of the superclass is executed before the class constructor of the subclass, as the subclass inherits the static components of the superclass12
* Class constructor of subl. This is because the class constructor is a static method that is executed automatically before the class is accessed for the first time. The class constructor is used to initialize the static attributes and components of the class. The class constructor of the subclass is executed after the class constructor of the superclass, as the subclass inherits the static components of the superclass12
* Instance constructor of superl. This is because the instance constructor is an instance method that is executed automatically when an instance of the class is created using the statement CREATE OBJECT.
The instance constructor is used to initialize the instance attributes and components of the class. The instance constructor of the superclass is executed before the instance constructor of the subclass, as the subclass inherits the instance components of the superclass. The instance constructor of the subclass must call the instance constructor of the superclass explicitly using super->constructor, unless the superclass is the root node object12
* Instance constructor of subl. This is because the instance constructor is an instance method that is executed automatically when an instance of the class is created using the statement CREATE OBJECT.
The instance constructor is used to initialize the instance attributes and components of the class. The instance constructor of the subclass is executed after the instance constructor of the superclass, as the subclass inherits the instance components of the superclass. The instance constructor of the subclass must call the instance constructor of the superclass explicitly using super->constructor, unless the superclass is the root node object12 References: Constructors of Classes - ABAP Keyword Documentation, METHODS - constructor - ABAP Keyword Documentation


質問 # 55
一意のセカンダリ キーの特徴は何ですか? 注: この質問には 2 つの正解があります。

  • A. テーブルがいっぱいになると作成されます。
  • B. テーブルの最初の読み取りアクセスで作成されます。
  • C. 変更されたテーブルが再度読み込まれると更新されます。
  • D. テーブルが変更されると更新されます。

正解:B、D

解説:
A unique secondary key is a type of secondary key that ensures that the key combination of all the rows in a table is unique. A unique secondary key has two purposes: firstly, to speed up access to the table, and secondly, to enforce data integrity1.
* It is created with the first read access of a table: This is true. A unique secondary key is created when an internal table is filled for the first time using the statement READ TABLE or a similar statement. The system assigns a name and an index to each row of the table based on the key fields23.
* It is updated when the modified table is read again: This is false. A unique secondary key does not need to be updated when the internal table content changes, because it already ensures data uniqueness. The system uses a lazy update strategy for non-unique secondary keys, which means that it delays updating them until they are actually accessed23.
You cannot do any of the following:
* It is created when a table is filled: This is false. As explained above, a unique secondary key is created only with the first read access of a table23.
* It is updated when the modified table is read again: This is false. As explained above, a unique secondary key does not need to be updated when the internal table content changes23.
References: 1: Improving Internal Table Performance Using Secondary Keys - SAP Learning 2: [Secondary Key - ABAP Keyword Documentation - SAP Online Help] 3: [Secondary Table Key - ABAP Keyword Documentation - SAP Online Help]


質問 # 56
どのような種類のアプリケーションでオンスタック開発者拡張機能の使用を検討しますか? 注: この質問には 2 つの正解があります。

  • A. SAP S/4HANAとは別に実行されるアプリケーション
  • B. サイドバイサイドSAP BTPアプリ用のAPIを提供するアプリケーション
  • C. 複数の異なるシステムからのデータを統合するアプリケーション
  • D. 複雑なSQLを使用してSAP S/4HANAデータにアクセスするアプリケーション

正解:B、D

解説:
On-stack developer extensibility is a type of extensibility that allows you to create development projects directly on the SAP S/4HANA Cloud technology stack. It gives you the opportunity to develop cloud-ready and upgrade-stable custom ABAP applications and services inside the SAP S/4HANA Cloud, public edition system. You can use the ABAP Development Tools in Eclipse to create and deploy your on-stack extensions.
On-stack developer extensibility is suitable for the following kinds of applications:
* Applications that provide APIs for side by side SAP BTP apps. On-stack developer extensibility allows you to create OData services or RESTful APIs based on CDS view entities or projection views. These services or APIs can expose SAP S/4HANA data and logic to other applications that run on the SAP Business Technology Platform (SAP BTP) or other platforms. This way, you can create a loosely coupled integration between your SAP S/4HANA system and your side by side SAP BTP apps.
* Applications that access SAP S/4HANA data using complex SQL. On-stack developer extensibility allows you to use ABAP SQL to access SAP S/4HANA data using complex queries, such as joins, aggregations, filters, parameters, and code pushdown techniques. You can also use ABAP SQL to perform data manipulation operations, such as insert, update, delete, and upsert. This way, you can create applications that require advanced data processing and analysis on SAP S/4HANA data.
The other kinds of applications are not suitable for on-stack developer extensibility, as they have different requirements and challenges. These kinds of applications are:
* Applications that integrate data from several different systems. On-stack developer extensibility is not meant for creating applications that integrate data from multiple sources, such as other SAP systems, third-party systems, or cloud services. This is because on-stack developer extensibility does not support remote access or data replication, and it may cause performance or security issues. For this kind of applications, you should use side by side extensibility, which allows you to create applications that run on the SAP BTP and communicate with the SAP S/4HANA system via public APIs or events.
* Applications that run separate from SAP S/4HANA. On-stack developer extensibility is not meant for creating applications that run independently from the SAP S/4HANA system, such as standalone apps, microservices, or web apps. This is because on-stack developer extensibility requires a tight coupling with the SAP S/4HANA system, and it may limit the scalability, flexibility, and portability of the applications. For this kind of applications, you should use side by side extensibility, which allows you to create applications that run on the SAP BTP and leverage the cloud-native features and services of the platform.
References: Developer Extensibility in SAP S/4HANA Cloud ABAP Environment, SAP S/4HANA Extensibility - Simplified Guide for Beginners


質問 # 57
次のどれが不完全な ABAP タイプですか? 注: この質問には 2 つの正解があります。

  • A. 文字列
  • B. P
  • C. T
  • D. C

正解:B、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


質問 # 58
どの関数呼び出しが 0 を返しますか?

  • A. Count (val - 'ABAP ABAP abap' sub - 'AB' )
  • B. find_any_of (val = "ABAP ABAP abap' sub = "AB")
  • C. Count_any_of ( val - 'ABAP ABAP abap' sub "AB" )
  • D. find_any_not_of( val 'ABAP ABAP abap' sub = 'AB')

正解:D

解説:
The function find_any_not_of returns the position of the first character in the string val that is not contained in the string sub. If no such character is found, the function returns 0. In this case, the string val contains only the characters A, B, and a, which are all contained in the string sub, so the function returns 0. The other functions return positive values, as follows:
* Count_any_of returns the number of occurrences of any character in the string sub within the string val.
In this case, it returns 8, since there are 8 A's and B's in val.
* Count returns the number of occurrences of the string sub within the string val. In this case, it returns 2, since there are 2 AB's in val.
* find_any_of returns the position of the first character in the string val that is contained in the string sub.
In this case, it returns 1, since the first character A is in sub. References: String Functions - ABAP Keyword Documentation, Examples of String Functions - ABAP Keyword Documentation


質問 # 59
ABAP SQL では、次のどれにエイリアスを割り当てることができますか? 注: この質問には 2 つの正解があります。

  • A. データベーステーブル
  • B. グループ基準 (group by 句から)
  • C. フィールド(フィールドリストから)
  • D. 順序基準 (order by 句から)

正解:A、C

解説:
In ABAP SQL, an alias is a temporary name that can be assigned to a field or a database table in a query. An alias can be used to make the query more readable, to avoid name conflicts, or to access fields or tables with long names. An alias is created with the AS keyword and is only valid for the duration of the query1.
The following are examples of how to assign an alias to a field or a database table in ABAP SQL:
* B. field (from field list): A field is a column of a table or a view that contains data of a certain type. A field can be assigned an alias in the field list of a SELECT statement, which specifies the fields that are selected from the data source. For example, the following query assigns the alias name to the field carrname of the table scarr:
SELECT carrid, carrname AS name FROM scarr.
The alias name can be used instead of carrname in other clauses of the query, such as WHERE, GROUP BY, ORDER BY, and so on2.
* C. database table: A database table is a collection of data that is organized in rows and columns. A database table can be assigned an alias in the FROM clause of a SELECT statement, which specifies the data source that is selected from. For example, the following query assigns the alias c to the table scarr:
SELECT c.carrid, c.carrname FROM scarr AS c.
The alias c can be used instead of scarr in other clauses of the query, such as WHERE, JOIN, GROUP BY, ORDER BY, and so on3.
The following are not valid for assigning an alias in ABAP SQL:
* A. order criterion (from order by clause): An order criterion is a field or an expression that is used to sort the result set of a query in ascending or descending order. An order criterion cannot be assigned an alias in the ORDER BY clause of a SELECT statement, because the alias is not visible in this clause. The alias can only be used in the clauses that follow the clause where it is defined1.
* D. group criterion (from group by clause): A group criterion is a field or an expression that is used to group the result set of a query into subsets that share the same values. A group criterion cannot be assigned an alias in the GROUP BY clause of a SELECT statement, because the alias is not visible in this clause. The alias can only be used in the clauses that follow the clause where it is defined1.
References: 1: ALIASES - ABAP Keyword Documentation 2: SELECT List - ABAP Keyword Documentation 3: FROM Clause - ABAP Keyword Documentation


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

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

正解:A

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


質問 # 61
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


質問 # 62
どのパターンで例外が発生しますか? 注: この質問には 3 つの正解があります。

  • A. データ: Ev target TYPE p DECIMALS 3. 定数: gcojntl TYPE i VALUE 2. Ev_target -U EXACT #2 / gcojntl )。
  • B. データ: gv_target TYPE p DECIMALS 2. 定数: go intl TYPE i VALUE 3. gv_target -U EXACT (2 gcojntl)。
  • 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. データ: gv_target 型 文字列。定数: gco_string 型 長さ 16 値
    0123456789ABCDEF*. gv_target = EXACT # gco_string+5 (5) ).

正解:B、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


質問 # 63
クラス zcl_demo_class は、言語バージョンが「標準 ABAP」に設定されたソフトウェア コンポーネント内にあります。 機能モジュール「ZF11」は、言語バージョンが「ABAP Cloud」に設定されたソフトウェア コンポーネント内にあります。 クラスと機能モジュールは両方とも顧客が作成したものです。 行番号 6 に関して、次のどれが有効な記述ですか?

  • A. 'ZF1' は、クラウド開発用にリリースされたラッパーを介して呼び出すことができます。
  • B. クラウド開発用にリリースされているかどうかに関係なく、「ZF1」を呼び出すことができます。
  • C. クラウド開発を呼び出すには、「ZF1」をリリースする必要があります。
  • D. 'ZF1' は、クラウド開発用にリリースされていないラッパーを介して呼び出すことができます。

正解:A

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


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

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

正解:C、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


質問 # 65
展示する
次の ABAP SQL スニペットのうち、行番号 4 のパラメータに値を提供する構文的に正しい方法はどれですか? 注: この質問には 2 つの正解があります。

  • A. ...SELECT * FROM deno_cds_param_view_entity (p_date = @
    (cl_abap_context_info->get_system_date())...
  • B. ... deno_cds_param_view_entity (p_date - '20230101') から * を選択... )
  • C. ...demo_cds_param_view エンティティ (p_date: $session.system_date) から * を選択...
  • D. ...demo_cds_param_view_entity (p_date: 20238181') から * を選択...)

正解:A、B


質問 # 66
LOOP AT itab... ENDLOOP ステートメントを使用して内部テーブルを処理する場合、現在の行番号はどのシステム変数に格納されますか?

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

正解:B

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


質問 # 67

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

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

正解:C、D

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


質問 # 68
......

結果を保証するには最新2025年03月無料:https://www.goshiken.com/SAP/C_ABAPD_2309-JPN-mondaishu.html