Header image  
COMPLETE SAP NETWEAVER TUTORIALSSITE  
  
 
 
 
 

 
 

Welcome to SAPAG.CO.IN

 

 

 

SAP AG.co in Will Give information of SAP related meterials Like SAP Platform and Operation,,SAP Security , SAP Enterprise Portal (EP), ,SAP Knowledge Management (KW), SAP Business Intelligence (BI), Exchange Infrastructure (XI),Application Server, Mobile (MI), Master Data Management MDM, Composit Appications Frame work,Web Dynpros,OOPABAP,Blog,Intergration Bulder, Integration Repository (IB),Integration Directory (ID).System Landscape Directory (SLD), And Adopter Configuration like File to File,File to JDBC, File to IDoc, File Content Convertion, RFC, HTTP,SOAP,XI Interview Questions,Xi Sertification Questions, and many more about SAP Netweaver Platform XI Training And Tutorial and XI interview Questions ..

 

SAP Exchange Infrastructure Tutorials

SAP XI Exercises HTTP to RFC

Exercise 3 – HTTP client to (a)synchronous BAPI

Overview

In this exercise we will implement a simple synchronous link between an external web application and R/3, via XI. The focus is on reusing external objects based on the open standards, XSD, XSLT and XPath.

The more advanced variant of this exercise will focus on asynchronous tRFC-based connectivity. As part of this topic, we will review the basics of tRFC communication and the implications for XI-based interfaces (TIDs, implicit/explicit commits, monitoring).

 

 

Prerequisites

•  Good understanding of basic XI features, or previous experience with XI 2.0.

•  Basic knowledge of XML standards XSD, XSLT and XPath.

•  Basic knowledge of RFC/tRFC concepts.

Description

An HTTP client application issues a synchronous request to XI. The request contains purchase order information in a custom XML format. The metadata for the XML document is available as an XML Schema (XSD) from an external source. The request reaches the Integration Server via the plain HTTP adapter. Based on the vendor number the message is routed to the R/3 system (content-based routing). The request is mapped to RFC-XML format. Via the RFC adapter, XI makes a BAPI call into the backend R/3 system to post the purchase order. The response from the BAPI, containing the PO number, is returned to the HTTP client.

In the advanced variant, the BAPI is called asynchronously and thus there is no response.

We assume that the R/3 system has been properly configured for creating purchase orders. In particular, a vendor has been created in the system (for example by completing exercise 1 above).

Note: the BAPI (ZBAPI_PO_CREATE) is in fact a custom wrapper for the standard BAPI (BAPI_PO_CREATE). This is done for convenience purposes:

•  The custom BAPI has only a minimal number of import parameters, representing the mandatory fields. This will simplify the mapping definition process.

•  The custom BAPI contains an additional optional field ‘bypass_bapi'. If this field is checked, then the standard BAPI will not be called, and the wrapper returns a randomly generated PO number. This can be used when the R/3 system is not properly configured for creating purchase orders, or simply for test purposes.

This exercise will introduce the concept of Business Service. Business Services are used in the Integration Directory during the configuration of Receiver Determination. Traditionally the Business Systems, defined in the System Landscape Directory, are used as sender or receiver in the Integration Directory. However, in some cases, the details of the implementing application are not available (for example in the case of B2B communication, where the system belongs to a different company). A Business Service represents an abstract entity for addressing the senders and receivers of messages. Therefore, when using Business Services, it is no longer necessary to define any Business Systems in the System Landscape Directory.

Exercise steps

Step 1 – System Landscape Directory

Since we will be using Business Services, no configuration will be required in the System Landscape Directory.

Step 2 – Repository

•  In the software component “XI RIG US workshop base comp”, open the node “imported objects”. Open the object ZBAPI_PO_CREATE and examine the metadata for the request and the response message.

•  In your software component, create a new namespace “urn:xiworkshop:group[XX]:webapp”. This will be the namespace for all objects related to the web application.

•  Import the external schema definition for the custom XML interface

•  Under the node “Interface objects”, create a new object of type “External Definition”, called “PurchaseOrderCombined”.

•  Select the following:

•  Category: xsd

•  Messages: From all available global elements

•  File: PurchaseOrderCombined.xsd (this contains PurchaseOrderRequest.xsd & PurchaseOrderResponse.xsd)

•  Once the XSD file has been imported, click on the “Message” tab, you should see 2 messages (as shown below): PurchaseOrderResponse and PurchaseOrderRequest

•  Create a new message interface object (synchronous, outbound) referencing the request and response messages.

•  Create a new outbound Message Interface object “PurchaseOrder_out” (outbound, synchronous).

•  Using the input help (F4), assign the request and response message types derived from the external definitions: PurchaseOrderRequest and PurchaseOrderResponse.

•  Import the XSLT archive containing request/response mapping

•  Inspect the following stylesheets, provided to you for the workshop:

•  POReq__ZBAPI_PO_CREATE_req.xsl (request mapping)

•  ZBAPI_PO_CREATE_resp__POResp.xsl (response mapping)

•  Using WinZip, create a ZIP archive file on your PC containing the 2 XSL files.

•  Create an “Imported Archive” object with name: PurchaseOrder__ZBAPI_PO_CREATE

 

 


Next

 

 

 

 

 Back to SAP XI Tutorials


 
Latest SAP Netweaveer Books