Professional Documents
Culture Documents
Session 6
Session 6
Session 6
Modularization techniques:
The concept of modularization is dividing the main program into sub-programs for better readability
and re-usability. Modularization can be implemented in the following ways.
Sub-routines.
-Internal program
Call by value-Two memory address will allocate.(Using Value).
Call by Reference-Only one memory address will allocate.(Using,Changing,Changing Value)
-External Program
Include Programs.
Function Modules.
When we call the function module in ABAP program, it is internally inserted in the program.
First you create function group (Path: SE37 -> Goto -> function group -> Create a group) then you create
function modules.
(Or) Goto SE80-First create function group-after create function module.
Macros
Sub-routines:
Sub-routines are also sub-programs in SAP ABAP which contains certain re-usable
statements.
Most of the times we use sub-routines for re-usability inside the program.
Changing value:
PARAMETERS: A TYPE I,
B TYPE I.
DATA : C TYPE I.
PERFORM ANJU USING A B C.
C = A + B.
WRITE:/ 'C VALUE', C.
Using:PARAMETERS: A TYPE I,
B TYPE I.
DATA : C TYPE I.
PERFORM ANJU USING A B C.
C = A + B.
WRITE:/ 'C VALUE', C.
FORM ANJU using D E F.
D = 20.
E = 10.
F = D + E.
WRITE:/ 'F VALUE', F.
ENDFORM.
Changing:PARAMETERS: A TYPE I,
B TYPE I.
DATA : C TYPE I.
Function Module:Step:1
Enter-Yes.
Step:2
Step 3:
Create package-Goto T.code-SE80-Choose Package and Enter.
Step 4:
Save.
Enter.
If you create Function group at that time two Include program will create default.
Step 5:
Create Function module on your Function group.-Right click on function modulecreate-Function group.