‎2007 Feb 26 1:29 PM
Hi,
I have doubt in this BAPI. There is a statement fbgenmac 'BAPI_SALESORDER_GETLIST' (generate data record) in this BAPI. Can any body explain me what this statement is useful for?
Regards,
Phani
‎2007 Feb 26 1:31 PM
It is a MACRO .
It has a predefined code defined.
Double click on the FBGENMAC to see the code.
Regards,
Ravi
‎2007 Feb 26 2:02 PM
Hi Ravi & Joseph,
Thanks for the replies. Yes, later I have observed that this is a macro. Can you please explain me the functionality of a macro and use of it. If it is similar to a subroutine/function module, then can you explain me the differences between these?
Regards,
Phani
‎2007 Feb 26 2:05 PM
Refer this link to know the difference.
http://sap.ittoolbox.com/documents/popular-q-and-a/macro-vs-subroutine-1594
Regards,
Ravi
‎2007 Jun 20 6:32 PM
Hi Sivapuram,
Difference between Macro & Function/Subroutine
During the compilation wherever the macro is mentioned(called) the call is replaced by the Macro definition ( i.e the statements which define macro )
And whenever the function is called during compilation the assembly language code is replaced which will take the control to some other line of code where the function is defined and get the control back to same place right from where the call was made.
Hope this helps!!!
Best Regards,
Pavanmeet Singh
‎2007 Feb 26 1:43 PM
hi Phani,
<b>fbgenmac</b> is a MACRO, defined in the program and 'BAPI_SALESORDER_GETLIST' is a parameter to this macro. If you double click on <b>fbgenmac</b>, you will be taken to the Macro definition, where you can see the underlying logic happening inside this MACRO.
Hope this helps,
Sajan Joseph.