‎2006 Jun 17 5:36 AM
Hi friends,
What is the "Difference between Function Module and Subroutines"
Cheers
R.Kripa.
‎2006 Jun 17 6:48 AM
Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together,Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library,Unlike subroutines, you do not define function modules in the source code of your program.
Subroutines are procedures that you can define in any ABAP program and also call from any program. Subroutines are normally called internally, that is, they contain sections of code or algorithms that are used frequently locally. If you want a function to be reusable throughout the system, use a function module
reward points if it helps
regds
gunjan
‎2006 Jun 17 6:48 AM
Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together,Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library,Unlike subroutines, you do not define function modules in the source code of your program.
Subroutines are procedures that you can define in any ABAP program and also call from any program. Subroutines are normally called internally, that is, they contain sections of code or algorithms that are used frequently locally. If you want a function to be reusable throughout the system, use a function module
reward points if it helps
regds
gunjan
‎2006 Jun 17 7:07 AM
Hi Kripa,
In simple ,
Function Modules :<b> Global usage </b>(used in any pgm,any no)
Subroutines : <b>Within the Form </b>.
Rgds,
Jothi.
Mark Useful answers.
‎2006 Jun 17 7:21 AM
Hi Friends,
I accept ... FM is global usage and Subroutine is for local usage ...
But still if we want a Functionality in a program say suppose "addition of 2 numbers" I can have that as a FM "ADD_2_NUMBERS" with 2 input parameters and one output parameter ....and similarly in the program itself i can have a subroutine to which i can pass 2 input parameters and one output parameter .....
If i want the same fucntionality in another program i can call the FM ..... But i can also call the Subroutine of the earlier program by using "SUBMIT" statement ...
So this is where iam not clear ???
Cheers
R.Kripa.
‎2006 Jun 17 7:46 AM
hi
as far as i understand..it's do woth global memmory and local memory allocation...it's just the way they are stored and ur usage fetches them from golbal or local memory....
thats it...
regards
gunjan
‎2006 Jun 17 7:48 AM