(is) ABAP Proxy Communication Scenario (Server Proxy)

download (is) ABAP Proxy Communication Scenario (Server Proxy)

of 15

Transcript of (is) ABAP Proxy Communication Scenario (Server Proxy)

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    1/15

    ABAP Proxy communication (Server Proxy)

    By Suraj Kumar Pabbathi, PI Competency Lead, YASH Technologies

    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 serviceinfrastructure and by using SAP Exchange Infrastructure

    ABAP proxies that were generated from message interfaces in the Integration Repository (IR) can beused in both infrastructures.

    This means that if none of the Integration Server services are available for a proxy-to-proxycommunication scenario in ABAP, you can use a point-to-point connection using the Web serviceinfrastructure instead.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    2/15

    The prerequisites to configure ABAP Proxy include: (landscape dependent)

    1. The business systems should be based on SAP Web AS 6.20 and SAP Web AS 6.20 kernel patchlevel above 1253

    2. You have installed the XI Add-On in each of these business systems as described in the InstallationGuide SAP Exchange Infrastructure 3.0

    3. The business systems and your central Integration Server are maintained in the System LandscapeDirectory (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

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    3/15

    2. Choose Edit --> Change Global Configuration Data.

    3.

    Select Role of Business System: Application system

    4. Corresponding Integration server: dest://. Here XI_XIR_CONNECTION created in step 1. Dest://XI_XIR_CONNECTION.

    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 RUNTIME2.Parameters: IS_URL3.Current Value: dest://XI_XIR_CONNECTION

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    4/15

    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

    o Connection Type: To Choose the Technical settings tab page and do the following:

    In the Program ID field under Registered Server Program, enter LCRSAPRFCThis program ID must correspond to a program ID specified in the RFC engine settings ofthe 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: LCRSAPRFCGateway Host: Gateway Service: Number of process: 3

    Under Repository specify the following: Application Server:

    5. Maintain SLD access details in Transaction SLDAPICUST

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    5/15

    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.

    Continued...

    http://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htm
  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    6/15

    ABAP Proxy communication (Server Proxy)

    ...Previous

    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 structurein which employee data type is encapsulated.

    http://www.saptechnical.com/Tutorials/XI/ABAPProxy/page1.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page1.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page1.htm
  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    7/15

    In this example a small difference is maintained between the source message structure and target structureto show the need of mapping. Find below the mapping where in Full name is constructed after concatenatingthe Last name and First name.

    Finally we require a message interface, which will encapsulate the message mapping between sourcestructure and target structure.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    8/15

    Before completing the configuration in Integration Directory, let us create a ABAP proxy object in Target SAPsystem.

    Go to Transaction: SPROXY where in you get to see all the objects designed in Integration Repository. AsProxies implement message interfaces in Integration Repository, navigate to the required inbound messageinterface, as we are creating a Server proxy. Right click to create the Proxy as shown in the belowscreenshot.

    You can observe a Proxy-interface getting created in Target system with Properties, Generation,Structure and Type Mappings.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    9/15

    You observe that Structures resembling inbound data types, message types get created in the system. Asthe target structure can get multiple records of Employee personal details in this scenario, observe that aTable type of ZEMPLOYEE_IB_EMPLOYEE_TAB getting created. This can be transferred to requiredapplication 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.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    10/15

    Finally you need to implement the Proxy. For this double click Implementing Class on Properties tab tolead you to method EXECUTE_ASYNCHRONOUS. This is default method that gets created withImplementing Class where in you need to code as per the business logic. Find below the screenshot of thesample code that reads the data from Employee internal table and inserts the data into database.

    Now it is the time for configuration. Logon to XI integration directory to start creating the collaborative profiles

    and agreements to route the message from source system and then placing a proxy call to server proxy to

    post the data to target SAP System.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    11/15

    ABAP Proxy communication (Server Proxy)

    ...Previous

    First we need a Sender Communication channel, which will be able to pick up the file from source FTPserver. 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 placingthe proxy call, we will call this communication as Adapter less communication. The reason is, usually anadapter is used to specify transport protocol where in this is used to define the mode of communication andmessage protocol where in this is used to convert the message format from XML to native format and otherwise.

    As XI adapter is defined with HTTP as transport protocol and XI as message protocol, both are defaultprotocols of XI environment, hence we say it is adapter less communication.

    http://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htmhttp://www.saptechnical.com/Tutorials/XI/ABAPProxy/page2.htm
  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    12/15

    To complete the configuration we have to define collaborative profiles and agreements, which includeSender Agreement, Receiver Agreement, Interface Determination and Receiver Agreement. Find below thescreenshots explaining the same.

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    13/15

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    14/15

    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 cancall the scenario to be Time bound file processing.

    After the defined periodicity as per Sender communication channel, the file is picked for processing and canbe found through ABAP stack of XI through the transaction code SXI_MONITOR. This is explained in thescreenshot below:

  • 8/10/2019 (is) ABAP Proxy Communication Scenario (Server Proxy)

    15/15

    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.