‎2006 May 01 8:55 AM
‎2006 May 01 8:58 AM
‎2006 May 01 9:00 AM
Hai Kiran
1) Subroutines are programming modules which can be called from ABAP/4 programs.
Frequently used parts of program can be put into subroutines and these subroutines can be called explicitly from the program.
We use subroutines mainly to modularize and structure our program.
2) A subroutine is a block of code introduced by FORM and concluded by ENDFORM.
FORM
ENDFORM.
Calls the subroutine form defined using a FORM statement. After the subroutine has finished, processing continues after the PERFORM statement. The parameters of the subroutine are position parameters, and must be passed in the call according to the definition of the formal parameters in the corresponding FORM statement.
4) You list these parameters after USING or CHANGING without the VALUE addition:
FORM
ENDFORM.
Thanks & Regards
Sreenivasulu P
‎2006 May 01 9:02 AM
Hi Kiran,
U can call subroutine from another program using the following sytax..
PERFORM <Subroutine_name> IN PROGRAM<prog_name> IF FOUND.
Regards,
Tanveer.
Please mark helpful answers
‎2006 May 01 10:59 AM
Hi Kiran,
You can call subroutine in another program with the following syntax.
PERFORM <subroutine> IN PROGRAM <program_name>.
You can call dynamic subroutines in another program with the follwoing syntax.
PERFORM <b>(subroutine)</b> IN PROGRAM <program_name>.
At the runtime, the name of subroutine is called in another program.
You can call subroutine in dynamic program with the following syntax.
PERFORM <subroutine> IN PROGRAM <b>(program_name)</b>.
You can have both subroutine and program as dynamic.
PERFORM <b>(subroutine)</b> IN PROGRAM <b>(program_name)</b>.
Thanks,
Vinay