English 中文(简体)
SAP ABAP Tutorial

SAP ABAP Useful Resources

Selected Reading

SAP ABAP - Modularization
  • 时间:2024-11-03

SAP ABAP - Modularization


Previous Page Next Page  

It is a good practice to keep your programs as self-contained and easy to read as possible. Just try to sppt large and comppcated tasks into smaller and simpler ones by placing each task in its inspanidual module, on which the developer can concentrate on without other distractions.

In SAP ABAP environment, modularization involves the organization of programs into modular units, also known as logical blocks. It reduces redundancy and increases program readabipty even as you are creating it and subsequently during the maintenance cycle. Modularization also enables reusabipty of the same code again. ABAP has made it necessary for developers to modularize, i.e. organizing the programs relatively more, than in the OOPS-based languages that have relatively more built-in modular features. Once a small, modularized section of code is complete, debugged and so on, it does not subsequently have to be returned to, and developers can then move on and focus on other issues.

ABAP programs are made up of processing blocks known as modularizing processing blocks. They are −

    The processing blocks called from outside the program and from the ABAP run-time environment (i.e., event blocks and dialog modules).

    Processing blocks called from ABAP programs.

Apart from the modularization with processing blocks, source code modules are used to modularize your source code through macros and include programs.

Modularization at source code level −

    Local Macros

    Global Include programs

Modularization through processing blocks called from ABAP programs −

    Subroutines

    Function modules

Modularizing a source code means placing a sequence of ABAP statements in a module. The modularized source code can be called in a program as per the requirement of the user. Source code modules enhance the readabipty and understandabipty of ABAP programs. Creating inspanidual source code modules also prevents one from having to repeatedly write the same statements again and again that in turn makes the code easier to understand for anyone going through it for the first time.

Advertisements