Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Whats the Advantage of BAPI compared to Function Modules?

Former Member
0 Kudos

hi,

Whats the Advantage of BAPI compared to Function Modules? Can any one ples explain with an Example.

Thanks

Avi......

Message was edited by:

Avinash Menon

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Well BAPI are almost similar to function module. One fo the differences between them is that BAPI arent meant to be modified. Once SAP releases a BAPI, its very rare that the signature or its functionality is modified whereas in FCs the code or signatuer can be modified with every relaese.

I hope it helped you

regards

Puru

6 REPLIES 6

Former Member
0 Kudos

Hi,

Well BAPI are almost similar to function module. One fo the differences between them is that BAPI arent meant to be modified. Once SAP releases a BAPI, its very rare that the signature or its functionality is modified whereas in FCs the code or signatuer can be modified with every relaese.

I hope it helped you

regards

Puru

uwe_schieferstein
Active Contributor
0 Kudos

Hello Avinash

BAPIs are technically nothing else but RFC-enabled function modules meaning that they provide us with external access to the SAP system.

However, BAPIs are more than "normal" RFC-enables function modules in that they generally access SAP business objects (like customer, sales order, etc.).

Usually, a BAPI corresponds to a certain dialog transaction dealing with a SAP business object (e.g. BAPI_USER_CREATE -> SU01 to create SAP users).

BAPIs and dialog transaction have in common that they both validate the incoming data very carefully.

For example, you may find a function module that allows you to create a user (SU01) with a wrong title. Althouth this is a minor fault you will get error messages as soon as you want to change this user using transaction SU01. The BAPI BAPI_USER_CREATE will not create a user with a wrong (i.e. not customized) title, like the dialog transaction.

In which scenarios do you use BAPIs? Most obviously, if you have to access a SAP business object but cannot use dialog.

More generally speaking, if you have either a BAPI or a normal function module which gives you the appropriate access to the business object always choose the BAPI because, as already mentioned, the interface of a BAPI is promised by SAP to be stable over several releases.

Regards

Uwe

ferry_lianto
Active Contributor
0 Kudos

Hi Avinash,

In simple words.

BAPI - > used to communicate between SAP and NON SAP system.

Function Module -> Communicate only within SAP system

Th advantages of BAPI:

1. Simple to use (its just an FM)

2. Not cumbersome like bdc

where we have to record each and every screen

sequence.

3. SAP guarantees the consistency

of bapi in future releases.

One of the big plusses for BAPIs is that the interface and function are not supposed to change. This is a big plus when you do upgrades or hot packs because the transaction can change (format, required inputs etc) which means you then need to update the call transaction.

Some of the BAPIs are better documented and easier to use than others.

You usually need to perform the BAPI that actually does the COMMIT after you call your BAPI.

The Program coding for calling a BAPI is usually cleaner than setting up the screen flow etc for the Call Transaction.

You don't need to worry about special data circumstances interrupting the normal data flow of the screens and causing errors because of that.

BAPIs probably have better performance since they don't do the screen flow processing.

In general if the BAPI exists for the transaction you want to perform and you can figure out how to use it the BAPI is probably the best way to go.

Also please check this link for more information on advantages of BAPIs.

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5e11dc4a1611d1894c0000e829fbbd/frameset.htm

Hope this will help.

Regards,

Ferry Lianto

former_member404244
Active Contributor
0 Kudos

Hi,

go through the below link.

/message/2711273#2711273 [original link is broken]

Regards,

Nagaraj

Former Member
0 Kudos

BAPI stands for Business API(Application Program Interface).

A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..

You can make your function module remotely enabled in attributes of Function module.

A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).

Please check out this thread..

Also refer to the following links..

www.sappoint.com/abap/bapiintro.pdf

www.sap-img.com/bapi.htm

www.sap-img.com/abap/bapi-conventions.htm

www.planetsap.com/Bapi_main_page.htm

www.sapgenie.com/abap/bapi/index.htm

Checkout !!

http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html

http://techrepublic.com.com/5100-6329-1051160.html#

http://www.sap-img.com/bapi.htm

http://www.sap-img.com/abap/bapi-conventions.htm

http://www.sappoint.com/abap/bapiintro.pdf

Java Connector(JCO) can call not only BAPI's but also the function modules which are remotely enabled. BAPI's as i said earlier are remotely enabled function modules. Hence, JCO can call also BAPI's(n not only BAPI's as u mentioned).

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Former Member
0 Kudos

hi,

BAPI:

The data entered in the Internet is transferred to the R/3 System via BAPIs (Business Application Programming Interfaces).

Data in the R/3 System is accessed via BAPIs as well.

BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.

Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.

In other words: A BAPI function is a function module that can be called remotely using the RFC technology.

http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm

hope this helps!!!