Beruflich Dokumente
Kultur Dokumente
SAP XI Scenario
Brought to you by
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
From WAS 6.20 onwards, proxy generation feature enables application systems to communicate
with XI using proxies.
Proxy objects implement message interfaces from Integration Repository. Proxy generation
converts non-language-specific interface descriptions in WSDL into executable interfaces in the
application system. Proxies separate Business Application logic from the integration logic of the
Exchange infrastructure.
1. Java Proxies
2. ABAP Proxies.
1. Java Proxies: - Java proxies are used when JAVA applications needs to send or receive
messages with other applications. JAVA proxies are generated from the WSDL description of the
interface in the Integration Repository, and the result is a .jar file containing generated java
classes corresponding to the integration objects.
2. ABAP Proxies: - ABAP proxies are used when ABAP applications needs to send or receive
messages. ABAP proxies are generated on the Application server with transaction SPROXY,
based on the WSDL representation of the message interface.
The type of the message interface determines what type of proxy is generated. The counterparts
to outbound message interface in application systems are client proxies, these are called to
send a message to inbound interface. And the counterparts of inbound message interface in
application systems are server proxies.
1. Proxy communication always by passes the Adapter Engine and will directly interact with
the application system and Integration engine. So it will give us better performance.
2. Proxies communicate with the XI server by means of native SOAP calls over HTTP.
3. Easy to handle messages with ABAP programming.
4. Proxy is good for large volumes of data. we can catch and persist the errors ( both
system & application fault ) which was generated by Proxy setting
The rest of the document gives you pre-requisites and steps that are necessary for generating
and executing ABAP client proxies.
Pre-requisites
1. The business systems should be based on SAP Web AS 6.20 and SAP Web AS 6.20
kernel patch level above 1253
2. You have installed the XI Add-On in each of these business systems as described in the
Installation Guide SAP Exchange Infrastructure 3.0
3. The business systems and your central Integration Server are maintained in the System
Landscape Directory (SLD).
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
• Establish the connection between WAS and Integration Builder, this allows the
application system to retrieve WSDL description of the interface as the basis of proxy
generation.
• Create a source data type and a target data type.
• Create Message types for the source and target data types.
• Create Message Interfaces includes Inbound Message interface and Outbound Message
interface.
• Create message mapping between the source and target message types.
• Create Interface mapping.
• Create ABAP proxies using the transaction SPROXY in the application system.
• Create Collaboration agreements and Collaboration profiles in Integration directory.
• Write a program in the application system for creating the client proxy request.
Take a business scenario where in business (Source System) sends an Employee details to
their Payroll system for calculating the monthly salaries of their employees. But here the
source business is running on SAP R/3 and corresponding Payroll system is not on SAP,
hence the interpretation of data/communication is different. Because source system sends
employee information through proxy communication and the target Payroll system is not
aware of these proxy call, so in order to provide a communication between these two we
need some interface mechanism which accepts proxy request and converts it into the format
understandable by the target payroll system and vice versa.
For this scenario we need to create the corresponding Data types, Message types and
Message interfaces for source and target messages. Once the source Message interface is
created we can generate the interface in source R/3 system using SPROXY transaction.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
In this demo scenario, there is slight variance in source and target messages. From the
source we will get First name and last name where as target will accommodate only one full
name and also source will send the annual salary whereas target will have the field Monthly
salary. Hence required mapping should be done.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
Save it.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
Before starting the configurations in the Integration directory, let us complete the creation of
client proxies in source R/3 system.
Here we can see all the Integration Repository objects. Select the outbound interface for which
we want to create the proxy. Right click on the interface and select create option.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
We can observe the Structures resembling outbound data types, message types get created in
the system. As the source structure can send multiple records of Employee, observe that a Table
type of ZTDT_EMPDET_OB_EMPLOYEE_TAB getting created. This can be transferred to FTP.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For creating ABAP client proxy request we need to call the execute_asynchronous method of
this class. This method will take the input as of type ZTMT_EMPDET_OB.
ZTDT_EMPDET_OB_EMPLOYEE_TAB.
ZTMT_EMPDET_OB- MT_EMPDET_OB-EMPLOYEE
First we need to create communication channels for sender and receiver. Here it is not
required to create sender communication channel as we are using proxies in the sender side
for communication. We need to create Receiver communication channel to place the file with
employee details in the FTP server.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
The next step in the Integration directory is we need to create Sender agreement, receiver
agreement, interface determination and Receiver determination. But in our scenario it is not
required to create sender agreement.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
In order to test the scenario we need to develop an ABAP Report to trigger a client proxy. The
following report is executed in the SE38 Editor for triggering an ABAP Proxy.
*&---------------------------------------------------------------------
*
*& Report Z_SEND_EMP_DETAILS
*&
*&---------------------------------------------------------------------
*
*& Published at SAPTechnical.com
*&
*&---------------------------------------------------------------------
*
REPORT Z_SEND_EMP_DETAILS.
TABLES:
PA0001.
DATA:
PRXY TYPE REF TO ZTCO_MI_EMPDET_OB,
FS_EMPLOYEE TYPE ZTDT_EMPDET_OB_EMPLOYEE,
T_EMPLOYEE TYPE ZTDT_EMPDET_OB_EMPLOYEE_TAB,
FS_EMPLOYEE_MT TYPE ZTMT_EMPDET_OB.
DATA:
BEGIN OF I_PA0000 OCCURS 0,
PERNR LIKE PA0000-PERNR,
MASSN LIKE PA0000-MASSN,
END OF I_PA0000,
BEGIN OF I_PA0001 OCCURS 0,
PERNR LIKE PA0000-PERNR,
WERKS LIKE PA0001-WERKS, " Personnel Area
PERSG LIKE PA0001-PERSG, " Employee Group
PERSK LIKE PA0001-PERSK, " Employee Subgroup
BTRTL LIKE PA0001-BTRTL, " Personnel Subarea
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
FS_EMPLOYEE-AMOUNT3 = I_PA0008-BET03.
FS_EMPLOYEE-NUMBER3 = I_PA0008-ANZ03.
ENDIF.
READ TABLE I_PA0009 WITH KEY PERNR = I_PA0000-PERNR BINARY SEARCH.
IF SY-SUBRC EQ 0.
FS_EMPLOYEE-PAYMENT_METHOD = I_PA0009-ZLSCH.
FS_EMPLOYEE-BANK_COUNTRY = I_PA0009-BANKS.
FS_EMPLOYEE-BANK_KEYS = I_PA0009-BANKL.
FS_EMPLOYEE-BANK_ACCOUNT_NUMBER = I_PA0009-BANKN.
FS_EMPLOYEE-BANK_CONTROL_KEY = I_PA0009-BKONT.
ENDIF.
APPEND FS_EMPLOYEE TO T_EMPLOYEE.
ENDLOOP.
TRY.
FS_EMPLOYEE_MT-MT_EMPDET_OB-EMPLOYEE = T_EMPLOYEE.
CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
EXPORTING
OUTPUT = FS_EMPLOYEE_MT.
COMMIT WORK
.
CATCH CX_AI_SYSTEM_FAULT .
DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
CREATE OBJECT FAULT.
WRITE :/ FAULT->ERRORTEXT.
ENDTRY.
When this report is executed, we can see the file in the FTP server
with the employee details.
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com
ABAP Proxy Communication (Client Proxy)
<Amount2>0.00</Amount2>
<Number2>0.00</Number2>
<Wage_Type3 />
<Amount3>0.00</Amount3>
<Number3>0.00</Number3>
<Payment_Method>U</Payment_Method>
<Bank_country>DE</Bank_country>
<Bank_Keys>23984899</Bank_Keys>
<Bank_account_number>253571587</Bank_account_number>
<Bank_Control_Key />
</Employee>
</ns0:MT_Empdet_ib>
• XSLT Mapping
• IDOC-to-IDOC Scenario
• File-to-File Scenario with SLD and Monitoring Status
• Publishing Interface as Web Service (Web Service to RFC Scenario)
• Monitoring of XML Message Queues in the R/3 system
• ABAP Proxy communication Scenario (Server Proxy)
• RFC-to-Web Service Scenario
• IDoc-to-File Scenario
• How-to-do Alert Configuration in XI
• Time Bound File Processing - File to IDoc Scenario
• Collect Multiple IDOCs to File using BPM
• Useful information regarding SAP XI
For more tips, tutorials, Interview questions, certification questions, please visit
SAPTechnical.com