Sunteți pe pagina 1din 20

ABAP Proxies

What is an ABAP Proxy?

• A Proxy is an executable interface that is


generated for a target application language.

• The target Application language can be ABAP or


JAVA. When it is ABAP, the proxy would be
known as an ABAP Proxy.

• An ABAP proxy is basically an interface, which is


used to establish communication between SAP
and a third party, via a PI Channel and is
generated on the Application server using
transaction SPROXY.
Types of ABAP Proxies

Depending on the direction of flow of data, Proxies


are categorized into below two categories:

• Client Proxy : If a Proxy is used for transfer of


data from ABAP end, the proxy is called Client
Proxy or an Outbound Proxy.

• Server Proxy: If a Proxy is used for transfer of


data to ABAP end, the proxy is called Server
Proxy or an Inbound Proxy.
Working with Proxies

For working with Proxies, we require an SAP PI


Server, which needs to be configured with the
SAP ECC Server by a BASIS Consultant. It
would be possible to activate a Proxy, only when
the configuration is complete.

In the next slides, we would discover how to


actually Generate and Activate an Inbound
Proxy as well as an Outbound Proxy.
Working with Proxies
Below are the steps to Generate and
Activate a Proxy, which are common to
both Inbound and Outbound Proxies:
First of all, a PI Channel has to be created
in PI Server by a PI Consultant. Once it is
created, it is visible in ECC in Transaction
SPROXY.
The path to be navigated to is :
Source → ESR → SWCs →
TRIDENT_SAPECC TRIDENT_SAPECC
741 of trident → Namespaces → ECC
Name of the Proxy ( as given by the PI
Working with Proxies
Working with Proxies

Once the given


name is found,
navigate as per
the below path:
ECC Name of
the Proxy →
Objects.
Working with Proxies
A Proxy has three
objects:
• Data Types: The
structures involved for
data transfer.
• Message Types: The
data transfer type,
which determines
whether the Proxy
would be Inbound or
Outbound.
• Service Provider: The
service provider for
data transfer, which
provides Classes to
Working with Proxies

Right click
the
Service
Provider
and select
Generate
Option.
Working with Proxies

Next, it will
ask for a TR
and a Prefix.
Enter the
Package, TR
and prefix,
click on
Continue,
and then
Activate the
Proxy.
Working with Proxies

The given screen


would be
displayed.
Here, Z is the
Prefix we
entered and ZII
means the Proxy
is Inbound ( an
Outbound Proxy
would have
ABAP Name
beginning with
ZCO ).
Working with Inbound Proxies

To code in the Inbound Proxy, double click on


the Implementing Class and then double click on
the SI Method.
Working with Inbound Proxies
You will get a
screen to write
ABAP Code.
This is where
you need to
write the code
which will be
executed, once
this Inbound
Proxy is called
by PI Team.
Working with Inbound Proxies
You need to
declare an
internal table
and/or a work
area to get the
data brought in
by the Proxy,
corresponding
to the data
objects of the
Proxy.
Working with Outbound Proxies
Given is the
screen
generated for
Outbound
Proxy.

Calling an
Outbound
Proxy through
a program is
illustrated in
the next slide.
Working with Outbound Proxies
Create an Object of the generated Class,
declare an internal table of the table type of
the Proxy, and also a variable of the
Message Type of the Proxy, as shown
below.
Working with Outbound Proxies
Create an Object of the generated Class,
declare an internal table of the table type of
the Proxy, and also a variable of the
Message Type of the Proxy, as shown
below.
Working with Outbound Proxies
Populate the internal table to be passed to
the Proxy, and call the Proxy methods to
send the data, as shown:
Points to be Noted:

1. Proxy Development in ECC Side can be done only


when the ECC-PI Configuration is up to date and PI
related Development is complete.
2. Proxy generated data types cannot be changed
from ECC Side directly. The Proxy needs to be
regenerated, and then changes done, if any would
automatically reflect in the data types.
3. For Outbound Proxy related reference, use Tcode
ZHRFTP or ZPP006.
Thank You!!

S-ar putea să vă placă și