01-09-2007 3:20 AM
1) Can you please tell the difference between the Function module used in abap program and the method of the class module used in abap programming.
2) does it necessary to do commit statement after calling the function module.
Thankyou for you time.
Bhaskar.
01-09-2007 3:32 AM
Hi,
1)
Check this difference..
The main difference between real object orientation and function groups is that although a program can work with the instances of several function groups at the same time, it cannot work with several instances of a single function group. Suppose a program wanted to use several independent counters, or process several orders at the same time. In this case, you would have to adapt the function group to include instance administration, for example, by using numbers to differentiate between the instances.
2) COMMIT WORK is required for BAPI..And not required when you normally call a function module..Unless required ..
Example
-
Update function modules requires COMMIT WORK to execute the function module.
Thanks,
Naren
01-09-2007 3:32 AM
Hi,
1)
Check this difference..
The main difference between real object orientation and function groups is that although a program can work with the instances of several function groups at the same time, it cannot work with several instances of a single function group. Suppose a program wanted to use several independent counters, or process several orders at the same time. In this case, you would have to adapt the function group to include instance administration, for example, by using numbers to differentiate between the instances.
2) COMMIT WORK is required for BAPI..And not required when you normally call a function module..Unless required ..
Example
-
Update function modules requires COMMIT WORK to execute the function module.
Thanks,
Naren
02-02-2007 7:02 AM
hi
I also want to know the difference between the FM and methods.
1. "program can work with the instances of several function groups at the same
time, it cannot work with several instances of a single function group".
That means i cannot call a function module(instance of Function grp) more than once in a program.
Please tell me whether i am right or wrong. Could u please explain me what is the meaning of insatnce of function group..
Is there any other difference between these two.
2. what is the difference between static and instance method and function module?
in which scenario we need to use static and instance methods.?
Regards
Sudhansu
01-09-2007 3:34 AM
Hi Bhaskar,
Please check this link.
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm</a>
-Satya Priya
01-09-2007 3:54 AM
Hello Baskar
I would like to answer (1):
Function modules correspond to <b>static</b> methods of classes because all global attributes of the function group are valid all the time when calling one of its function modules. We cannot have instances, i.e. specific dataset combined with coding.
Thus far we cannot call class methods remotely but we have to use RFC-enabled function modules. However, if you check the possible categories of classes (SE24, tabstrip <i>Properties</i>) there will be great changes in the (near) future ahead!
Regards
Uwe