You are on page 1of 7

ABAP Proxies in XI(Client Proxy)

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1387

The other way of interfacing XI is through proxies. From WAS 6.20, proxy generation feature enables application
systems to communicate with XI using proxies. Proxy generation enables you to create proxies in application
systems. Proxies encapsulate the creation or parsing of XML messages and the communication with the relevant
runtime components required to send or receive the messages.

There are two types of Proxies.

1. Java Proxies.
2. ABAP Proxies.

Java proxies are used when java applications needs to send and receive data and ABAP proxies are used when ABAP
applications needs to send and receive data. I am going to demonstrate a simple client proxy which sends the
employee data to XI and it routes the information to a file.

We use two clients of XI here. Client 100 acts as XI server .Client 105 acts as a client ABAP proxy which sends
employee information as a message to XI which routes the info to a file. Logical flow is depicted as shown below.
Note that conversion of sending system format to XI specific format is not done at the outbound side of the XI server.

Demonstration of ABAP Proxy


Necessary integration repository objects are developed at the design time. The out bound client proxy message
interface and message type is depicted as shown below.
After the message interface is developed in the integration repository, proxy is generated on the client 100 using
SPROXY transaction. SPROXY transaction lists all the message interfaces in the integration repository. We have to
choose our message interface Proxy_Interface_OB and click Create.

ABAP proxy will generate 3 objects :

1. ABAP Class ( ZBLOGCO_ Proxy_Interface_OB).

2. Structure for the message type in ABAP Data Dictionary (ZBLOGEMP_PROFILE_MSG).

3. Structure for the data type in ABAP Data Dictionary (ZBLOGEMP_PROFILE_DT).


Once the proxy objects are activated we can check the ZBLOGCO_Proxy_Interface_OB in the SE24 editor. Since the
proxy message interface is asynchronous the ZBLOGCO_ Proxy_Interface_OB has EXECUTE_ASYNCHRONOUS and
message type ZBLOGEMP_PROFILE_MSG as the importing parameter. With this proxy generation is over.

We need to develop an ABAP Report in 100 client to trigger a client proxy. The following report is executed in the
SE38 Editor for triggering an ABAP Proxy request from client 105.

*&---------------------------------------------------------------------*
*& Report ZBLOG_ABAP_PROXY
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT zblog_abap_proxy.

DATA prxy TYPE REF TO zblogco_proxy_interface_ob.


*
CREATE OBJECT prxy.

DATA it TYPE zblogemp_profile_msg.

TRY.
it-emp_profile_msg-emp_name = 'Sravya'.
it-emp_profile_msg-empno = '80101'.
it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.

CALL METHOD prxy->execute_asynchronous


EXPORTING
output = it.
commit work
.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.

Receiver adapter configurations should be done in the integration directory and the necessary sender/receiver
binding should be appropriately configured. We need not do any sender adapter configurations as we are using
proxies.
Triggering ABAP Proxy
We can trigger the ABAP proxy by logging into client 105 of XI server and executing the ABAP report through SE38
editor. Once the report is executed we can see the file on the XI server and contents of file by double clicking the file.

I hope this blog will be useful for trying out real time applications on ABAP Proxies.
Ravikumar Allampallam is working as a NetWeaver Consultant in the SAP NetWeaver Competency Group of Wipro
Technologies.

Add to: del.icio.us | Digg | Reddit


ABAP Proxies...Get a hang of it!
Comment on this weblog

Showing messages 1 through 22 of 22.


Titles Only Main Topics Oldest First
• how to connect these two clients
2007-06-04 05:44:58 Rohit Goel Business Card [Reply]

hi,

i want to know that how we will connect these two clients 100 and 105 to make communication possible.

• Grt Blog
2007-05-27 23:02:33 Subhendu Sahu Business Card [Reply]

Dear Ravi,
Grt Grt blog.... Cant be better.
Regards,
Subhendu

• HOW TO PUSH DATA FROM SAP DATA BASE TO XI


2007-04-17 07:35:53 sandeep bodapati Business Card [Reply]

HAI RAVI,

can u tell me how we push data from sap,

r we going to use any rfc.

in case of idocs we can trigger them.

in this case what is the procedure.

regards

sandeep

• sender system
2007-03-30 09:33:03 Fadel Taha Business Card [Reply]

Thanks for this blog.


Do we have to create then sender service NAJ_105 in sld with the product and swc or do we have to create it
in IR.
How does XI know which service is sending the message by proxy.

• SAP (ABAP Proxy) ---> XI ---> File System (File Adapter)


2007-02-16 05:02:35 Ashish Goyal Business Card [Reply]

Dear Ravi,

When I try to create proxy for the interface defined in XI using sproxy in IR, by right clicking on the Outbound
interface, it asks me for inputing the Package name???

Please advice...

Also how do I check if my SAP is on WEB AS 6.20 or above or not.

Regards,
Ashish

• SAP system instead of using client 105 of XI


2007-02-15 10:00:53 Ashish Goyal Business Card [Reply]

Dear Ravi,

If I have scenario with SAP (ABAP Proxy) ---> XI ---> File System (File Adapter)
would your code and the procedure remain the same?

Regards,
Ashish

• Abap Proxy not function


2005-08-24 07:09:21 Sergio Oliveira Business Card [Reply]

Hi,Ravikumar

I am trying to do with that a program abap sends data for SAP XI. I got to create the proxy of the type OUTBOUND
and SYNCH in my R/3. I am using your program as template. When I execute the report abap, error message doesn't
appear and nor of success, appears only an empty screen.

During the debuging of the program, we found that exit XML is not well formatted.

The program abap that I am using proceeds

REPORT zco_teste_xi_abap_proxy_out.
DATA prxy TYPE REF TO zco_mi_teste_xi_proxy_out.
*
CREATE OBJECT prxy.
DATA it TYPE zzmt_teste_xi_proxy.
TRY.
it-z_mt_teste_xi_abap_proxy-empname = 'Sravya'.
it-z_mt_teste_xi_abap_proxy-empno = '80101'.
it-z_mt_teste_xi_abap_proxy-departmentname = 'NetWeaver'.

CALL METHOD prxy->execute_synchronous


EXPORTING
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY

You might also like