Modularization Techniques: Subroutines with Example
Subroutines: They are the local modularization techniques. The sub routines are used to define the reusable functions in the program. The ABAP statement 'PERFORM' is used to call the subroutines. The ABAP statement FORM and ENDFORM are used to define the subroutines. Subroutines are 2 types 1. Internal Subroutines 2.External Subroutines. Note: • The number of actual parameters should be similar to the number of formal parameters. • The sub-routines definitions should not be nested (form within the form) but, the subroutine can be called within the sub-routine. Internal Subroutines: They are defined and called in the same program. REPORT zvb_sub . TYPES : BEGIN OF ty_vbak , vbeln TYPE vbak - vbeln , erdat TYPE vbak - erdat , ernam TYPE vbak - ernam , ...