Sunteți pe pagina 1din 10

Blogs

ABAP Proxies in XI{Client Proxy)


The other way of interfacing X! is through proxies. From WAS 6.20, proxy generation feature enables application systems to
communicate with X! using proxies. Proxy generation enables you to create proxies in application systems. Proxies encapsulate the
creation or parsing of XNL 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. ! am going to demonstrate a simple client proxy which sends the employee data to X! and it
routes the information to a file.

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

view blogs by: Nost Recent { Topics { Podcasts { Top Blog Posts { Active Bloggers

ABAP Proxies in XI{Client Proxy)
Ravikumar Allampallam
Business Card
Company: Wipro Technologies
Posted on Nar. 1+, 2005 03:56 AN in SAP Exchange !nfrastructure (X!)
Subscribe
Print
Permalink
Pagina 1 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387Iecha:19/03/2007




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_!nterface_OB and click .



ABAP proxy will generate 3 objects :

1. ABAP Class ( ZBLOGCO_ Proxy_!nterface_OB).

2. Structure for the message type in ABAP Data Dictionary (ZBLOGENP_PROF!LE_NSG).

3. Structure for the data type in ABAP Data Dictionary (ZBLOGENP_PROF!LE_DT).

Pagina 2 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007


Once the proxy objects are activated we can check the ZBLOGCO_Proxy_!nterface_OB in the SE2+ editor. Since the proxy
message interface is asynchronous the ZBLOGCO_ Proxy_!nterface_OB has EXECUTE_ASYNCHRONOUS and message type
ZBLOGENP_PROF!LE_NSG 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.

Pagina 3 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007


Receiver adapter configurations should be done in the integration directory and the necessary senderfreceiver 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 X! server and executing the ABAP report through SE38 editor. Once
the report is executed we can see the file on the X! server and contents of file by double clicking the file.


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

Pagina 4 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007



! 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 itl
Comment on this weblog
SAP (ABAP Proxy) ---> X! ---> File System (File Adapter)
2007-02-16 05:02:35 Ashish Goyal Business Card [Reply|

Dear Ravi,

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

Please advice...

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

Regards,
Ashish
SAP system instead of using client 105 of X!
2007-02-15 10:00:53 Ashish Goyal Business Card [Reply|

Dear Ravi,

!f ! have scenario with SAP (ABAP Proxy) ---> X! ---> File System (File Adapter)

would your code and the procedure remain the same?

Regards,
Ashish
Showing messages 1 through 18 of 18.
Titles Only Nain Topics Oldest First
Pagina 5 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007
Abap Proxy not function
2005-08-2+ 07:09:21 Sergio Oliveira Business Card [Reply|

Hi,Ravikumar

! am trying to do with that a program abap sends data for SAP X!. ! got to create the proxy of the type OUTBOUND and
SYNCH in my Rf3. ! am using your program as template. When ! 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 XNL is not well formatted.

The program abap that ! 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 NETHOD prxy->execute_synchronous
EXPORT!NG
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WR!TE :f fault->errortext.
ENDTRY.
Abap Proxy not function
2005-08-2+ 20:20:+7 Ravikumar Allampallam Business Card [Reply|

Sergio,

The ABAP Code example given is not full fledged. There is noting written if everything is successful. However if its unable
to create a message, then it should write a text as you can see from the statement - WR!TE :f fault->errortext.

Coming to your XNL formation, as ! don't have details, ! can pin point the problem but

1. Have you tested your message mapping ?
2. Have you tested you interface mapping ?
Pagina 6 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007

!f you are able to see a proper XNL there, then ideally Proxy also should be able to do the same.

!f you are still having problems, can you mail me the exact details, will try and see if ! can figure out.

Regards,
Ravi
ABAP Proxy
2005-05-03 1+:05:22 Dmitriy Nindich Business Card [Reply|

Hi Ravi,

A simple question. ! have a problem creating an ABAP proxy, since the system requests an object key? !s there any way to
avoid using object key? The client ! am working in does not wants us to change any SAP objects. Therefore, it is very hard to
get object key from him.

Thanks,
ABAP Proxy
2005-07-12 06:33:13 Karsten BerYuck Business Card [Reply|

Hi Dmitriy,

an object key will be requested because the system creates proxy objects in SAP's namespace. Simply give a prefix
beginning with Z when creating a proxy with SPROXY.
ABAP Proxy
2005-05-03 21:++:52 Ravikumar Allampallam Business Card [Reply|

Dmitriy,

No, there is no work around for a developer key. By generating an ABAP Proxy you are writing some code and that
defintely needs a developer key.

Ravi
ABAP Proxies
2005-03-29 07:2+:0+ Tuhin Oza Business Card [Reply|

Hi Ravi,
! have some doubts in weblog u have posted.

client 105 acts as application system
( sender or receiver ), then SPROXY transaction we should run in client 105 to generate proxies for interfaces which we have
created in X!.

The code which u wrote for triggering Proxy request from client 105 should also be written in client 105(Application System).
Pagina 7 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007
Plesae clarify this.

Thanks 8 Regards,
Tuhin Oza
ABAP Proxies
2005-05-03 21:+6:28 Ravikumar Allampallam Business Card [Reply|

Here as an example we have taken different clients of the same system. As the code is client independent you can
generate f write proxy anywhere. However, when you are executing the same you cannot do it from the same client as of
the integration server.

Regards,
ABAP Proxies
2005-06-21 08:53:55 Nickael Huchet Business Card [Reply|

Hi,
! don't understand why is not possible to use the !S (e.g client 100 in your exm) for the sending of data thanks to
proxy?
!n my case, ! have only one client for X! and other SAP systems are in Rf3 +.7 (without WAS).

Regards
Nickael
ABAP Proxies
2005-07-15 07:59:08 Jozef Zeman Business Card [Reply|

hi.
Proxy on same client as !S is not allowed, because of constructor of CL_XNS_RUN_T!NE_ENv:

NETHOD constructor.
!F parser !S !N!T!AL.
CREATE OBJECT parser
exporting im_property = me.
END!F.

proxy_allowed_on_is = ' '. "do not allow proxies on is

ENDNETHOD.

you can see it in SE2+.

! have problem to generate proxy on Rf3 +.7. Transaction SPROXY on +.7 can't connect to !ntegration Builder. !n
my opinion, +.7 can communicate only with !S X!2.0, and i've !S X!3.0 .

j.
Pagina 8 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007

j.
ABAP Proxies
2005-07-15 22:+6:59 Ravikumar Allampallam Business Card [Reply|

!n the example ! was trying as ! had only one system that can generate proxies as it has to be over and
above 6.2. At the time of doing this, ! did not had access to such a system so ! had to use one of the clients
of X! system as a business system as well to write a proxy. !n essence this is what ! was trying to do.

X!(Client 105) -----> X! (Client 100) ---> Target System.

You can generate proxies in +.7.

Jozef,

The error that you are getting "Cannot connect to !ntegration Builder", is due to setting not done on the Rf3
side. You will have install a patch and do the required settings to get the connectivity between Rf3 and X! up -
only then you will be able to use proxies.

Ravi
ABAP Proxies
2005-10-2+ 16:+8:+2 Leonardo Nachado Business Card [Reply|

Hi Ravi
!'m getting the same problem as Jozef (e.g. "Cannot connect to !ntegration Builder" from Rf3), could you
tell me how to configure the Rf3 System to connecty with X!?
Best regards
ABAP Proxies
2005-10-2+ 20:26:13 Ravikumar Allampallam Business Card [Reply|

Leo,

As ! mentioned, you will have to apply a patch on the Rf3 side for Rf3 to start talking to the
!ntegration Builder.

Regards,
Ravi
ABAP Proxies
2005-10-25 0+:++:07 Leonardo Nachado Business Card [Reply|

Ravi
sorry, but ! dont know how to do this, can you explain to me?
thanks
Leo
Pagina 9 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007
ABAP Proxies
2006-0+-25 11:30:52 Karma Ghale Business Card [Reply|

We just want to create xi abap server proxy on the same box. Can we create on the same
client? or we have to follow the same guidelines as mentioned above for creating abap client
proxy on xi box.
Thanks.
Karma
ABAP Proxies
2006-0+-25 19:56:51 Ravikumar Allampallam Business Card [Reply|

You cannot create it on the same client of the !ntegration Server. You have to have a
application system or at least have a different client which acts as a application system.

Regards,
Ravi
ABAP Proxies
2006-06-27 06:58:0+ pushkar anand Business Card [Reply|

Hi Ravi,

!ts really an informative blog, but could you please tell me, how do we push a
complete table with multiple entries via outbound abap proxy?
!n your example, only a single entry is being sent.





Showing messages 1 through 18 of 18.
Pagina 10 de 10
https://weblogs.sdn.sap.com/pub/wlg/1387 Iecha:19/03/2007

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