ABAP Modularization

ABAP Modularization an Overview

What is ABAP 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.

How can we create callable modules of program code within one ABAP/4 Program?

A.  By defining macros.

B.   By creating include programs in the library.

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?

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

B.      External Subroutines:  The source code of the external subroutines will be in an ABAP/4 program other than the calling procedure.

What are the different types of  parameters?

Formal parameters: Parameters which 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.

B.  Output parameters are used to pass data from subroutines.

ABAP Major Components

What are the different methods of passing data?

A. 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.

B.  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.

C.  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.

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.

Sub routines do not return values.

Sub routines do not return exceptions.

Sub routines cannot be tested independently.

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 difference between internal tables and extract datasets?

A.  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.

B.   You have to define the structure of the internal table at the begining. You need not define the structure of the extract dataset.

C.   In contrast to internal tables, the system partly compresses extract datasets when storing them. This reduces the storage space required.

D.  Internal tables require special work area for interface whereas extract datasets do not need a special work area for interface.


Also See: What is General Ledger Planning in SAP?

Online Training Tutorials

  • ABAP programsDifferent Types of ABAP ProgramsDifferent Types of ABAP programs : ABAP, there are 7 different types of ABAP programs which includes executable, function module, module pool, subroutine, class, interface, Types of ABAP […]
  • SAP ABAP Interview Questions and AnswersTop 30 SAP ABAP Interview Questions and Answers – TechnosapABAP is a hybrid programming language that supports both a procedural and an object-oriented programming model.  We have listed SAP ABAP Interview Questions and Answers that have been […]
  • SAP ABAP TutorialSAP ABAP Tutorial – Learn SAP ABAP ProgrammingSAP ABAP Tutorial - To learn how to do programming and some of the basic tutorials and coding in SAP ABAP module step by step. SAP ABAP (Advanced Business Application Programming) is […]
  • SAP R3 ArchitectureWhat is R/3 Architecture?SAP R3 Architecture: To start entering into project implementation activities every one of the project related, should at least know the R/3 architecture. It gives an immense knowledge […]
  • Screen Exit for SAP Standard TransactionHow to Implement Screen Exit for SAP Standard TransactionScreen Exit for SAP Standard Transaction: SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than […]
  • SAP Adobe FormsHow to use Multiple Master and Body Pages in the SAP Adobe FormsSAP Adobe Forms: SAP Interactive Forms by Adobe is included in SAP Web Application Server and can be used by any applications that are based on SAP NetWeaver ’04 or later. The following […]
  • ABAP Package ConceptABAP Package Concept an OverviewABAP Package Concept, ABAP applications server’s one of the most important innovations is ABAP package concept, owing to the reason that it allows the development of software considered to […]
  • SAP Support PackageThe Steps to Upgrade SAP Support PackageHope sometimes we need to update our SAP Support Package for bug fixing or regular maintenance. If we  check our current SAP Support Package Level from transaction SPAM --> Package […]