Bapi’s/Idoc’s : an
overview
Mandeep Pal Singh
Bapi’s/idoc’s : an overview
• The keywords in this presentation is going to be rfc, bapi, idoc, function
module, interface. And our discussion would revolve around these
terms.
•
BAPI as you know is an acronym for business application
programming interface. Library of functions provided by SAP for public
to do interface with SAP.
• BAPIs (Business Application Programming Interfaces) are open,
business orientated interfaces for accessing R/3 business processes
and data from external systems.
• In the Business Object Repository BAPIs are defined as methods of
SAP Business Objects. They provide an object orientated view of R/3
application modules.
Bapi’s/idoc’s : an overview
Advantages of Using BAPIs
• Business Standard
• Standards Conformance
• Stability and Downward Compatibility
• Object Orientation
Bapi’s/idoc’s : an overview
What is rfc then ????
• An RFC is the means by which the business object represented by
a BAPI is implemented. RFC is a protocol.
• rfc is based on cpi-c protocol
• If you are familiar with web developments , then we can safely say
that rfc is http and bapi is cgi application
• For functions to be called from outside, they are to be tagged as rfc
in SAP development workbench.
Bapi’s/idoc’s : an overview
• Comparision of bapi with bdc
• Reduction in Development effort
• Reduction in effort during upgrade
• Improved performance and maintainability
• BAPIs can be called using object-oriented interfacing technologies,
such as COM/DCOM, JCO thus enabling software components from
SAP and third parties to interact freely.
• The Program coding for calling a BAPI is usually cleaner than setting
up the screen flow etc for the Call Transaction or you popularly call
bdc method.
Bapi’s/idoc’s : an overview
How does bapi looks
• A BAPI interface is defined by:
• Import parameters
• Export parameters
• Import/export (table) parameters
Bapi’s/idoc’s : an overview
Problems with bapi
• The target system has to be online to work with BAPI.
• Programming knowledge is required to work with BAPI.
Bapi’s/idoc’s : an overview
• IDOC = Intermediate Document
• IDOC is simply a data container used to exchange information
between any two processes that can understand the syntax and
semantics of the data.
• It is a data container (ASCII file format) used to exchange the
information between any two systems.
• Each IDOC has its own unique identity number (within a client).
• IDOC’s are stored in database (table EDID4) as simple flat files
with lines of text, where the lines are structured into data fields.
• IDOC are EDI standard of R/3.
Bapi’s/idoc’s : an overview
• You need the IDoc interface in the following scenarios:
· Electronic data exchange (EDI)
· Connect other business application systems (e.g. PC
applications, external Workflow tools) by IDoc
· Application Link Enabling (ALE).
Bapi’s/idoc’s : an overview
Difference between ALE and EDI
• 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.
• 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.
Bapi’s/idoc’s : an overview
BAPI & IDOC : a comparison
• If there is no SAP standard IDoc available for your requirement, it's
harder to create a customized IDoc than a customized BAPI.
• 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.
• Error handling better in IDOC.
• No programming required in idoc. Just need to set up the
configurations
• You can tell if your sending was successful or not
• Sending to/processing on the other side is immediate
Bapi’s/idoc’s : an overview