BEA WebLogic Adapter User Manual

BEA
WebLogic Adapter for
®
SAP
User Guide
Release 7.0 Document Date: October 2002
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.
Copyright © 2002 iWay Software. All Rights Reserved.
Restricted Rights Legend
This software and documentation is subject to and made available only pursuant to the terms of the BEA Systems License Agreement and may be used or copied only in accordance with the terms of that agreement. It is against the law to copy the software except as specifically allowed in the agreement. This document may not, in whole or in part, be copied photocopied, reproduced, translated, or reduced to any electronic medium or machine readable form without prior consent, in writing, from BEA Systems, Inc.
Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the BEA Systems License Agreement and in subparagraph (c)(1) of the Commercial Computer Software-Restricted Rights Clause at FAR
52.227-19; subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS
252.227-7013, subparagraph (d) of the Commercial Computer Software--Licensing clause at NASA FAR supplement 16-52.227-86; or their equivalent.
Information in this document is subject to change without notice and does not represent a commitment on the part of BEA Systems. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. FURTHER, BEA Systems DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE OR WRITTEN MATERIAL IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE.
Trademarks or Service Marks
BEA, Jolt, Tuxedo, and WebLogic are registered trademarks of BEA Systems, Inc. BEA Builder, BEA Campaign Manager for WebLogic, BEA eLink, BEA Manager, BEA WebLogic Commerce Server, BEA WebLogic Enterprise, BEA WebLogic Enterprise Platform, BEA WebLogic Express, BEA WebLogic Integration, BEA WebLogic Personalization Server, BEA WebLogic Platform, BEA WebLogic Portal, BEA WebLogic Server, BEA WebLogic Workshop and How Business Becomes E-Business are trademarks of BEA Systems, Inc.
All other trademarks are the property of their respective companies.
BEA WebLogic Adapter for SAP User Guide
Part Number Date
N/A October 2002
Table of Contents
About This Document
What You Need to Know .................................................................................... vi
Related Information............................................................................................. vi
Contact Us!......................................................................................................... vii
Documentation Conventions ............................................................................. viii
1. Introducing the BEA WebLogic Adapter for SAP
WebLogic Integration........................................................................................ 1-3
How the BEA WebLogic Adapter for SAP Works........................................... 1-4
2. Creating Schemas for SAP Business Objects
Overview ........................................................................................................... 2-1
Generating Schemas Using the BEA Application Explorer.............................. 2-3
3. Configuring the BEA WebLogic Adapter for SAP
Creating an Application View Folder................................................................ 3-1
Event Adapter Application Views..................................................................... 3-3
Creating the Event Adapter Application View .......................................... 3-4
Creating an SAP Remote Destination ........................................................ 3-8
Configuring the Event Adapter Application View................................... 3-14
Testing the Event Adapter in the Application View Console .................. 3-21
Testing the Event Adapter in Studio ........................................................ 3-26
Service Adapter Application Views ................................................................ 3-29
Creating a Service Adapter Application View......................................... 3-29
Configuring the Service Adapter Application View ................................ 3-32
Testing the Service Adapter ..................................................................... 3-36
BEA WebLogic Adapter for SAP User Guide iii
4. The BEA WebLogic Adapter for SAP and IDocs
Defining a Logical Port .....................................................................................4-2
Creating a Logical System.................................................................................4-4
Creating a Partner Profile ..................................................................................4-7
Creating a Distribution Model for the Partner and Message Type .................. 4-10
Manually Sending an IDoc ..............................................................................4-14
5. Sending SAP Events Using ABAP Programs
Writing an RFC Module ....................................................................................5-2
A. Sample Files
Sample RFC Request Document ...................................................................... A-1
Sample RFC Response Document.................................................................... A-2
Sample IDoc XML for Message Type DEBMAS............................................ A-3
iv BEA WebLogic Adapter for SAP User Guide

About This Document

The BEA WebLogic Adapter for SAP is organized as follows:
Chapter 1, “Introducing the BEA WebLogic Adapter for SAP,” introduces the
BEA WebLogic Adapter for SAP and describes SAP business objects and WebLogic Integration.
Chapter 2, “Creating Schemas for SAP Business Objects,” describes how to use
the BEA Application Explorer to generate schemas for your SAP business objects.
Chapter 3, “Configuring the BEA WebLogic Adapter for SAP,” describes how to
configure the event adapter and service adapter.
Chapter 4, “The BEA WebLogic Adapter for SAP and IDocs,” describes how to
configure and test SAP to send IDocs to the event adapter.
Chapter 5, “Sending SAP Events Using ABAP Programs,” describes how to
send events programmatically using the BEA WebLogic Adapter for SAP.
Appendix A, “Sample Files,” provides sample request and response documents
sent between SAP and the BEA WebLogic Adapter for SAP.
BEA WebLogic Adapter for SAP User Guide v

What You Need to Know

This document is written for system integrators who develop client interfaces between SAP and other applications. It describes how to use the BEA WebLogic Adapter for SAP in order to integrate SAP IDocs, RFCs, and BAPIs with WebLogic Integration. It is assumed that readers know Web technologies and have a general understanding of Microsoft Windows and UNIX systems as well as the WebLogic Integration and WebLogic Server infrastructure.

Related Information

The following documents provide additional information for the associated software components:
BEA WebLogic Adapter for SAP Installation and Configuration Guide
BEA WebLogic Adapter for SAP Release Notes
BEA Application Explorer Installation and Configuration Guide
BEA WebLogic Server installation and user documentation, which is available at
the following URL:
http://edocs.bea.com/more_wls.html
BEA WebLogic Integration installation and user documentation, which is
available at the following URL:
http://edocs.bea.com/more_wli.html
vi BEA WebLogic Adapter for SAP User Guide

Contact Us!

Your feedback on the BEA WebLogic Adapter for SAP documentation is important to us. Send us e-mail at comments will be reviewed directly by the BEA professionals who create and update the BEA WebLogic Adapter for SAP documentation.
In your e-mail message, please indicate which version of the BEA WebLogic Adapter for SAP documentation you are using.
If you have any questions about this version of BEA WebLogic Adapter for SAP, or if you have problems using the BEA WebLogic Adapter for SAP, contact BEA Customer Support through BEA WebSupport at Support by using the contact information provided on the Customer Support Card that is included in the product package.
When contacting Customer Support, be prepared to provide the following information:
Your name, e-mail address, phone number, and fax number
Your company name and company address
Your machine type and authorization codes
The name and version of the product you are using
docsupport@bea.com if you have questions or comments. Your
www.bea.com. You can also contact Customer
A description of the problem and the content of pertinent error messages
BEA WebLogic Adapter for SAP User Guide vii

Documentation Conventions

The following documentation conventions are used throughout this document.
Convention Item
boldface text Indicates terms defined in the glossary.
Ctrl+Tab Indicates that you must press two or more keys simultaneously.
italics Indicates emphasis or book titles.
monospace text
monospace boldface text
monospace italic text
UPPERCASE TEXT
Indicates code samples, commands and their options, data structures and their members, data types, directories, and file names and their extensions. Monospace text also indicates text that you must enter from the keyboard.
Examples:
#include <iostream.h> void main ( ) the pointer psz
chmod u+w *
\tux\data\ap
.doc
tux.doc
BITMAP
float
Identifies significant words in code.
Example:
void commit ( )
Identifies variables in code.
Example:
String expr
Indicates device names, environment variables, and logical operators.
Examples:
LPT1
SIGNON
OR
viii BEA WebLogic Adapter for SAP User Guide
Convention Item
{ }
[ ]
|
...
. . .
Indicates a set of choices in a syntax line. The braces themselves should never be typed.
Indicates optional items in a syntax line. The brackets themselves should never be typed.
Example:
buildobjclient [-v] [-o name ] [-f file-list]... [-l file-list]...
Separates mutually exclusive choices in a syntax line. The symbol itself should never be typed.
Indicates one of the following in a command line:
That an argument can be repeated several times in a command line
That the statement omits additional optional arguments
That you can enter additional parameters, values, or other information
The ellipsis itself should never be typed.
Example:
buildobjclient [-v] [-o name ] [-f file-list]... [-l file-list]...
Indicates the omission of items from a code example or from a syntax line. The vertical ellipsis itself should never be typed.
BEA WebLogic Adapter for SAP User Guide ix
x BEA WebLogic Adapter for SAP User Guide
CHAPTER
1 Introducing the BEA
WebLogic Adapter for SAP
This section introduces the BEA WebLogic Adapter for SAP and describes SAP business objects and WebLogic Integration. It includes the following topics:
WebLogic Integration
How the BEA WebLogic Adapter for SAP Works
You can use the BEA WebLogic Adapter for SAP to mine your existing SAP business procedures and applications for reuse with other applications and to participate in distributed e-business processes. High-speed, low-impact access to SAP exposes the critical business logic, and the data contained within, for reuse. This is the key to building a successful e-business or integrated enterprise.
BEA WebLogic Adapter for SAP User Guide 1-1
1 Introducing the BEA WebLogic Adapter for SAP
The BEA WebLogic Adapter for SAP is designed specifically to provide simple, standard access to business objects such as SAP Remote Function Call (RFC) modules, BAPIs (Business Application Programming Interfaces), and IDocs (Intermediate Documents), which are used to support existing business processes.These business objects are available to the service adapter as requests of SAP, and are available to the event adapter when SAP invokes its remote requests. They work in the following way:
Remote Function Call (RFC) modules are sessions established from the calling
application to the SAP system. A user ID is logged on and then a call is issued, triggering processing inside the call. When the call is processed it usually returns information, such as a return code and application data. The calling application waits for processing to complete, then receives the data. It continues processing, taking the result into account. It can even issue multiple RFCs during one session.
Business Application Programming Interfaces (BAPIs) are interfaces within
the business framework, which are used to link SAP components to one another or to third-party components. BAPIs are called synchronously and return information. For BAPIs, the client needs to do the appropriate error handling.
Intermediate Documents (IDocs) are documents that are processed
asynchronously– that is, no information is returned to the client. As soon as one asynchronous method is involved, the overall communication flow is asynchronous. As a result, the sender should not be on standby awaiting an answer.
The BEA WebLogic Adapter for SAP quickly and easily integrates your SAP IDocs, RFCs, and BAPIs via WebLogic Integration workflows. The adapter and WebLogic Integration provide all the functionality you need to integrate your mission critical SAP system with other enterprise applications. Adapter benefits include:
Eliminating the need for custom coding.
Running SAP IDocs, BAPIs, and RFCs both synchronously and asynchronously
from WebLogic Integration.
Allowing SAP to initiate bidirectional business process management workflows
using the event adapter.
Creating application views directly from SAP metadata using BEA Application
Explorer.
1-2 BEA WebLogic Adapter for SAP User Guide
As a JCA and JMS-based service and event adapter, ensuring reusability from
the entire WebLogic Server platform.
Integrating SAP events and services with WebLogic Integration.

WebLogic Integration

WebLogic Integration is a single solution that delivers application server, application integration, business process management, and B2B integration for the enterprise. With its comprehensive business process management capabilities, WebLogic Integration provides a powerful J2EE, EJB, and XML-based business process engine that enables customers to design, execute, and optimize enterprise-wide business processes involving systems, applications, and human decision makers.
These enterprise-wide solutions require integration with both external and internal systems in order for projects to be successful. Some of these systems are packaged applications in which organizations have made a substantial investment of time and money. To justify the investments, these systems must be accessible from WebLogic Integration. While some user organizations attempt to manually integrate JCA-based connections to the packaged applications, and even achieve limited success in these efforts, most organizations take the recommendations of industry analysts in seeking out vendor-supplied application adapters.
WebLogic Integration
SAP R/3 is probably the most widely used packaged application that must be accessible from WebLogic Integration for companies to successfully complete their integration projects. The BEA WebLogic Adapter for SAP allows an organization to fully integrate its SAP R/3, mySAP.com, SAP Markets, or SAP Portals application systems with virtually any other legacy system, DBMS, EDI, B2B, ERP, CRM, or SCM application on any platform.
BEA WebLogic Adapter for SAP User Guide 1-3
1 Introducing the BEA WebLogic Adapter for SAP

How the BEA WebLogic Adapter for SAP Works

The paradigm that the BEA WebLogic Adapter for SAP uses includes application views, event adapters, and services adapters. An application view is a standard self-describing interface to an application. The BEA WebLogic Adapter for SAP services are exposed in WebLogic Integration Studio using design elements, or plug-ins, known as nodes. These include Task nodes, which specify the operations to be performed by a BEA WebLogic Adapter for SAP, and Event nodes, which set the business processes that occur when a specific event is “pushed” from the adapter.
For outbound processing, the BEA WebLogic Adapter for SAP is invoked from the Action node and will, in turn, perform a transaction against SAP using the IFR XML, BAPI, RFC, or IDoc interfaces. For inbound processing, the adapter converts the specific SAP event into an XML document that triggers the start of a business process.
The BEA WebLogic Adapter for SAP interfaces are exposed as application views, providing the XSD XML schemas for event, request, and response document schemas that are imported into the WebLogic Integration repository. Once WebLogic Integration knows of these documents, they can be used in WebLogic Integration Studio and other WebLogic Integration tools. In addition, since application views are supported by the WebLogic Server strategy, the same BEA WebLogic Adapter for SAP can be leveraged by other WebLogic Server JCA-based applications to increase ROI.
The BEA WebLogic Adapter for SAP enables users to execute SAP IFR XML, IDocs, BAPI calls, and custom RFCs from WebLogic Integration as application views. To do this, the user creates the event, request, and response XML document schemas using BEA Application Explorer, which is implemented as a stand-alone Java Swing GUI. This GUI exposes all the components of your SAP system and enables you to select the ones for which you want to create an application view. By connecting the BEA Application Explorer to your SAP system, you can ensure that all the necessary communication and security information is gathered using SAP calls, and then stored in a WebLogic Integration Connection Factory database, to be used at execution time by the BEA WebLogic Adapter for SAP. This allows the application views to separate the business logic—contained in the XML event, request, and response documents—
1-4 BEA WebLogic Adapter for SAP User Guide
How the BEA WebLogic Adapter for SAP Works
from the physical connection data, which is stored in the WebLogic Integration repository. This shields users from the details of executing SAP IFR XML, IDoc, BAPIs, and RFCs.
The deployed application view from BEA WebLogic Adapter for SAP has the following features:
Support for Remote Function Calls (RFC), Business Application Programming
Interfaces (BAPI), and Intermediate Documents (IDoc) interfaces to SAP. RFCs and BAPIs are called synchronously by the adapter and always return data (either technical error information or a well-formed response document). IDocs are processed asynchronously.
Consistent data representation—a standard XML representation of event and
service request/response documents for SAP. The developer is freed from the specific details of the SAP interface (BAPI, RFC, IDoc, IFR XML) and the specific configuration details of the target SAP system.
XML validation. The schemas used by WebLogic Integration are validated
against SAP Business Object Repository (BOR) to ensure that each message conforms to the correct configuration of the target SAP system. Since the schemas are built dynamically from the target SAP system, this all but eliminates the possibility of errors in formatting or executing SAP requests.
Adheres to SAP ABAP serialization rules and SAP Interface Repository
standards published by SAP AG.
Besides being able to run SAP IFR XML, IDocs, BAPIs, and RFCs from WebLogic Integration, the adapter can also receive RFCs and IDocs directly from SAP and make them available to WebLogic Integration. The SAP system can be configured to send an IDoc or RFC out to a logical system when a certain event occurs. The output sent by SAP can be in any of these forms:
An RFC request—for example, RFC_CUSTOMER_GET.
A BAPI request—for example, BAPI_COMPANYCODE_GETLIST.
An IDoc as an XML document—for example, DEBMAS01.
An IDoc in raw data form.
BEA WebLogic Adapter for SAP User Guide 1-5
1 Introducing the BEA WebLogic Adapter for SAP
1-6 BEA WebLogic Adapter for SAP User Guide
CHAPTER
2 Creating Schemas for
SAP Business Objects
This section describes how to use the BEA Application Explorer to generate schemas that describe your SAP business objects. It contains the following topics:
Overview
Generating Schemas Using the BEA Application Explorer

Overview

The BEA WebLogic Adapter for SAP, in order to interact with your SAP business objects, requires schemas describing those objects. You can generate the schemas using the BEA Application Explorer:
1. Specify the directory in which you want the schemas to reside.
2. Browse your SAP system to identify the business object for which you want to
3. Generate the schema.
create a schema.
You can create an event schema describing the data that the SAP system sends to the event adapter, or a pair of request and response schemas for service calls from the service adapter to SAP.
BEA WebLogic Adapter for SAP User Guide 2-1
2 Creating Schemas for SAP Business Objects
Note: It is important to understand that the connection information and the event,
request, and response schema information that you enter and that is created by the BEA Application Explorer, directly affects the connections, events, and services available to the BEA WebLogic Adapter for SAP.
Service adapter requests are Remote Procedure Calls (RPCs) sent by the service adapter to SAP for execution. The request runs a process through the application system connection. The request specifies input parameters that are described by its request schema. For each adapter, the BEA Application Explorer displays summary information and request details. The service request expects a response, called a service adapter response.
Service adapter responses are answer sets returned from the application system connection in response to a service request. SAP uses service responses to return results to the service adapter. A service response is described by its service response schema.
Events are requests arriving from SAP that are triggered by SAP activity. For example, a call center worker may enter a purchase order or update a customer record through a GUI screen connected directly to SAP. This SAP event may trigger a process that makes a remote call to the BEA WebLogic Adapter for SAP, which arrives at the event adapter.
Business Objects are the available SAP RFC modules, BAPI methods, and IDocs that appear in the BEA Application Explorer when you connect to the SAP system.
For comprehensive information about the BEA Application Explorer, see the BEA Application Explorer Installation & Configuration Guide.
2-2 BEA WebLogic Adapter for SAP User Guide

Generating Schemas Using the BEA Application Explorer

Generating Schemas Using the BEA Application Explorer
To generate schemas for an SAP business object using the BEA Application Explorer:
1. Open the BEA Application Explorer:
z From the Windows Start menu, navigate to the Programs menu and choose
the command for the BEA Application Explorer.
z On other platforms, run the startup script beabse.sh or Java command
java com.ibi.common.ui.StartPanel.
Figure 2-1 BEA Application Explorer Initial Window
2. From the File menu, choose Session to change the default session path.
The session path is where the schemas you are created will be stored.
BEA WebLogic Adapter for SAP User Guide 2-3
2 Creating Schemas for SAP Business Objects
Figure 2-2 BEA Application Explorer Window - Selecting Session from File
3. Enter a session path. You may want to specify one that corresponds to your project or logical grouping of services and events.
Figure 2-3 Enter Session Path Window
4. Right-click SAP and choose New Connection to create a new connection, or Existing Connection and the specific connection for an existing connection.
If you specified an existing connection, skip ahead to step 8; otherwise, continue with step 5.
2-4 BEA WebLogic Adapter for SAP User Guide
Generating Schemas Using the BEA Application Explorer
Figure 2-4 BEA Application Explorer Window - Selecting New Connection
5. Enter a descriptive name for this connection and click OK.
Figure 2-5 Enter New Connection Name Input Window
6. Enter the appropriate connection information in the System and the User tabs.
BEA WebLogic Adapter for SAP User Guide 2-5
2 Creating Schemas for SAP Business Objects
7. Click OK when completed.
Figure 2-6 SAP Logon Window - System Tab
Figure 2-7 SAP Logon Window - User Tab
8. Select a type of business object, browse its objects, and select the object for which you wish to create a schema. Note that:
z BAPIs are listed under Application Components.
z RFCs are listed under Remote Function Modules.
z IDocs are listed under IDOC Repository.
2-6 BEA WebLogic Adapter for SAP User Guide
Generating Schemas Using the BEA Application Explorer
Figure 2-8 BEA Application Explorer - Selecting Application Components
In this example, navigate through Application Components into Financial Accounting, Company and select the BAPI named
BAPI_COMPANY_GETDETAIL.
BEA WebLogic Adapter for SAP User Guide 2-7
2 Creating Schemas for SAP Business Objects
9. Right-click the desired business object to create the service schema or event schema.
Figure 2-9 BEA Application Explorer - Selecting a BAPI and Choosing Creating Service Schema
After the schemas are created, the right pane displays the different schemas when you select the appropriate tabs.
2-8 BEA WebLogic Adapter for SAP User Guide
Generating Schemas Using the BEA Application Explorer
Figure 2-10 BEA Application Explorer - Displaying the BAPI’s Schemas
The following is a sample directory structure generated for the SAP connection named
SAPIDES under the session named fi_dev.
BEA WebLogic Adapter for SAP User Guide 2-9
2 Creating Schemas for SAP Business Objects
Figure 2-11 Explorer Window - Directory Structure for an SAP connection
The generated metadata includes a manifest file ( request schema ( schema ( schema (
service_BAPI_COMPANY_GETDETAIL_response.xsd), and the event event_BAPI_COMPANY_GETDETAIL.xsd).
service_BAPI_COMPANY_GETDETAIL.xsd), the response
The following is a sample of the generated
Figure 2-12 Manifest.xml File
2-10 BEA WebLogic Adapter for SAP User Guide
manifest.xml), the service
manifest.xml file.
Generating Schemas Using the BEA Application Explorer
The BEA WebLogic Adapter for SAP uses the manifest.xml file and accompanying schema(s) to connect to and define the interaction with the application system from an application view. The location of this repository is pointed to in configuration of the adapter during application view creation, as described in Chapter 3, “Configuring the
BEA WebLogic Adapter for SAP.” During creation of a service or an event, this
manifest and the accompanying schemas define the interaction with the EIS.
The following is a sample request schema generated for an SAP BAPI.
Figure 2-13 Sample Request Schema
BEA WebLogic Adapter for SAP User Guide 2-11
2 Creating Schemas for SAP Business Objects
2-12 BEA WebLogic Adapter for SAP User Guide
CHAPTER
3 Configuring the BEA
WebLogic Adapter for SAP
This section describes how to create, configure, and test event adapter application views and service adapter application views. It includes the following topics:
Creating an Application View Folder
Event Adapter Application Views
Service Adapter Application Views

Creating an Application View Folder

Application views reside within WebLogic Integration. WebLogic Integration provides you with a root folder in which you can store all of your application views. If you wish, you can create additional folders to organize related application views into groups.
BEA WebLogic Adapter for SAP User Guide 3-1
Loading...
+ 65 hidden pages