ABAP Subroutines

5
Subroutines Subroutines

description

ABAP Subroutines

Transcript of ABAP Subroutines

SubroutinesSubroutines

SubroutinesSubroutines

Subroutines are programming modules Subroutines are programming modules which can be called from ABAP/4 which can be called from ABAP/4 programs.programs.

Frequently used parts of program can Frequently used parts of program can be put into subroutines and these be put into subroutines and these subroutines can be called explicitly from subroutines can be called explicitly from the program.the program.

Subroutines contd.Subroutines contd.

We use subroutines mainly to We use subroutines mainly to modularize and structure our program.modularize and structure our program.

Defining SubroutinesDefining Subroutines

A subroutine is a block of code A subroutine is a block of code introduced by ‘FORM’ and concluded by introduced by ‘FORM’ and concluded by ‘ENDFORM’.‘ENDFORM’.

FORM <name> <parameters.FORM <name> <parameters.

<……..><……..>

ENDFORM.ENDFORM.

Calling subroutinesCalling subroutines