SAP ABAP Certification

Interested in ABAP Video Training? Click here for a free Video

SAP Certified Development Associate – Exam Questions ABAP with SAP NetWeaver 7.0

These questions are similar to the ones asked in the actual Test.

How should I know? I know, because although I got my ABAP Certification five years back, I have re certified with the latest version of the Associate Certification test.

Before you start here are some Key features of the ABAP Associate Certification Exam

– The exam is Computer based and you have three Hours to answer 80 Questions.

– The Questions are (mostly) multiple choice type and there is NO penalty for an incorrect answer.

– Some of the Questions have more than one correct answers. You must get ALL the options correct for you to be awarded points.

– The Official Pass percentage is 65% (But this can vary). You will be told the exact passing percentage before you begin your test.

Sample Certification Questions

Q 1. There are various possibilities of creating/changing an ABAP programme. Some of these are:
(Multiple correct answers)
A. Opening programs in the Object Navigator
B. Using the ABAP Editor
C. Using EEWB
D. Using Forward Navigation

Answer:
A, B, D

To start the ABAP Editor to create or change ABAP programs, the R/3 system offers three possibilities:

• Opening Programs in the Object Navigator
The Object Navigator of the ABAP Workbench (Transaction SE80) offers a hierarchical overview of all R/3 Repository objects, ordered by package, user name of the programmer, object types, and so on.

By selecting a program, the Object Navigator supplies direct access to all components of a program, such as main program, includes, classes, or global data. By selecting a program object in the Object Navigator and calling a maintenance transaction, you directly open the appropriate tool for this object, in this case the ABAP Editor.

This way is appropriate for all ABAP programs, as the Object Navigator gives you a constant overview of all components of a program. In particular, screens and user interfaces are displayed.

• Using the ABAP Editor
To open ABAP programs directly from the tool ABAP Editor, select the menu path Tools –> ABAP Workbench –> Overview –> Development –> ABAP Editor from the SAP menu of SAP Easy Access (or start Transaction SE38).

If you want to change a program using this method, you must already know its name and environment.
This procedure is only suited for maintaining or creating relatively simple or short programs, which have few or no additional components.

• Using Forward Navigation
In any of the tools in the ABAP Workbench, you can open a different Repository object by positioning the cursor on it and double-clicking. The system automatically opens the object using the correct tool. This also applies to editing ABAP programs.

Forward navigation by double-click can be used at any point where the names of ABAP programs appear in the ABAP Workbench.

Q 2. Which of the following are acceptable names of an ABAP program?
(Multiple correct answers)
A. ZQSDABAP
B. YMYFIRSTABAPPROGRAM
C. Z”MyFirst ABAP PROGRAM
D. Z==FIRSTABAPPROGRAM
E. THISISMYFIRSTABAPPROGRAMME

Answer:
A, B, E

The name of an ABAP program can be between 1 and 30 characters long.

The following symbols and signs must not be used in program names:
Period (.), comma (,), space ( ), parentheses (), apostrophe (‘), inverted commas (“), equals sign (=), asterisk (*), accented characters or German umlauts (à, é, ø, ä, ß, and so on), percentage signs (%), or underscores (_).

Q 3. Data types in ABAP are not just attributes of fields, but can be defined in their own right. Where in ABAP can you define data types?
(Multiple correct answers)
A. ABAP Dictionary
B. In programs
C. In IMG

Answer:
A, B
The following graphic shows where you can define data types in ABAP:

This differentiates between
• Predefined ABAP types that are built into the kernel.
• Local data types that you can define in ABAP programs.
• Data types in the ABAP Dictionary that are available to all programs in the entire system. In the ABAP Dictionary, you can define types either as Dictionary objects or in type groups.

Q 4. Which of the following are ways to process large volumes of data in ABAP?
(Multiple correct answers)
A. Internal Tables
B. Extracts
C. Database Storage

Answer:
A, B

There are two ways of processing large quantities of data in ABAP – either using internal tables or extract datasets.

Internal tables
Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP.

The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs.

You should use internal tables whenever you want to process a dataset with a fixed structure within a program.

A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.

Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.

Extracts
Since internal tables have fixed line structures, they are not suited to handle data sets with varying structures.

Instead, you can use extract datasets for this purpose.

An extract is a sequential dataset in the memory area of the program. You can only address the entries in the dataset within a special loop. The index or key access permitted with internal tables is not allowed. You may only create one extract in any ABAP program. The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem.

An extract dataset consists of a sequence of records of a pre-defined structure. However, the structure need not be identical for all records. In one extract dataset, you can store records of different length and structure one after the other. You need not create an individual dataset for each different structure you want to store. This fact reduces the maintenance effort considerably.

In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required. In addition, you need not specify the structure of an extract dataset at the beginning of the program, but you can determine it dynamically during the flow of the program.

You can use control level processing with extracts just as you can with internal tables. The internal administration for extract datasets is optimized so that it is quicker to use an extract for control level processing than an internal table.

Q 5. SAP ERP System contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks. Which of the following are functionalities of SAP Locks?
(Multiple correct answers)

A. The SAP lock concept is based on lock objects
B. Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary.
C. There are three types of locks in the system, shared, logical and exclusive
D. When you create a lock object, the system automatically creates two function modules.

Answer:
A, B, D

The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.

Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary. A lock object definition contains the database tables and their key fields on the basis of which you want to set a lock. When you create a lock object, the system automatically generates two function modules with the names ENQUEUE_ and DEQUEUE_ .

You can then set and release SAP locks in your ABAP program by calling these function modules in a CALL FUNCTION statement.

Lock Types
There are two types of lock in the R/3 System:

• Shared lock
Shared locks (or read locks) allow you to prevent data from being changed while you are reading it. They prevent other programs from setting an exclusive lock (write lock) to change the object. It does not, however, prevent other programs from setting further read locks.

• Exclusive lock
Exclusive locks (or write locks) allow you to prevent data from being changed while you are changing it yourself.

An exclusive lock, as its name suggests, locks an application object for exclusive use by the program that sets it. No other program can then set either a shared lock or an exclusive lock for the same application object.

Q 6. When you create a function module, you can set the Process Type attribute to one of the following values:
(Multiple correct answers)

A. Update with immediate start
B. Update without immediate start
C. Updated with Manual start
D. Update with Delayed start

Answer:
A, D

To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:

• Update with immediate start
Set this option for high priority (“V1”) functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.

• Update w. imm. start, no restart
Set this option for high priority (“V1”) functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.

• Update with delayed start
Set this option for low priority (“V2”) functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.

Q 7. From Release 6.10, ABAP supports multi-byte coding for characters in Unicode.

A. True
B. False

Answer:
A

From Release 6.10, ABAP supports multi-byte coding for characters in Unicode. Prior to Release 6.10, ABAP used only character sets that were based on single-byte codes – such as ASCII and EBCDIC – or double-byte codes, such as SJIS and BIG5.

This switch to Unicode affects all statements where an explicit or implicit assumption is made about the internal length of a character. If you use these statements in a program that is designed to exploit the Unicode capabilities of the runtime environment, they must be checked and changed if necessary.

Once a Unicode-enabled program has been changed accordingly, it behaves in the same way in both Unicode and non-Unicode systems. You can develop programs in a non-Unicode system (NUS) and then import them into a Unicode system (US). The following sections describe the conversions that are necessary:

Q 8. Each ABAP program consists of self-contained processing blocks, which may occur in any order in the source code. Processing blocks are sections of programs, made up of structure blocks. Which of the statements about processing blocks are True?
(Multiple correct answers)
A. They can be processed sequentially or in parallel.
B. They can be called from within a program, or from outside an ABAP program
C. To start an ABAP program, at least one of its processing blocks must be started from outside the program itself.

Answer:
B, C
Processing Blocks are processed sequentially.

Each ABAP program consists of self-contained processing blocks, which may occur in any order in the source code. Processing blocks are sections of programs, made up of structure blocks. They are processed sequentially. A processing block can be called either from outside the ABAP program, or from a processing block within the same ABAP program (see also Structure of ABAP Programs). When a processing block is called from outside the program, it can be called either by the ABAP runtime environment or another ABAP program.

To start an ABAP program, at least one of its processing blocks must be started from outside the program itself. Each ABAP program has a program type, which determines whether and how a program can be run.

Q 9. Some ABAP programs can be run by a user by entering the program name or a transaction code. These programs are of type?
(Multiple correct answers)

A. Type 1
B. Type M
C. Type F
D. Type K

Answer:
A, B

The following gives an overview of the ABAP program types:

Type 1
You can start a type 1 program by entering its program name. For this reason, they are also known as executable programs. When you start a type 1 program, processors are started in the runtime environment that call a series of processing blocks (event blocks) in a predefined sequence. The sequence is oriented towards reporting tasks. This is why executable programs are also known as reports.

A special type of type 1 program is a logical database. You can start logical databases together with reports. A logical database contains subroutines that are called by an invisible system program in a prescribed sequence for type 1 programs. The subroutines make certain reporting functions reusable. For further information, refer to Logical Databases.

Type M
Type M programs can only be started using a transaction code. A transaction code starts a screen, which consists of the screen itself and its flow logic. Screen flow logic can call special processing blocks (dialog modules) in the corresponding ABAP program. Since type M programs contain mostly dialog modules, they are known as module pools.

These programs cannot be started directly by a user. Instead, they contain processing blocks or other source code that can only be used by an application program that is already running.

Type F
Type F programs are not executable. They serve as a container for function modules. When you call a function module from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type M programs contain mainly function modules, they are known as function groups. Function modules are a type of procedure. They are described in more detail in the Procedures section.

Type K
Type K programs are not executable. They are container programs for global classes, and are known as class definitions. Classes belong to ABAP Objects and are described in more detail in that section.

Type J
Type J programs are not executable. They are container programs for global interfaces, and are known as interface definitions.

Type S
Type S programs are not executable. They are container programs for subroutines that should only be called externally. When you call a subroutine from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type S programs contain mainly subroutines, they are known as subroutine pools. Subroutines are a type of procedure.

Type I
Type I programs cannot be run directly, and contain no callable processing blocks. They are used exclusively for modularizing ABAP source code, and are included in other programs.

Q 10. Class-based exceptions are handled in a control structure that has the following elements:
(Multiple correct answers)
A. Try block
B. Catch block
C. Delete block
D. Erase block

Answer:
A, B

Class-based exceptions are handled in the following control structure:
TRY.
… ” TRY block (application coding)
CATCH cx_… cx_… …
… ” CATCH block (exception handler)
CATCH cx_… cx_… …
… ” CATCH block (exception handler)

CLEANUP.
… ” CLEANUP block (cleanup context)
ENDTRY.

TRY Block
The TRY block contains the application coding whose exceptions are to be handled. This statement block is processed sequentially. It can contain further control structures and calls of procedures or other ABAP programs.

If an exception occurs in the TRY block or in a procedure called up here, the system starts by searching for a CATCH statement of the same TRY-ENDTRY structure.

It then searches from the inside out for a CATCH statement in any enclosing TRY-ENDTRY structures that handle the event. The system may call this handler. If the system does not find a handler, but the TRY-ENDTRY structure is contained in a procedure, it tries to propagate the exception to the caller.

Exceptions cannot be propagated in any processing blocks without a local data area (event blocks, dialog modules). A runtime error occurs immediately if the handler is missing.

If no exceptions occur in the TRY block, program execution is continued directly after ENDTRY after the block has been completed.

CATCH Block
A catch block contains the exception handler that is executed when a particular exception has occurred in the TRY block of the same TRY-ENDTRY structure.

A TRY-ENDTRY structure can contain several exception handlers. The syntax for introducing an exception handler is:
CATCH cx_… cx_… INTO ref.

Any number of exception classes can be specified after CATCH. This defines an exception handler for all the specified exception classes and their subordinate classes.

After an exception occurs, the system searches through the listed exception handlers in the specified order.

The first exception handler whose CATCH statement contains the corresponding exception class or one of its superclasses is executed. The system then continues program execution directly after ENDTRY.

No subsequent exception handlers are considered. For this reason, the order of the different exception handlers within a TRY-ENDTRY structure must be based on the inheritance hierarchy of the specified exception classes.

CLEANUP Block
If the system does not find a handler for an exception in a TRY-ENDTRY structure, it searches for a handler in the enclosing TRY-ENDTRY structures from the inside out (as mentioned above).

If the system does not find a handler here, it tries to propagate the exception to a procedure caller.

Precisely one CLEANUP block can be defined in each TRY-ENDTRY structure. If the system has not found a handler for an exception, but the exception is handled in an enclosing TRY-ENDTRY structure or is propagated to a caller, the block is executed before the TRY-ENDTRY structure is exited.

In the CLEANUP block, cleanup work can be executed for the context of the TRY block.

For example, objects often have to be brought into a consistent state or external resources, to which an external handler no longer has access, have to be released.

The nesting of TRY-ENDTRY blocks and the possible propagation of exceptions may mean that several CLEANUP blocks are executed before an exception is actually handled.

Q 11. In a loop, a statement block is executed several times in succession. Some of the different kinds of loops in ABAP are:
(Multiple correct answers)
A. Unconditional loops using the DO statement
B. Conditional loops using the WHILE statement
C. Loops through internal tables using the LOOP statement
D. Unconditional loops using the WHILE statement

Answer:
A, B, C

The different types of loop statements are:

• Unconditional loops using the DO statement.
• Conditional loops using the WHILE statement.
• Loops through internal tables and extract datasets using the LOOP statement.
• Loops through datasets from database tables using the SELECT statement.

Unconditional Loops
To process a statement block several times unconditionally, use the following control structure:
DO [ TIMES] [VARYING FROM NEXT ].

ENDDO.

If you do not specify any additions, the statement block is repeated until it reaches a termination statement such as EXIT or STOP (see below). The system field SY-INDEX contains the number of loop passes, including the current loop pass.

Use the TIMES addition to restrict the number of loop passes to . can be literal or a variable. If is 0 or negative, the system does not process the loop. If you do not use the TIMES option, you must ensure that the loop contains at least one EXIT or STOP statement to avoid endless loops.

You can assign new values to a variable in each loop pass by using the VARYING option. You can use the VARYING addition more than once in a DO statement. and are the first two fields of a sequence of fields the same distance apart in memory and with the same type and length.

In the first loop pass, takes the value , in the second loop pass, , and so on. If you change the value of the field within the DO loop, the value of the current field is also changed. You must ensure that there are not more loop passes than fields in the sequence, otherwise a runtime error occurs.

Conditional Loops
To repeat a statement block for as long as a certain condition is true, use the following control structure:
WHILE [VARY FROM NEXT ].

ENDWHILE.
can be any logical expression. The statement block between WHILE and ENDWHILE is repeated as long as the condition is true or until a termination statement such as EXIT or STOP occurs.

The system field SY-INDEX contains the number of loop passes, including the current loop pass. The VARY option of the WHILE statement works in the same way as the VARYING option of the DO statement (see above).

Terminating Loops
ABAP contains termination statements that allow you to terminate a loop prematurely.

There are two categories of termination statement – those that only apply to the loop, and those that apply to the entire processing block in which the loop occurs. The STOP and REJECT statements belong to the latter group.

The termination statements that apply only to the loop in which they occur are CONTINUE, CHECK, and EXIT.

You can only use the CONTINUE statement in a loop. CHECK and EXIT, on the other hand, are context-sensitive.

Within a loop, they only apply to the execution of the loop itself. Outside of a loop, they terminate the entire processing block in which they occur (subroutine, dialog module, event block, and so on).

CONTINUE, CHECK, and EXIT can be used in all four loop types in ABAP (DO, WHILE, LOOP, and SELECT).

More Questions? Have a look at:

SAP Certified Development Associate – ABAP with SAP NetWeaver 7.0 Questions, Answers & Explanations