‎2008 May 22 6:59 AM
‎2008 May 22 7:33 AM
Hi ,
BAPI is RFC function module using a business objects used to create ,generate standard orders, purchase order ,material ,get data .
Idocs are intermedicate container which gets filled either a Function module or Z report .
Idocs contained segments which are attached to basic type which is like a structure into sub structures .
There is Message type linked to Idoc type indicating type of transaction or type of data .
[idoc and bapi|http://abapprogramming.blogspot.com/2007/08/difference-between-idocs-and-bapi.html][difference between idoc and bapi|http://www.sap-img.com/fu033.htm]
Please reward if useful.
‎2008 May 22 7:33 AM
hi,
refer to the following link
http://sapsdforum.com/2007/12/28/what-is-the-different-between-ale-idoc-and-bapi/
reward if useful,
thanks and regards
‎2008 May 22 7:38 AM
IDocs and BAPI are very different, so it should be easy to choose between them depending on your requirements.
IDOCS
Advantages
System can work even if target system not always online. The IDoc will be created and sending will just continue once you get connected to the other system.
No additional programming required. You just need to set up the configuration.
Disadvantages
Receipt/processing on the target system may not be immediate.
The sending system has no way to know whether the target system actually received what you sent (unless you use ALE).
If there is no SAP standard IDoc available for your requirement, it's harder to create a customized IDoc than a customized BAPI.
BAPIS
Advantages
You can tell if your sending was successful or not
Sending to/processing on the other side is immediate
Easier to create your own BAPI than your own IDoc
Disadvantages
Will only work if you have an active online connection.
Some programming required to call the BAPI.
Others interface methods you might also want to consider are ALE and RFCs.
Have a look at below links:
[BAPI and ALE-IDOCs|http://sapabap.iespana.es/sap/faq/ale_idocs_bapi.htm]
[Idocs and BAPIs|http://searchsap.techtarget.com/generic/0,295582,sid21_gci1089362,00.html]
[BAPI vs IDOCs|http://www.saptechies.com/difference-andor-similarities-between-bapi-and-idocs/]
I hope it helps.
Best Regards,
Vibha
Please mark all the helpful answers
‎2008 May 22 8:21 AM
Hi,
BAPI
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.
BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.
IDOC
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
The philosophical difference between EDI and ALE can be pinned as follows: If we send data to an external partner, we generally speak of EDI, while ALE is a mechanism to reliable replicate data between trusting systems to store a redundant copy of the IDoc data. The difference is made clear, when we think of a purchase order that is sent as an IDoc. If we send the purchase order to a supplier then the supplier will store the purchase order as a sales order. However, if we send the purchase order via ALE to another R/3 system, then the receiving system will store the purchase order also as a purchase order.
Regards,
Bhaskar
‎2008 May 22 8:24 AM
hi,
IDocs (Intermediate Documents) are the crux of ALE. These are the documents with the help of which data is exchanged between SAP R/3 and non-R/3 systems. As the name suggests, these documents act as intermediate storage of information, which can be sent bi-directionally. Message types are responsible for creation of Idocs.
An IDoc is made up of the following parts:
Control Record: This section contains control information regarding the Idoc. Its constituents are Senderu2019s name, Receiver name, Message type and Idoc type . The format of the control record is similar for all IDoc types.
Data Segment: It consists of a header that contains the identity of the Idoc. Its constituents include, a sequential segment number, a segment type description and field containing the actual data of the segment.
Status records: The status record shows the information regarding the already processed stages and remaining processing stages of the Idoc. It has an identical format for each IDoc type.
BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces. They play an important role in the technical integration and in the exchange of business data between SAP components, and between SAP and non-SAP components. BAPIs enable you to integrate these components and are therefore an important part of developing integration scenarios where multiple components are connected to each other, either on a local network or on the Internet.
BAPIs allow integration at the business level.
pls reward if helpful.