Interface Knowledge
Interface Knowledge
Interface Knowledge
One system with which XI is going to communicate will definitely be the SAP system (SAP R/3 - 4.6C, 4.7, ECC 5.0, CRM, SRM, etc). Now
these systems could be on the sending side or on the receiving side or could be on both sides where R/3 is integrating with SRM / CRM .... or
vice versa.
Now, the options that SAP gives us to communicate with SAP systems.
1. IDOC Adapter
2. RFC Adapter
3. Proxy
- Use Proxies only if the WAS version is >= 6.20. Use Proxies only if the WAS version is >= 6.20. (SAP Web Application Server 6.20,)
We will also look into other reasons where we should go for a proxy.
In this case, there are 2 ways in which the implementation can happen.
1. Configure a RFC Adapter and call the BAPI / RFC. However the potential problem that I could see is that the RFC adapter existing on the
Java stack communicating with the BAPI existing on the SAP application system.
2. The second option that I have got is to write a proxy on the SAP application system (which will be called by XI) and internally the proxy will
call the BAPI.
At this point of time if your question is, as long as I am dealing with the latest versions of SAP systems, should I totally avoid using RFC
Adapters - MY TAKE on this would be, YES. Do NOT use RFC Adapter, rather go ahead and use the proxy.
However, the problem could be that the pre-built meta data and the mapping that SAP delivers might not be useful as the BAPI is wrapped with
a PROXY now. But as the proxy is also expected to have the same message interface as that of the BAPI, we might still be able use the pre-
defined mapping. This is something that we need to try out and then decide how do I go about this interface.
But for whatever reasons, if you are not getting advantage of the pre-defined integration content, PROXY is the way to go.
Now, if you are dealing with SAP systems < 6.20, we do NOT have choice of PROXY anyway, so go ahead and use a RFC adapter.
Now, as far as the IDOC adapter is concerned I think the choice would be straight forward. Where ever there is a standard IDOC given by SAP
(usually mapping also will be delivered for SRM / CRM system integrations), so go ahead and use the same.
The questions that you might be having now is that for a standard object if I have an IDOC as well as a BAPI, which one do I go for.
My opinion would be its going to be dependent on the specific scenario that you are trying to develop. We can think of multiple variations of
design for this case.For Example
4. Avoid making multiple calls to the same BAPI / RFC, rather have a wrapper BAPI and send all the records in one time.
5. Use the PROXY and send all the data in one shot and make single calls to the BAPI from the PROXY on the application system -
only if you can use PROXIES.
The biggest advantage of the proxy is that it always by passes the Adapter Engine and will directly interact with the application system and
Integration engine - so it will and should give us a better performance.
So, there are the choices that you have while designing a SAP interface, so take a close look at the interface and identify your priorities for the
interfaces. The parameters could be something like PERFORMANCE, ERROR LOG, AUDIT LOG, MONITORING OF THE TRANSACTIONS
INDIVIDUALLY. Do a comparison of the pros and cons of the choice of adapters that you have for the parameters for the specific interface and
then make a call.
Initially, it might look alike - what's the big deal, it's a simple case of sending / receiving data from SAP - especially if you are coming from R/3
world, but believe me, you have got good chances of landing up in trouble, if you don't take care of your priorities of the interface.
Could any one tell me why we some time use BAPI, and some times use RFC and some times use IDOC while
communicating with the SAP systems.
Is there any differences while using the same.
RFC and BAPI are same as per the technical point of view both are remote enabled function module..
BAPI is provided by SAP while RFC is created by a developer..
IDoc is another proprietary technology of SAP for exchnaging messages .
Difference lies here :
1. For RFC/BAPI you need to use RFc adapter while for IDoc you need to use IDoc adapter..
2. For RFC you need to create RFC destinations not for Idoc
3. For Idoc you also need to manage Partners Profiles..inn R3..
These are few differences in using RFC/BAPI and Idoc...not the only ones..
RFCs are used when the caller and the called function module run in the same system.
In the SAP system, these functions are provided by the RFC interface system. The RFC interface system enables
function calls between two SAP systems, or between an SAP system and an external system.We get information in
response to RFC no functional acknowledgement will b received.
IDOC is just a predefined structure like where in u would post them to your peer in distributed environment.As a
response u can get functional acknowledgement for the IDOC which is being sent.
RFC is used when we need to get the details from the Rs system.
For example you have a company number coming from the file and you need to get the company information from
R3 system for that company number that time you use the RFC. SO you send a request to R3 system and you get
the response back from R3 system to XI.
As said IDOC is async its intermidiate doucments which has the predetrmined strucutre and which holds data for
transfer between systems.
This blog describes the steps involved in Inbound/server Proxy Development.
ABAP Proxies
IDOC is good if its a standard IDOC, so that you don't have under go the pain doing the modifications for the custom
one.
In your case, PROXY might make more sense as you are saying that you have to do some custom processing as
well. So, you can call the BAPI / Function for the standard processing and then do the custom processing in your
Proxy code. And more over, if you have want to have a Synch interface, then you cannot use IDOC.
So, the options in this case boil down to PROXY / RFC.
PROXY will definitely have the advantage as its going to bypass the adapter engine and directly interact with the
Integration server. And moreover, even if you already have a RFC, you can always call that inside your PROXY.
However, the only flip side here compared to IDOC, is that you will have to create all your IR objects manually.
XI sends an IDOC to SAP. IDOC is processed at a later stage. Now a response is sent out to XI ( I think only ALE
audit is out of the box for acknowledgements. ) Now XI reads the original message which was sent to SAP and the
ALE audit message and then builds a response message to the Original Sender
Ans : Let take the case of a ORDERS IDOC, that you are sending to your business partner. Now, in this case if you
get a technical acknowledgement (ALEAUDIT) that the IDOC has been delivered. Now, ideally the business partner
should have configure an IDOC ORDRSP (Order Acknowledgement) to let you know that he has recieved the order
and everything is fine with the data. This is at a functional level.
Apart from this I am not aware of any other options. XI cannot read the IDOC from the target system as you are
expecting, unless the target system initiates the same.
Synchronus data processing is that in which the program calling the update task waits for the update work process
to finish the update before it continues processing.
In Asynchronus update the callng program does not wait for update work process to finish the update and
continues as normal.
Synchronous Update : This means say if u have 10 records to update and the processing is going on in a loop the
Synchronous update will wait till each update is actually done in the data base and then it will move on the next
record's updation.
Asynchronous : In This mode, the updates are lined one after the other and the system doesn't wait for the updates
to actually happen. These updates are then triggered by an internally scheduled job which then actually updates the
data in the databse.
Adapters are part of the Adapter Framework. Adapters provide the technical connectivity to enable the integration of
SAP and non-SAP applications through XI’s Integration Engine.Again, Adapters are used for connectivity from and
to external systems with XI that cannot communicate via proxies. Adapters are only required in SAP systems older
than 6.20 and external systems.
Systems based on 6.20or higher can communicate directly with proxies.
Proxies
The literal definition of a proxy is an object / process authorized to act for another; an agent or a substitute. In
simpler terms, proxies in the XI context are objects used to encapsulate the creation (from a sender system) or
parsing of XML (at a receiver system) as well as the communication with the relevant runtime components required
to send or receive those messages.
Proxies are generated from Message Interface in IR.
The Proxy Runtime controls these objects / processes, and can itself be controlled by the applications it
communicates with. The Proxy Runtime currently has the following components available: 1. ABAP Proxy Runtime –
Communication using XI or Web Services a. Web Service Runtime 2. Java Proxy Runtime – Communication using
XI (J2EE) The objects that the Proxy Runtime then controls are created via Proxy Generation, for both ABAP and
Java. In the following sections a ‘client’ proxy is used by an application to send messages outside of the system it
resides in (normally to the IS in this context). Conversely, a ‘server’ proxy is used by an application to receive
messages from sources outside itself (again, normally the IS in this context).
Proxies are interfaces which will get executed in the application system. They can be created only in the system
from message interfaces using the proxy generation functions. You can use proxies for systems with WAS >=6.20
XI will communicate in native language with SAP systems via proxies. Proxies uses XML - SOAP based
communication for both ABAP and Java Proxies.
mainly we go for proxies for adapters less communicaton there
Client Proxy: Proxies created out of Outbound message Interfaces.Here XI is receiving some information and is
acting as a client.
Server Proxy : Proxies created out of Inbound message Interfaces.Here XI sends the information to some other
system acting as the Server.
we can create the ABAP proxy in ABAP workbench.
Use
Using ABAP the proxy generation function you can generate ABAP proxy objects to an SAP system from an
interface description in the SAP Exchange Infrastructure Integration Repository.
Prerequisites
ABAP proxy objects can only be generated for SAP systems that are based on SAP Web Application Server
6.40.The proxy generation retrieves the WSDL description of the interface from the Integration Repository using
HTTP. The address of the appropriate server is taken from the exchange profile (parameters 1, 2, and 3 u2013 see
below). Queries to the Repository are subject to authentication. The user and password for these queries are also
taken from here (parameters 5 and 6). Information used to navigate from the ABAP Proxy Generation to the initial
page of the Integration Builder is also taken from the exchange profile (parameters 1, 2, and 4).