MK Test
|
|
Title of test:
![]() MK Test Description: test one |



| New Comment |
|---|
NO RECORDS |
|
How can you execute test classes? Note: There are 3 correct answers to this question. Interactively by calling function "Run as a unit test" from within the tested object. As a mass test when releasing a transport request w. Interactively by calling function "Run as a unit test" from within the test class. Interactively during the release of transport request. As a mass test when executing an ABAP Test Cockpit (ATC) check variant. What is a class defined as part of an ABAP program called?. Local class. Global class. Local variable. Global variable. Which function call produces the string 'LORE IPSUM FACTUM'?. to_upper( condense( 'Lore IpsumFactum' ) ). from_mixed( val = 'LoreIpsumFactum' sep=. to mixed(val = 'Lore IpsumFactum' sep=. condense to_upper('LoreIpsumFactum' ) ). Given this code, DATA(structure_variable) REDUCE s INIT h_structure_variable TYPE structure_type FOR row IN source_itab NEXT h_structure_variable-f1 += row-f1 h_structure_variable-f2+= row-f2 which of the following statements are correct? Note: There are 2 correct answers to this question. Components of h_structure_variable will be copied to same structure variable. row is a predefined name and cannot be changed. The REDUCE expression creates a loop over source_itab. This REDUCE expression may produce a result of multipl. Which statement creates a reference variable for class CL_VEHICLE?. TYPES lo_vehicle TYPE cl_vehicle. DATA lo_vehicle TYPE REF TO cl vehicle. DATA lo_vehicle LIKE REF cl_vehicle. DATA lo_vehicle TYPE REF OF cl_vehicle. Given the following code, DATA gv_text1 TYPE string. "#EC_NEEDED DATA gv_text2 TYPE string ##NEEDED. What are valid statements? Note: There are 2 correct answers to this question. #EC_NEEDED is not checked by the syntax checker. ##NEEDED is checked by the syntax checker. The pseudo- comment is checked by the syntax checker. The pragma is not checked by the syntax checker. What are some principles of enc apsulation? Note: There are 2 correct answers to this question. Attributes can be changed by the client program directly. Attributes cannot be changed. Attributes can be changed through public class methods. Attributes can only be changed by the class. Which statement can you use to change the contents of a row of data in an internal table?. INSERT. MODIFY. APPEND. UPDATE. In a booking record, how can you calculate the differ and the flight date (type D) of a flight ?. data(gv_diff_days) = conv d( gs_booking-order_date gs_booking-flight_date ). data(gv_diff_days) = gs_booking-flight_date gs_booking-order_date. data(gv_diff_days) conv d( gs_booking-flight_date gs_booking-order_date ). data(gv_diff_days) = gs_booking-order_date - gs_booking-flight_date. While debugging an ABAP program, you want the program to stop whenever the value of a variable change. Which of the following do you use?. Exception. breakpoint Watchpoint. Conditional breakpoint. What are some features of the current ABAP programming language? Note: There are 2 correct answers to this question. A data object's type can change at runtime. Keywords are case- sensitive. It has built- in database access. The code is expression- based. Which of the following pre- defined ABAP data types is a complete data typ. N. C. P. D. Constructors have which of the following properties? Note: There are 2 correct answers to this question. The constructor is automatically called during instantiation. The constructor can have importing. The constructor must be the first method called by the client. The constructor can have returning parameters. Which function call returns 0?. find( val 'FIND Found found' sub 'F' occ = -2 CASE = abap_true ). find( val 'find FOUND Found' sub 'F' occ = -2 CASE = abap_false ). find( val 'FIND FOUND FOUND' sub = 'F' ). find( val 'find Found FOUND' sub 'F' occ = -2 -2 ). Given the following ABAP code, which exception will be raised on execution? CONSTANTS c_char TYPE c LENGTH 1 VALUE 'X'. TRY. result = numbers[ 2 / c_char ]. out->write( |Result: { result } | ). CATCH cx_sy_zerodivide. out->write( |Error: Division by zero is not defined| ). CATCH cx_sy_conversion_no_number. out->write( |Error: { c_char } is not a number! | ). CATCH cx_sy_itab_line_not_found. out->write( |Error: itab contains less than { 2 / c_char } rows| ). ENDTRY. cx_sy_conversion_no_number. cx_sy_zerodivide. cx_sy_itab_line_not_found. To give authorization to users, in which order are the artifacts being used?. A. The IAM app uses the Business Catalog. The Business Catalog uses the Business Role. The Business Role uses the Business User. The Business User uses the Authorization Object. B. The IAM app uses the Business Role. The Business Role uses the Authorization Object. The Authorization Object uses the Bu The Business User uses the Authorization Object. C. The IAM app uses the Authorization Object. The Business Catalog uses the IAM app. The Business Role uses the Business Catalog. The Business User uses the Business Role. D. The IAM app uses t he Business User. The Business User uses the Business Catalog. The Business Catalog uses the Business Role. The Business Role uses the Authorization Object. When you work with a test class you can set up some prerequisites before the actual testing. In which sequence will the following fixtures be called by the test environment?. A. teardown() B. class_setup() C. class_teardown() D. setup(). B. class_setup() D. setup() A. teardown() C. class_teardown(). How can you control data access of a business user? Note: There are 3 correct answers to this question. A. To control the general access implicitly via an Access Control object (define role). B. To control the "Read access" implicitly via an Access Control object (define role). C. To control the "Create, Update, and Delete access" implicitly via an Access Control object (define role). D. To control the "Create, Update, and Delete access" via explicit check using AUTHORITY-CHECK. E. To control the "Read access" via explicit check using AUTHORITY-CHECK. You want to check the behavior of an ordinary class ZCL_ORDINARY with class LTCL_TEST. How do you specify LTCL_TEST as a test class?. A. Use the addition "FOR TESTING" in the class declaration of LTCL_TEST. B. Use the addition "FOR TESTING: LTCL_TEST" in the class declaration of ZCL_ORDINARY. C. Create a parameter in the SETUP method of LTCL_TEST and set its value to "Test". D. Create LTCL_TEST in a special package that is reserved for test classes. Which of the following results in faster access to internal tables? Note: There are 3 correct answers to this question. In a sorted internal table, specifying. In a standard internal table, specifying the primary key partially from the left without gaps. In a sorted internal table, specifying the primary key partially from the left without gaps. In a hashed internal table, specifying. In a hashed internal table, specifying the primary key completely. What can be translated? Note: There are 3 correct answers to this question. Content of a String variable. Text symbol. Text literal. Message class. Data element texts. Given the following data definitions: DATA: text TYPE string VALUE 'Date 1972-04-01 is in ISO format'. DATA: regex TYPE string VALUE '[0-9]{4} (- [0-9]{2}){2}'. In which of the following functions can you use regular expressions? Note: There are 3 correct answers to this question. matches( val = text pcre = regex ). reverse( val = text pcre = regex ). find( val = text pcre = regex ). condense( val = text pcre = regex ). match( val = text pcre = regex ). When defining a METHOD, which parameter type can only have 1 value?. CHANGING. EXPORTING. IMPORTING. RETURNING. What is the syntax to access component carrier_name of structure connection?. connection/carrier_name. connection=>carrier_name. connection->carrier_name. connection-carrier_name. Which internal table type allows unique and non-unique keys?. Standard. Hashed. Sorted. What describes multi-column internal tables?. They use one incomplete data type. They use one complete data type. They must contain nested components. They are based on a structured row type. Given this code, INTERFACE if1. METHODS m1. ENDINTERFACE. CLASS cl1 DEFINITION. PUBLIC SECTION. INTERFACES if1. METHODS m2. ENDCLASS. * in a method of another class DATA go_if1 TYPE REF TO if1. DATA go_cl1 TYPE REF TO cl1. go_cl1 = NEW #( ... ). go_if1 = go_cl1. vbnet Copy code CLASS cl1 DEFINITION. PUBLIC SECTION. INTERFACES if1. METHODS m2. ENDCLASS. * in a method of another class DATA go_if1 TYPE REF TO if1. DATA go_cl1 TYPE REF TO cl1. go_cl1 = NEW #( ... ). go_if1 = go_cl1. Note: There are 3 correct answers to this question. Instead of go_cl1 = NEW #(…) you could use go_if1 = NEW cl1(…). go_if1 may call method m1 with go_if1->m1(…). go_cl1 may call method m1 with go_cl1->if1~m1(…). Instead of go_cl1 = NEW #(…) you could use go_if1 = NEW #(…). go_if1 may call method m2 with go_if->m2(…). You want to document a global class with ABAP Doc. What do you need to consider? Note: There are 3 correct answers to this question. The documentation starts with “!”. The documentation has to be positioned directly after the declarative statement. The documentation can contain links to other repository object’s documentation. The documentation can be translated. The documentation may contain tags like <strong></strong>. What are some necessary parts of the singleton pattern? Note: There are 3 correct answers to this question. Constructor visibility is set to private. Class creation is set to "create private". Class method to create the singleton instance is set to private. Static attribute to store address of the singleton instance must exist. Class method to create the singleton instance must exist. In a subclass sub1 you want to redefine a component of a superclass super1. How do you achieve this? Note: There are 2 correct answers to this question. You add the clause REDEFINITION to the component in sub1. You implement the redefined component for a second time in super1. You add the clause REDEFINITION to the component in super1. You implement the redefined component in sub1. When you create an exception class, what does SAP recommend you do? Note: There are 3 correct answers to this question. Inherit from cx_static_check, if you want a warning at design time that the exception can never be raised. Define corresponding public attributes, if you want to pass context-specific values to placeholders of a message. Implement interface if_t100_message, if you want to reuse messages from a message class. Inherit from cx_no_check, if you want to reuse messages from a system exception class. Inherit from cx_static_check, if you want a warning at design time that the exception will not be caught. Which statements apply to the TRY-ENDTRY construct? Note: There are 3 correct answers to this question. CATCH clauses should be organized ascending from most specific to most general. A CLEANUP clause catches remaining exceptions. A superclass in a CATCH clause catches exceptions of itself and of its subclasses. A CATCH clause can be used as a handler for several exception classes. All matching CATCH clauses are always executed. |





