Anda di halaman 1dari 4

Proxies in SAP

What are Proxies?

Proxies are executable interfaces that are generated for the target application language like ABAP/JAVA.

Proxy model represents a new programming paradigm for SAP systems, and is important element of Enterprise Services Architecture.

Proxies separate Business Application Logic from the Integration logic of the Exchange Infrastructure.
Proxies bypass the adapters and provide adapter less communication with the JAVA/ABAP business systems in landscape.
Proxies are generated from the WSDL description of interface objects and have same attributes as message interface. There are ABAP and
JAVA proxies available.

I.e. Direction: Inbound, outbound.

Mode : Synchronous, asynchronous.

Java proxies are generated from the WSDL description of the interface in the Integration Repository, and are stored with .jar file extension. This
archive consists of generated java classes corresponding to the integration objects.
ABAP proxies are generated on the application server side with transaction SPROXY, based on the WSDL representation of the message
interface. The generated objects depend on the mode and direction of the message interface.

Prerequisites

For ABAP Proxies the application system should have Web AS 6.20 and XI2.0 add-on.

Along with this, the following configurations are required on the application side to enable the proxy connection:-
1. TCP\IP Connections
1.1 LCRSAPRFC :- To connect to IR and get information of interface Objects

1.2 SAPSLDAPI: - To connect to SLD and get the Business System Information
2. HTTP Connection

PI_INTEGRATIONSERVER:- Used to send the message to Integration Server

3. Configuring the local integration engine

For Java Proxies SAP J2EE Engine above SP5 is necessary, on this SAP J2EE engine we need to install Java Proxy Runtime (JPR) along with
Messaging System (MS), which provides services like messaging, queuing, and persistency of XI messages.

In order to compile the java proxy source code we need the following list of libraries, which are located at non-central Adapter Framework
Installation.

1. aii_proxy_xirt.jar
2. aii_msg_runtime.jar
3. aii_utilxi_misc.jar
4. guidgenerator.jar

ABAP Proxies

ABAP Client Proxy

ABAP client proxies are generated from outbound message interface, and are used to send message from SAP WAS to XI. Client proxy
generation creates an ABAP class with the method EXECUTE_SYNCHRONOUS/ EXECUTE_ASYNCHRONOUS depends on the mode of the
interface. Along with the class it also generates structures and table type with the specified name prefix. The maximum length of 30 characters
is allowed while allotting names for the generated objects.
ABAP Server Proxy

ABAP server proxies are generated from inbound message interface. Server proxy generation creates an interface along with the
implementation class. The business functionality is defined in the implementation class. Upon receipt of a message, the ABAP proxy runtime
calls the method EXECUTE_SYNCHRONOUS of implementing class (in asynchronous communication EXECUTE_ASYNCHRONOUS).

JAVA Proxies

Java Client Proxies Java client proxies are generated for outbound message interfaces in order to send messages from J2EE application to
SAP XI. Java proxy generation generates all the Java classes necessary for a client proxy: the EJB 2.0 bean class, home and remote
interfaces, local home and local interfaces, as well as Java classes for the data types used.
The proxy beans, classes generated by Java proxy generation, need to be deployed in the SAP J2EE Engine together with the Java application
that invokes the proxy. The application program should be included in the EAR project that contains the bean, proxy classes. However, the
generated classes are dependent on the classes of the Java proxy framework.

Java Server Proxies

If the message needs to be sent from the Integration Server to a Java application, Java Server proxies are used; actually Server Proxies are
generated for inbound message interfaces using the Integration Builder tool.
In case of server proxies, along with the server proxy interface and proxy classes of data types, the implementation class is generated that
implements the server proxy interface, this is the place where we write our application logic.

Note: In order to define the dependencies between EJB applications (for both Server and Client proxies) application-j2ee-engine.xml of the
EAR project needs to be edited.

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).
How to create proxy.
http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
How to Activate Proxy.
How do you activate ABAP Proxies?
ABAP Server Proxies (Inbound Proxy)
ABAP Server Proxies
OutBound Proxy (Client Proxy)
Smarter Approach for coding ABAP Proxies
ABAP Proxies in XI(Client Proxy)
File to R/3 via ABAP Proxy with good example
File to R/3 via ABAP Proxy
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
Synchronous Proxies:
Outbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-
%2bpurchase%2border%2bsend
Inbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-
%2bsales%2border%2bcreation
go thru the weblog How do you activate ABAP Proxies? which explains how to activate proxies
Check this for Use Of Proxies
Choose the Right Adapter to integrate with SAP systems
Hope this is useful and clears your doubts