Proxy objects implement message interfaces from Integration Repository. Proxies are executable interfaces, which converts non-language-specific interface descriptions into WSDL. i.e., you use proxies to implement the actual message exchange that is described in the Integration Builder.
Types of Proxy objects: You can use message interfaces to create the following proxy objects:
- ABAP Proxy objects
- JAVA Proxy objects
During the process of ABAP proxy generation, it gets WSDL (Web Service Description Language) description of message interfaces from the Integration Repository by using HTTP communication.
Proxy Generation:
As part of SAP Web AS 6.40
- ABAP proxy generation enables you to generate proxies to communicate by using the Web service infrastructure and by using SAP Exchange Infrastructure
- ABAP proxies that were generated from message interfaces in the Integration Repository (IR) can be used in both infrastructures.
- This means that if none of the Integration Server services are available for a proxy-to-proxy communication scenario in ABAP, you can use a point-to-point connection using the Web service infrastructure instead.
The prerequisites to configure ABAP Proxy include: (landscape dependent)
- The business systems should be based on SAP Web AS 6.20 and SAP Web AS 6.20 kernel patch level above 1253
- You have installed the XI Add-On in each of these business systems as described in the Installation Guide SAP Exchange Infrastructure 3.0
- The business systems and your central Integration Server are maintained in the System Landscape Directory (SLD).
Configuration required on the Business System:
1. Create a HTTP connection in the business system using transaction SM59
Technical Setting:
· Connection Type: H
· Target Host: System name
· Service Number: HTTP Port name
· Path Prefix: /sap/XI/engine/?type=entry
Logon Security
On the Logon/Security tab page, enter the following logon data:
· User: XIAPPLUSER (for example); this user should represent the sending business system (see also the SAP XI Security Guide under Service Users for Message Exchange).
· Password: the password you have specified for this user
· Client: SAP XI Integration server
· Language: Language required
2. Configuration Business system as local Integration Engine.
1. Go to Transaction SXMB_ADM
2. Choose Edit --> Change Global Configuration Data.
3. Select Role of Business System: Application system
4. Corresponding Integration server: dest://
5. Under Specific Configuration Data you can specify additional configuration data
- Select the relevant category under Specific Configuration Data.
- Choose Change Specific Configuration Data.
- For ABAP Proxies, Add the following configuration:
1.Category RUNTIME
2.Parameters: IS_URL
3.Current Value: dest://XI_XIR_CONNECTION
3. Connection between Business System and System Landscape Directory
- Create RFC destination (TCP/IP) LCRSAPRFC and SAPSLDAPI for the SLD connection.
- To create RFC Destination: LCRSAPRFC
- Connection Type: T
- Choose the Technical settings tab page and do the following:
In the Program ID field under Registered Server Program, enter LCRSAPRFC
This program ID must correspond to a program ID specified in the RFC engine settings of the SAP J2EE Engine on the Integration Server host. - Repeat the above step for RFC destination for SAPSLDAPI
4. Maintaining the SAP J2EE Connection Parameters for LCRSAPRFC and SAPSLDAPI in SAP J2EE engine
- Goto J2EE Engine
- Choose Cluster --> Server --> Services. JCo RFC provider
- Under RFC destination specify the following:
Program ID: LCRSAPRFC
Gateway Host:
Gateway Service:
Number of process: 3 - Under Repository specify the following: Application Server:
5. Maintain SLD access details in Transaction SLDAPICUST
If there is an HTTP error during connection, check the error using the transaction SLDCHECK in the Business system. Also ensure that HTTP connection is working fine.
In XI Adapter use HTTP connection rather than giving R/3 input details, as this is easier to transport and for maintenance. One receiver adapter can be used for all Interfaces connecting to a Business system.
Demo Scenario
This document describes Time bound file processing scenario where in, a file containing the employee personal details is picked from a FTP server system (Sender/Source) and sent to SAP System (Receiver/Target) via Exchange Infrastructure. Server ABAP proxy is configured to post the data to an application on target SAP System which will save the records into database.
Let us have design in Integration repository. The following screen illustrates the outbound message structure in which employee data type is encapsulated.
In this example a small difference is maintained between the source message structure and target structure to show the need of mapping. Find below the mapping where in Full name is constructed after concatenating the Last name and First name.
Finally we require a message interface, which will encapsulate the message mapping between source structure and target structure.
Before completing the configuration in Integration Directory, let us create a ABAP proxy object in Target SAP system.
Go to Transaction: SPROXY where in you get to see all the objects designed in Integration Repository. As Proxies implement message interfaces in Integration Repository, navigate to the required inbound message interface, as we are creating a Server proxy. Right click to create the Proxy as shown in the below screenshot.
You can observe a Proxy-interface getting created in Target system with ‘Properties’, ‘Generation’, ‘Structure’ and ‘Type Mappings’.
You observe that Structures resembling inbound data types, message types get created in the system. As the target structure can get multiple records of Employee personal details in this scenario, observe that a Table type of ZEMPLOYEE_IB_EMPLOYEE_TAB getting created. This can be transferred to required application in SAP for successful processing of the records, ultimately saving them into database.
You can observe the compatible equivalent elements of inbound data type created.
Finally you need to implement the Proxy. For this double click ‘Implementing Class’ on ‘Properties’ tab to lead you to method ‘EXECUTE_ASYNCHRONOUS’. This is default method that gets created with Implementing Class where in you need to code as per the business logic. Find below the screenshot of the sample code that reads the data from Employee internal table and inserts the data into database.
First we need a Sender Communication channel, which will be able to pick up the file from source FTP server. Find below the attributes of the communication channel, which is of type ‘File’.
Then create a receiver communication channel to place a proxy call. Though we use XI Adapter for placing the proxy call, we will call this communication as ‘Adapter less’ communication. The reason is, usually an adapter is used to specify transport protocol where in this is used to define the mode of communication and message protocol where in this is used to convert the message format from XML to native format and other wise.
As XI adapter is defined with HTTP as transport protocol and XI as message protocol, both are default protocols of XI environment, hence we say it is adapter less communication.
To complete the configuration we have to define collaborative profiles and agreements, which include Sender Agreement, Receiver Agreement, Interface Determination and Receiver Agreement. Find below the screenshots explaining the same.
Now prepare the file with Employee personal details resembling outbound message type as shown below:
This file is placed on FTP server to wait for the XI server to pick of the file at regular intervals, hence we can call the scenario to be Time bound file processing.
After the defined periodicity as per Sender communication channel, the file is picked for processing and can be found through ABAP stack of XI through the transaction code SXI_MONITOR. This is explained in the screenshot below:
Shortly you will notice that the message got successfully processed and data is posted in the database.
The record that got posted is related to SSN 999 that can be viewed in the database.
No comments:
Post a Comment