Sunday, 13 May 2012

Explain the various modularization techniques in procedures. | SAP-ABAP

=>  Source code modules-- Series of ABAP statements are placed in modules while modularizing the source code. It provides the facility to call just one module instead of calling all of the statements. When the program is executed, the source code is behaves as it is 0 actually present in the main program. By using source code modules, there is no need  to write same set of statements again. Thus, making the program easy to read and understand. They are not used in modularization of tasks and functions.
There are two types of source code modules in ABAP:
=>    Local Modules
=>    Cross Modules
=>  Subroutines-- Subroutines are procedures which can be defined in any ABAP program and can be called by any ABAP program. It is mainly for local modularization which means usually they are called from those programs in which they are defined. It is called internally as it contains codes that are used often in ABAP program. Subroutines are normally called internally,  as they contain sections of code or algorithms that are used locally.
=>  Function Modules-- Function modules are procedures which are defined in function groups and can be called from any ABAP program. It is used for global modularization as it is always called from a different program. It must be defined in function group. Function groups act as a container for function modules defined, where function builder is used to generate  the function group and the function modules.

No comments: