13. Modularization Techniques Flashcards
When you declare a subroutine, you are identifying the_____ When you call a subroutine, you must specify the______
Formal parameters, Actual parameters
When using parameters, they must be passed to the subroutine using one of the following three methods.
Pass by value, Pass by value and result and Pass by reference
Pass by value-method
When the subroutine is called, a copy of the value of the data variable is passed to the formal parameter. The formal parameter has its own storage location (memory).
Pass by value and result-Method
In addition to the above, at the end of the subroutine, the value of the formal parameter is passed back to the actual parameter assigned to it.
Pass by reference-method
The formal parameters do not have a separate storage location. Instead, the address of the actual parameter is passed to the formal parameter. Changes to the value of the formal parameter are immediately reflected back in the actual parameters.
PERFORM statement
to call a subroutine.
FORM/ENDFORM statement
to define a subroutine.
USING keyword
allows you to specify the data variables to be passed as parameters.
CHANGING keyword
when specifying formal parameters to define a pass by value and result.
Local data
is any variable or structure that is defined within a subroutine.
use this option if you want the variable to be re-initialized with the default value every time it enters the subroutine.
DATA
use this option if you want the variable to remember what the value was the last time it was in the subroutine. It will not be re-initialized based on the definition.
STATICS
Function modules
are general purpose ABAP routines that can be called from any ABAP program. The benefit of function modules lies in their reusability, which saves developers from creating redundant code and increases programming efficiency.
Function builder
These function groups are collections of logically related functions that share common program context, such as global variables, at run time.
Parts of a function module
Administration, Interface, Documentation, Source code, Global data and main program