Does every ABAP/4 have a modular Structure?

What is Modularization and its benefits?
If the program contains the same or similar blocks of statements or it is required to process the same function several times, we can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we make them easy to read and improve their structure. Modularized programs are also easier to maintain and to update.

Name the ABAP/4 Modularization techniques.
A. Source code module
B. Subroutines.
C. Functions.

How can we create callable modules of program code within one ABAP/4 Program?
A. By defining macros.
By creating include programs in the library.

_____ is the attribute type of the module program.

Is it posible to pass data to and from include programs explicitly?
No. If it is required to pass data to and from modules it is required to use subroutines or function modules.

What are subroutines?
Subroutines are program modules which can be called from other ABAP/4 programs or within the same program.

What are the types of Subroutines?

Internal Subroutines: The source code of the internal subroutines will be in the same ABAP/4 program as the calling procedure (internal call).
External Subroutines: The source code of the external subroutines will be in an ABAP/4 program other than the calling procedure.

It is not possible to create an ABAP/4 program which contains only Subroutines. ( True / False)

A subroutine can contain nested form and end form blocks. (True / False)

Data can be passed between calling programs and the subroutines using ________.

What are the different types of parameters?
Formal parameters: Parameters that are defined during the definition of subroutine with the FORM statement.
Actual parameters: Parameters which are specified during the call of a subroutine with the PERFORM statement.

How can one distinguish between different kinds of parameters?
A. Input parameters are used to pass data to subroutines.
Output parameters are used to pass data from subroutines.

What are the different methods of passing data?

Calling by reference: During a subroutine call, only the address of the actual parameter is transferred to the formal parameters. The formal parameter has no memory of its own, and we work with the field of the calling program within the subroutine. If we change the formal parameter, the field contents in the calling program also change.
Calling by value: During a subroutine call, the formal parameters are created as copies of the actual parameters. The formal parameters have memory of their own. Changes to the formal parameters have no effect on the actual parameters.
Calling by value and result: During a subroutine call, the formal parameters are created as copies of the actual parameters. The formal parameters have their own memory space. Changes to the formal parameters are copied to the actual parameters at the end of the subroutine.

The method by which internal tables are passed is ___________.
By Reference.

How can an internal table with Header line and one without header line be distinguished when passed to a subroutine?
Itab[ ] is used in the form and endform if the internal table is passed with a header line.

What should be declared explicitly in the corresponding ABAP/4 Statements to access internal tables without header lines & why?
Work Area. This is required as the Work Area is the interface for transferring data to and from the table.

A subroutine can be terminated unconditionally using EXIT. (TRUE / FALSE)

A subroutine can be terminated upon a condition using _____________.
CHECK Statement.

Function Modules are also external Subroutines. (TRUE / FALSE).

What is the difference between the function module and a normal ABAP/4 subroutine?
In contrast to normal subroutines function modules have uniquely defined interface. Declaring data as common parts is not possible for function modules. Function modules are stored in a central library.

What is a function group?
A function group is a collection of logically related modules that share global data with each other. All the modules in the group are included in the same main program. When an ABAP/4 program contains a CALL FUNCTION statement, the system loads the entire function group in with the program code at runtime. Every function module belongs to a function group.

What is the disadvantage of a call by reference?
During a call by reference damage or loss of data is not restricted to the subroutine, but will instantly lead to changes to the original data objects.

A function module can be called from a transaction screen outside an ABAP/4 program. (TRUE /FALSE)

What is an update task?
It is an SAP provided procedure for updating a database.

What happens if a function module runs in an update task?
The system performs the module processing asynchronously. Instead of carrying out the call immediately, the system waits until the next database update is triggered with the ‘COMMIT WORK’ command.

The function modules are created and stored in the ______________.
Function Library.

When a function module is activated syntax checking is performed automatically. (TRUE / FALSE)

What is the use of the RAISING exception.
The raising exception determines whether the calling program will handle the exception itself or leave the exception to the system.

What is the difference between internal tables and extract datasets?

The lines of an internal table always have the same structure. By using extract datasets, you can handle groups of data with different structure and get statistical figures from the grouped data.
You have to define the structure of the internal table at the begining. You need not define the structure of the extract dataset.
In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required.
Internal tables require special work area for interface whereas extract datasets do not need a special work area for interface.

It is possible to assign a local data object defined in a subroutine or function module to a field group. (TRUE / FALSE)

What is the difference between field-group header and other field groups?
The header field group is a special field group for the sort criteria. The system automatically prefixes any other field groups with the header field group.

Can a field occur in several field groups.
Yes. But it leads to unnecessary data redundancy.

When sorting the extract dataset the fields used as default sort key lie in the ______.
Header field group.

What does the insert statement in extract datasets do?
It defines the fields of a field group.

What does the extract statement do in extract datasets?
The data is written to virtual memory by extract commands.

A field-groups statement or an insert statement reserves storage space and transfers values. (TRUE / FALSE)

While using extract datasets it is required to have a special work area for interface. (TRUE / FALSE).

The LOOP-ENDLOOP on extract datasets can be used without any kind of errors. (TRUE / FALSE).
FALSE. It causes runtime errors.

The Maximum no of key fields that can be used in a header is _____________.

While sorting field groups we cannot use more than one key field. (TRUE / FALSE)

While sorting, if the main storage space available is not enough, the system writes data to an external help file. The SAP profile parameter, which determines this help file, is _________________.

The extract statements in field groups can be used before or after processing the sort statements. (TRUE / FALSE).