Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The interface concept of the classic R/3 is based on two different strategies: Remote
Function Calls (RFC) and data exchange through IDoc message documents. RFC makes
direct and synchronous calls of a program in the remote system. If the caller is an
external program it will call an RFC-enabled function in R/3 and if the calling program is
the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3
program through a gateway-proxy (usually rfcexec.exe). 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.
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.
3.My EDI partner asks me to send data in EDIFACT format, can SAP do this?
SAP does not provide a conversion from IDoc to EDIFACT, ANSI/X.12 or other
classical EDI data exchange format. Conversion must be done by external converter
tools. These tools receive the IDocs from the R/3 instance via ALE, convert them to
EDIFACT etc. and forward the converted data to the receiver. There are numerous
converter tools available now. For a list of all SAP certified IDoc converter tools, you
may want to contact your SAP sales representative. The most advanced solutions will
make use of the IDocs converted to XML, as they are provided by R/3 standard from
realease 4.6 onwards. This will output IDocs to a file in XML. While this will not help
you in converting data into EDIFACT, it may be worth to ask your EDI partners, if they
really require EDIFACT (which in practice is seldomly pure EDIFACT but mostly an
adapted varaiant) or if they are satisfied in receiving an XML file with the proper IDoc
data.
What is ALE?
Application Link Enabling (ALE) is a set of business processes and tools that allow
applications on different computer systems to be linked. This can be done between
different SAP systems as well as between SAP and non-SAP systems.
In a single SAP system different applications are integrated via a single database (e.g.
finance, sales, production, human resources). However, many companies do not have just
one integrated system but a distributed environment with different applications running
on different systems. To run the whole business in such an environment, the distributed
applications have to be linked. This can be done through Application Link Enabling
(ALE).
ALE provides distributed business processes that can be used to link the applications on
different platforms. There are some ALE business processes delivered in the standard
SAP system. Furthermore, there are tools that can be used to change the existing ALE
business processes or to implement new distributed business processes.
Besides the business processes, there are special ALE services that are required to set up
and control a distributed environment. These services include a distribution model,
business object synchronization, and tools for monitoring or error handling.
ALE is a major part of SAP's Business Framework Architecture. Besides the basis
middleware, that provides the communication between components, and the interfaces
(BAPIs), ALE business processes and ALE services enable the cooperation of the single
components within the framework. That makes ALE the glue of the Business Framework.
With ALE, companies get the opportunity to improve business performance and to solve
organizational or technical issues by:
Besides the benefits of ALE there are also reasons not to distribute:
ALE should be used in a company if the benefits of ALE for this company outweigh the
reasons against distribution. For this you always need to carry out a company specific
investigation, in which you also should consider the culture of the company. ALE is good
for some companies, but not for all.
There are many such messages, the most common of these include a customer sending a
purchase order message to a vendor, or a vendor sending an invoice message to a
customer. Classic EDI is mainly restricted on the exchange of transactional data, no
master data or configuration data. In most cases, EDI replaces the transfer of paper copies
of these documents. Via the messages ALE business processes can be implemented
between business partners. The EDI messages also use the ALE services.
For the communication between different types of systems special EDI messages are
defined as standards for inter company communication. There are many standards for
these messages - in the United States, the ANSI X.12 standard is the most prevalent, in
Europe, the UN/EDIFACT standard is used. For sending EDI messages the information
has to be converted into an EDI standard. With SAP systems this is done by EDI
subsystems. This conversion is the only difference between EDI messages and other
messages used in ALE business processes. The processing of these messages on the SAP
System is the same as the processing of other ALE messages.
ALE business processes are integrated business processes that run across distributed
systems. This can be two different SAP systems, links between SAP and non-SAP
systems, SAP and Web-servers (Internet Application Components) or SAP and desktop
applications. The links between the systems may be loosely (asynchronous) or tightly
(synchronous) coupled. These business processes are release-independent and can run
between different release levels of the systems. Many SAP applications offer ALE
distribution processes, for example Master Data Replication, Accounting, Logistics and
Human Resources.
When distributed applications are linked by ALE business processes, the question often
arises as to how tight the link should be. Synchronous and asynchronous links have both
advantages and disadvantages:
• Synchronous links have the advantage that the sub-process on the server can
return values to the sub-process on the client that has started the link. Problems
with synchronous links occur if the communication line or the server is
temporarily not available. If this happens, the sub-process on the client can not be
finished (otherwise there would be data inconsistencies).
(Example: There is a logistics system and a financial system. Every stock
movement in logistics has to be posted in the general ledger of the financial
system. If the link between logistics and finance is synchronous, no stock
movement can be recorded in the logistics system if the communication line to the
financial system is down.)
Because of this, synchronous links are usually used if the client only wants to get
some data from the server and the sub-processes on the server do not have to
write any data to the database.
• With asynchronous links the sub-process on the client can be finished even if
the communication line or the server is not available. In this case the message is
stored in the database and the communication can be done later. The disadvantage
of asynchronous links is that the sub-process on the server can not return
information to the calling sub-process on the client. A special way for sending
information back to the client is required. In addition, a special error handling
mechanism is required to handle errors on the receiving side.
Asynchronous links are used if a synchronous link is not applicable. For the
problems with sending return information to the client and with error handling
there is some support from the ALE services.
Why does SAP use ALE instead of database replication or distributed databases?
There are various procedures for processing IDocs in a serialized way, that is to process
them or transfer them to the application in a certain sequence. Depending on your
respective requirements, one of the methods proposed in note 752194 may be suitable for
the required purpose.