引自:https://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
ABAP Server Proxy
Area: SAP NetWeaver Process Integration
CONTENT
1. Foreword.
2. Preface.
3. Predefined configuration required on the SAP ECC side.
3.1 Create HTTP connection in the business system.
3.2 Configuration Business system as local Integration Engine.
3.3 Checking activation the XI Service in transaction SICF Maintain Services.
4. Tasks in the Integration Builder (Design time) and SAP ECC Proxy Framework.
4.1 Import RFC metadata into Integration Repository.
4.2 Creation Message Interface for Receiver.
4.3 Generation ABAP Server proxy.
4.4 Integration Repository objects for sender.
4.5 Message transformation rule.
5. Configuration time.
5.1 Communication channels.
5.2 Receiver and sender agreements.
5.3 Receiver and Interface determination.
6. Example of execution & Useful SDN Blog permanent links.
1. Foreword
As part of Integration Project, I was responsible for integrating Legacy system with SAP System using Server ABAP Proxies. ABAP Server (Inbound) Proxies enable adapterless integration with SAP Applications on WAS 6.20 and above. Below in this document we look at real life example of implementation ABAP Server Proxy.
2. Preface
This document describes how to send list of materials (specification) from FTP in XML format to SAP ECC system. The solution is based on SAP ECC 6.0 and PI 7.0.
We execute all actions in our integration scenario within customer LAN.
3. Predefined configuration required on the SAP ECC side:
3.1 Create HTTP connection in the business system.
Configuration Details:
Technical Setting:
1. Following Inputs are required for technical setting
1 Connection Type: H
2 Target Host: System name
3 Service Number: HTTPPort name
4 Path Prefix: /sap/XI/engine/?type=entry
Logon Security
On the Logon/Security tab page, enter the following logon data:
1 User: XIAPPLUSER (for example); this user should represent the sending business system see also the SAP PI Security Guide under Service Users for Message Exchange).
2 Password: the password you have specified for this user
3 Client: SAP PI Integration server
4 Language: Language required
3.2 Configuration Business system as local Integration Engine.
1. Goto Transaction SXMB_ADM
2. Choose Edit --> Change Global Configuration Data.
3. Select Role of Business System: Application system
4. Corresponding Integration server: dest://<HTTPDESTINATION> created on previous step. Here <HTTPDESTINATION> SAP_E03_TO_NW2_PROXY created in step 1. Dest://SAP_E03_TO_NW2_PROXY.
1.Select the relevant category under Specific Configuration Data.
2.Choose Change Specific Configuration Data.
For ABAP Proxies, Add the following configuration:
1.Category RUNTIME
2.Parameters: IS_URL
3.Current Value: dest://SAP_E03_TO_NW2_PROXY
3.3 Checking activation the XI Service in transaction SICF Maintain Services.
For purpose of checking activation the xi service you have to execute transaction SICF and if no then invoke context menu on xi service and Press "Activate".
4. Tasks in the Integration Builder (Design time) and SAP ECC Proxy Framework.
Open the Repository (Design) of the PI Integration Builder. You may start the application by executing transaction SXMB_IFR in PI system. (Further information can be found in the PI documentation -> Design and Configuration Time -> Design).) Choose your Software Component in the tree and open it with double-click: here we use: SC_PROD_FOR_E03 Enter the system data of the SAP ECC system that you want to connect.
4.1 Import RFC metadata into Integration Repository
Choose "Import RFC/IDOC" in the context menu of "Imported Objects" and enter your user data to logon to the SAP ERP system. Select the function module ZMGW1_CREATE_BOM Press "Continue" Press "Start". ZMGW1_CREATE_BOM it's remote-enabled module instead of SAP standard function module MGW1_CREATE_BOM.
4.2 Creation Message Interface for Receiver
Select your namespace, here: "http://rea_ksp_e03/" is used Choose "Interface Objects" and then "Message Interface" Create a Message Interface there by choosing "New" from the context menu Press "Create"
Choose the settings like this:
Direction: Inbound
Mode: Asynchronous
Select the imported RFC Message and by executing the value help ZMGW1_CREATE_BOM for Input Message Name
Select the Fault Message: Object Type: "RFC Message" Choose the Name via value help, here: "ZMGW1_CREATE_BOM.Exception" in the namespace "urn:sapcom: document:sap:rfc:functions" Save the Message Interface.
4.3 Generation ABAP Server proxy
Start transaction SPROXY and Refresh the tree Double-click on the Message Interface "MI_PROXY_MGW1" in your Software Component in your namespace (here: "http://rea_ksp_e03/") Choose a package (e.g. $tmp) Choose a prefix (we use "Z" here) Activate the Proxy.
Result:
The SAP ECC is now ready to receive data from the Integration Server via the Proxy Framework and the implemented Proxy. Data which is running through PI may now be transferred to the SAP ECC system according to routings and mappings that still have to be created.
4.4 Integration Repository objects for sender
Also we should develop necessary repository objects for sender during the design phase. The outbound Data type, Message type and the corresponding Message interface are shown below.
Outbound Data type.ROOT
4.5 Message transformation rule
Now we have to specify transformation rule between message types ROOT and ZMGW1_CREATE_BOM. For the purpose create message mapping MM_PROXY_XML2RFC.
It's important that material wich you pass to field STRUC_MATERIAL in function module ZMGW1_CREATE_BOM exist in SAP ECC system.
5. Configuration time
Open the Integration Directory (Configuration) of the PI Integration Builder. You may start the application by executing transaction SXMB_IFR in PI system. Create configuration scenario CS_E03_MI_PROXY_XML2RFC.
5.1 Communication channels
After creation in our configuration scenario business services BS_MI_PROXY_S and BS_MI_PROXY_R we have to create two communication channels type FILE and PROXY. Below configuration parameters for both channels.
Sender communication channel CC_MI_PROXY_S.
5.2 Receiver and sender agreements
Next step we have to create receiver and sender agreement.
Sender agreement.
5.3 Receiver and Interface determination
Last step we have to create receiver and interface determination like providing on screenshots below.
Receiver determination.
Interface determination
Save and activate all your changes in Integration Directory.
Now we able to run our configuration scenario by putting XML file in proper directory at FTP server. Transaction SXMB_MONI (or SXI_MONITOR) can be used for checking technical successfully execution of scenario. For checking business successfully execution of scenario you have to run transaction CS03 Display material BOM.
6. Example of execution & Useful SDN Blog permanent links
Putting XML file in proper directory at FTP server with simple business content.
Then go to SAP ECC system to CS03 transaction and input material which you mapped to field STRUC_MATERIAL in function module ZMGW1_CREATE_BOM and press 'Enter'
At the end i would like to provide useful SDN Blog permanent links which were extremely helpful for me.
ABAP Server Proxies
https://weblogs.sdn.sap.com/pub/wlg/1457
How do you activate ABAP Proxies?
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3022
Monitoring for Processed XML messages in ABAP Proxy