25 Parameters to Subroutines by Reference vs Value and Include Program in SAP ABAP

Опубликовано: 18 Июнь 2026
на канале: SAP Full Stack Custom Development
38
1

In SAP ABAP, the core difference between the two parameter tracking mechanisms is that pass by reference passes a pointer directly to the original memory address, whereas pass by value creates a local data copy of the actual parameter. By default, ABAP defaults to passing parameters by reference for performance reasons, unless you explicitly define them using the VALUE() keyword.

When using Pass by Value, ABAP allocates unique memory for the formal parameter and duplicates the actual parameter's value into it.

When you Pass by Reference, the formal parameter points directly to the memory workspace of the actual parameter.

Include Program

An Include program in SAP ABAP is a reusable repository object used to modularize source code by splitting large programs into smaller, more manageable files. They are purely containers for code; they cannot be executed on their own and must be called within a main executable program or module pool.

Key Characteristics
Global Availability: Can be used across multiple main programs if designed generally.
No Direct Execution: Attempting to run an Include program independently results in an error.
Shared Memory: Inherits the memory area, global variables, and selection screens of the main calling program.
Component-Based Structure: Typically used in Module Pools (Online Programs) and Function Groups to separate data declarations, screens, and processing logic.