‎2005 Sep 13 4:44 PM
Hi All,
I am Confused with difference between RFM and BAPI,
I know Both are Function Modules which are RFC enabled.
Since we can call both RFM's and BAPis from Jco program,
For a given functionality, On what Factors does it depend whether :
i have to create just a RFM
OR
Register the same RFM a an API method to some Business Object.
please help me understand..
Thanks
-Ravi.
‎2005 Sep 13 4:50 PM
Hi ravi,
RFM: RFC-enabled Function Module
A RFM is an ABAP function module (similar to function or subroutine in other languages) that can be remotely invoked. An RFM takes some parameters as input, and after execution, returns some output parameters. You can view a RFM in the SAP system via transaction SE37.
BAPI: Business Application Programming Interface
A BAPI is a method of a business object defined in the Business Object Repository (BOR). For example, in the BOR, you can find a business object called SalesOrder, which conceptually represents a sales order in the system. A business object typically has several methods that can be used to read, create, modify a particular instance of the business object, or list instances of the business object matching certain selection criteria. These methods are BAPIs. Technically, a BAPI is implemented using a RFM. But, unlike the non-BAPI RFMs, a BAPI is usually well documented, has nicer parameter names, and is supported by SAP for several SAP software releases. You can browse Business objects and BAPIs in the SAP system using transaction BAPI.
RFM and BAPI are typically invoked synchronously. The caller initiates the RFM/BAPI call, the called system (typically a SAP system) executes the RFM/BAPI, and returns the results back to the caller. The SAP RFC protocol is used for RFM/BAPI invocation.
below links might give u more information.
/people/sap.user72/blog/2004/07/19/navigating-the-maze-of-integration
http://snvworld.net/StartPage/documents/integration/3.html
if it helps you reward with points and close the thread.
regards
venu.
‎2005 Sep 13 4:50 PM
Hi ravi,
RFM: RFC-enabled Function Module
A RFM is an ABAP function module (similar to function or subroutine in other languages) that can be remotely invoked. An RFM takes some parameters as input, and after execution, returns some output parameters. You can view a RFM in the SAP system via transaction SE37.
BAPI: Business Application Programming Interface
A BAPI is a method of a business object defined in the Business Object Repository (BOR). For example, in the BOR, you can find a business object called SalesOrder, which conceptually represents a sales order in the system. A business object typically has several methods that can be used to read, create, modify a particular instance of the business object, or list instances of the business object matching certain selection criteria. These methods are BAPIs. Technically, a BAPI is implemented using a RFM. But, unlike the non-BAPI RFMs, a BAPI is usually well documented, has nicer parameter names, and is supported by SAP for several SAP software releases. You can browse Business objects and BAPIs in the SAP system using transaction BAPI.
RFM and BAPI are typically invoked synchronously. The caller initiates the RFM/BAPI call, the called system (typically a SAP system) executes the RFM/BAPI, and returns the results back to the caller. The SAP RFC protocol is used for RFM/BAPI invocation.
below links might give u more information.
/people/sap.user72/blog/2004/07/19/navigating-the-maze-of-integration
http://snvworld.net/StartPage/documents/integration/3.html
if it helps you reward with points and close the thread.
regards
venu.
‎2005 Sep 13 4:52 PM
BAPIS are implemented as RFC enabled FMs. The difference to a "normal" RFC enabled FM is that a BAPI has to (should) adhere to certain development standards, like naming conventions, exception handling, commit handling and so on. Also official BAPIs from SAP are guaranteed to have a stable parameter interface and are supported.
If you develop your own functionality to use with a JCo call it is of less importance if the FM are registered AS BAPIs or not.
Some external tools reads the BAPI metadata though...
‎2005 Sep 13 5:29 PM
Hi,
this might help you.
http://help.sap.com/saphelp_erp2004/helpdata/EN/5c/f3f0371bc15d73e10000009b38f8cf/frameset.htm
http://www.sapgenie.com/abap/bapi/example.htm
regards,
venu
‎2005 Sep 13 7:55 PM
HI,
Thanks for your Repsonse, I see in the WEBLOG that was post sent in the earlier that :
"BAPIs are supported by SAP for several SAP software releases".
How are they Supported? Can i get a Better Understanding or can i get a link to any Document which can explain me the same. Does it mean that RFMs are not supported.
I have a couple of RFMs which work perfectly from JCo, but when i try to assign the RFM as a API method for a Business Object, it does'nt. It only works when i change some import parameters data types and remove exceptions etc .... Why is the BAPI definition stricter than RFM, even though both can be called externally doing the same JOB.
Thanks.
Ravi.
‎2005 Sep 14 6:53 AM
check this out
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/a5/3ec81b4ac011d1894e0000e829fbbd/frameset.htm">BAPI Programming Guide</a>
Regards
Raja
‎2005 Sep 14 3:34 PM
HI
I have a bunch of RFMs Developed for the functionality to be used from the JCo. Should i release them as BAPIs or just leave them as RFMs.
If i had to Deploy these RFMs or BAPIs onto VARIOUS SAP systems(totally different R/3 Installation) and then test my JAVA application. What are the Pros/Cons if i deploy them as RFMs or if i deploy them as BAPIs.Which is better?
Thanks
Ravi.
‎2005 Sep 14 6:57 PM
Hi Ravi,
I don't think you should worry yourself about this. As far as accessing from Jco is concerned RFC/BAPI are the same. Only added value I get from BAPI is that it guarantees a standard behaviour from SAP, e.g. If I am using BAPI_PO_CREATE, I am sure that it will create the PO in the same way regardless of the version of SAP Application (R3). The benefit I get is if with SAP newer versions, responsibility of making sure this BAPI (RFC for me) works with the new system is with SAP not with Me. But when we talk about custom developed RFC/BAPI, we can not expect that benifit. So if I do anything additional to register this RFC as BAPI, it is a waste of effort.
Cheers,
Sanjeev