SUN SEEBEYOND eWAY™ ADAPTER FOR SAP BAPI USER’S GUIDE Release 5.1.
Copyright © 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S.
Contents Contents Chapter 1 Introducing the SAP BAPI eWay 7 About SAP 7 About the SAP BAPI eWay 7 Invoking BAPI/RFC Methods The SAP BAPI eWay Data Flows Outbound Data Flow: Java CAPS to SAP R/3 Inbound Data Flow: SAP R/3 to Java CAPS 8 9 9 9 What’s New in This Release 11 What’s In This Document 12 Scope Intended Audience Text Conventions Related Documents 13 13 13 14 Sun Microsystems, Inc.
Contents Chapter 3 Setting SAP BAPI eWay Properties 23 Creating and Configuring a SAP BAPI eWay 23 Configuring the eWay Connectivity Map Properties 23 eWay Connectivity Map Properties 25 Configuring the Inbound eWay Properties Server Connection Settings Configuring the Outbound eWay Properties Client Connection Settings 25 25 27 27 Configuring the eWay Environment Properties 30 eWay External Properties 31 Inbound SAP BAPI eWay Server Connection Settings MDB Settings Outbound SAP BAPI eWay Cl
Contents Creating a Partner Profile Configuring a Partner Profile 62 64 Security Issues 67 Chapter 6 Reviewing the Sample Projects 69 About the Sample Projects 69 prjBapiOutbound.zip prjIDocInbound.
Contents Create and Start the Domain Build and Deploy the Project Run the Sample 114 115 115 Additional Sample Project Scenarios 116 About Sending IDocs to SAP R/3 Using tRFCs The RFC OTD used to send/receive IDOCs Client Mode - sending IDOCs to SAP R/3 via IDOC_INBOUND_ASYNCRONOUS 116 116 117 Appendix A SAP Data Type Conversion Table 121 Index 122 eWay™ Adapter for SAP BAPI User’s Guide 6 Sun Microsystems, Inc.
Chapter 1 Introducing the SAP BAPI eWay The Sun SeeBeyond eWay™ Adapter for SAP BAPI, also noted throughout this book as the SAP BAPI eWay, provides Sun Java Composite Application Platform Suite (Java CAPS) Projects with the ability to exchange data with SAP R/3 software. This chapter provides an overview of the SAP BAPI eWay. What’s In This Chapter About SAP on page 7 About the SAP BAPI eWay on page 7 What’s New in This Release on page 11 What’s In This Document on page 12 Sun Microsystems, Inc.
Chapter 1 Introducing the SAP BAPI eWay Section 1.
Chapter 1 Introducing the SAP BAPI eWay Section 1.2 About the SAP BAPI eWay The meta data for a BAPI/RFC in SAP R/3 is extracted by the BAPI wizard, which uses it to build the BAPI/RFC OTD. This OTD is used in Java Collaborations and eInsight Business Processes to invoke or receive the BAPI/RFC call. 1.2.2 The SAP BAPI eWay Data Flows When the SAP BAPI eWay communicates with the SAP R/3 software, it uses the RFC protocol.
Chapter 1 Introducing the SAP BAPI eWay Section 1.2 About the SAP BAPI eWay Inbound Data Flow via RFC The sequence diagram uses a sample CostCenter OTD to describe the RFC inbound sequence.
Chapter 1 Introducing the SAP BAPI eWay Section 1.
Chapter 1 Introducing the SAP BAPI eWay Section 1.4 What’s In This Document What’s New in Version 5.1.2 Support for SAP ECC 6.0 (Unicode only) What’s New in Version 5.1.1 Supports automatic deployment of EAR files to WebLogic Application Server (version 9.1). What’s New in Version 5.1 Version Control: An enhanced version control system allows you to effectively manage changes to the eWay components.
Chapter 1 Introducing the SAP BAPI eWay Section 1.4 What’s In This Document Chapter 1 “Introducing the SAP BAPI eWay”: Provides an overview description of the product as well as high-level information about this document. Chapter 2 “Installing the eWay”: Describes the system requirements and provides instructions for installing the SAP BAPI eWay.
Chapter 1 Introducing the SAP BAPI eWay Section 1.5 Sun Microsystems, Inc. Web Site Table 1 Text Conventions (Continued) Text Convention Used For Examples Monospaced Command line arguments, code samples; variables are shown in bold italic java -jar filename.jar Blue bold Hypertext links within document See Text Conventions on page 13 Blue underlined Hypertext links for Web addresses (URLs) or email addresses http://www.sun.com 1.4.
Chapter 2 Installing the eWay This chapter describes the requirements and procedures for installing the SAP BAPI eWay. Procedures for implementing sample projects, are described in Reviewing the Sample Projects on page 69. What’s In This Chapter “Installing the SAP BAPI eWay” on page 15 “ICAN 5.0 Project Migration Procedures” on page 17 “Installing Enterprise Manager eWay Plug-Ins” on page 19 “Deploying an EAR File” on page 22 2.
Chapter 2 Installing the eWay Section 2.
Chapter 2 Installing the eWay Section 2.2 ICAN 5.0 Project Migration Procedures After Installation You must incorporate the installed eWay components into a Project before using the intended functions. See the Sun SeeBeyond eGate™ Integrator User’s Guide for more information on incorporating the eWay into an eGate Project. 2.1.3 Extracting the Sample Projects and Javadocs The SAP (BAPI) eWay includes sample Projects and Javadocs.
Chapter 2 Installing the eWay Section 2.2 ICAN 5.0 Project Migration Procedures 2 From the Project Explorer, right-click your Project and select Export from the shortcut menu. The Export Manager appears. 3 Select the Project that you want to export in the left pane of the Export Manager and move it to the Selected Projects field by clicking the Add to Select Items (arrow) button, or click All to include all of your Projects.
Chapter 2 Installing the eWay Section 2.3 Installing Enterprise Manager eWay Plug-Ins C Select the Environment Explorer tab, and from the Environment Explorer, rightclick the Project’s Environment and select Version Control > Check Out from the shortcut menu. D Select Recurse Environment to specify all components, and click OK. 2 If your imported Project includes File eWays, these must be reconfigured in your Environment prior to deploying the Project.
Chapter 2 Installing the eWay Section 2.3 Installing Enterprise Manager eWay Plug-Ins 3 Select the application plug-ins you require, and click Install. The application plugins are installed and deployed. Alternately, you can install eWay plug-ins using the following steps: 1 From the Suite Installer’s Download tab, select the Plug-Ins you require and save them to a temporary directory. 2 From the Enterprise Manager’s Explorer toolbar, click the Configuration icon.
Chapter 2 Installing the eWay Section 2.3 Installing Enterprise Manager eWay Plug-Ins Table 3 Alert Code\Description Description Details User Actions SAPBAPI-CONNECT-CLIENTUP000003= Alert to indicate that the SAP JCO client is alive and valid. If you are running in manual mode, and this is an unexpected state, check your collaboration and verify all connect() calls; otherwise, this Alert is only informational.
Chapter 2 Installing the eWay 2.4 Section 2.4 Deploying an EAR File Deploying an EAR File The Sun Java CAPS Enterprise Designer can be configured to automatically deploy an EAR file to the Sun Java System Application Server. To configure the Enterprise Designer for deployment, follow the directions for deploying applications to the Sun Java System Application Server, provided in the Sun SeeBeyond eGate Integrator System Administration Guide.
Chapter 3 Setting SAP BAPI eWay Properties This chapter describes how to set the SAP BAPI eWay properties to enable data exchange between the SAP R/3 software and a Java CAPS project. What’s In This Chapter Creating and Configuring a SAP BAPI eWay on page 23 Configuring the eWay Connectivity Map Properties on page 23 eWay Connectivity Map Properties on page 25 Configuring the eWay Environment Properties on page 30 eWay External Properties on page 31 3.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.2 Configuring the eWay Connectivity Map Properties template containing default configuration properties that are accessible on the Connectivity Map. To configure the eWay properties: 1 On the Enterprise Designer’s Connectivity Map, double-click the SAP BAPI eWay icon. Figure 6 Connectivity Map with Components SAP BAPI eWay 2 The Configuration properties window opens, displaying the default properties for the eWay.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.3 eWay Connectivity Map Properties Figure 7 Outbound eWay Properties 3.3 eWay Connectivity Map Properties The eWay Connectivity Map consists of the following properties categories. Inbound eWay Configuration Sections Include: Server Connection Settings Outbound eWay Configuration Settings Include: Client Connection Settings 3.3.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.3 eWay Connectivity Map Properties Table 4 Inbound eWay—Server Connection Settings Name Description Required Value Enable RFC Trace You enable RFC tracing with the Enable RFC Trace property. The trace file contains RFC API calls, and data sent to and received from the SAP R/3 host. The trace file is rfcnumber.trc, for example, rfc00310_0156.trc. Yes or No. The default mode is No; the RFC tracing is disabled.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.3 eWay Connectivity Map Properties Table 4 Inbound eWay—Server Connection Settings Name Transaction ID Verification Database Description Required Value Specifies the location of the Transaction ID Verification database. A valid path to the database file. For example, the default location is: Specify the name of the file-based database which persists the TIDs.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.3 eWay Connectivity Map Properties Table 5 Outbound eWay—Client Connection Settings Name Enable RFC Trace Description You enable RFC tracing with the Enable RFC Trace property. The trace file is rfcnumber.trc, for example, rfc00310_0156.trc. Required Value Yes or No. The default mode is No; the RFC tracing is disabled. Setting the Enable RFC Trace parameter to Yes creates both the JCo and RFC Trace logs.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.3 eWay Connectivity Map Properties Table 5 Outbound eWay—Client Connection Settings Name Transaction Mode Description Specifies the transaction mode. Non-Transactional Actions performed by BAPI call are committed immediately and automatically by SAP R/3 (auto commit). In this mode, use the execute() method in the OTD. Required Value A transaction mode of NonTransactional or Transactional RFC(tRFC), via VIA COMMIT/ ROLLBACK BAPI.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.4 Configuring the eWay Environment Properties Table 5 Outbound eWay—Client Connection Settings Name Maximum TID Database Rows Enable ABAP Debug Window Use Load Balancing 3.4 Description Required Value Specifies the maximum amount of rows for the Transaction ID (TID) database for outbound eWays. Set this property only if tRFC is used.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties 2 Expand the Environment created for the SAP BAPI Project and locate the SAP BAPI External System. Note: For more information on creating an Environment, see the “Sun SeeBeyond eGate™ Integrator Tutorial”. 3 Right-click the External System created for the SAP BAPI Project and select Properties from the list box. The Environment Configuration Properties window appears.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Inbound eWay Configuration Sections Include: Server Connection Settings MDB Settings Outbound eWay Configuration Settings Include: Client Connection Settings Connection Retry Settings Connection Pool Settings 3.5.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Table 6 Inbound SAP BAPI eWay—Server Connection Settings Name Router String (optional) Description Specifies the router string needed to access the SAP R/3 Application Server. This property is optional; use it only to gain access to an SAP system that is behind a firewall. Required Value A valid router string. There is no default setting.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Table 6 Inbound SAP BAPI eWay—Server Connection Settings Name Description System Number Specifies the system number of the SAP R/3 application server. Required Value Any numeric value. There is no default setting. Use this property when you are not using SAP load balancing. For information, refer to “Use Load Balancing” on page 30. Client Number Specifies the SAP client number used to access the R/3 system.
Chapter 3 Setting SAP BAPI eWay Properties 3.5.2 Section 3.5 eWay External Properties Outbound SAP BAPI eWay The outbound eWay Environment properties include client connection parameters that are required to implement the project using the eWay in outbound mode communication. These parameters are configured in the outbound eWay Environment Properties window.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Table 8 Outbound SAP BAPI eWay— Client Connection Settings Name System ID Description Required Value Specifies the System ID of the SAP R/3 instance. Any valid SAP System ID. There is no default setting. Gateway Hostname (optional) Specifies an Gateway host name for the Application Server. This parameter is optional and should be configured when NOT using SAP Load Balancing. An alphanumeric string.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Table 8 Outbound SAP BAPI eWay— Client Connection Settings Name Description Router String (optional) Required Value Specifies the router string needed to access the SAP R/3 Application Server. A valid router string. There is no default setting. This property is optional; use it only to gain access to an SAP system that is behind a firewall.
Chapter 3 Setting SAP BAPI eWay Properties Section 3.5 eWay External Properties Table 10 Outbound SAP BAPI eWay—Connection Pool Settings Name Description Required Value Steady pool size The minimum number of physical connections the pool should keep available at all times. 0 (zero) indicates that there should be no physical connections in the pool and that new connections should be created as needed. The default number of connections is 2.
Chapter 4 Creating SAP BAPI OTDs The SAP BAPI wizard is used to create BAPI and RFC OTDs. You use these OTDs in Java Collaborations and eInsight business processes to create the needed business rules to communicate with SAP R/13. What’s In This Chapter SAP BAPI Encoding on page 39 Date and Time Stamp Requirements on page 40 SAP JCo Installation on page 40 Creating BAPI and RFC OTDs on page 41 BAPI and RFC OTDs on page 45 4.
Chapter 4 Creating SAP BAPI OTDs 4.2 Section 4.2 Date and Time Stamp Requirements Date and Time Stamp Requirements Date and time stamp fields in the OTD are now typed as java.lang.String fields. This means that the OTD expects values assigned to date fields as YYYYMMDD, where February 14, 2006 becomes 20060214. The data format time fields is HHMMSS, where 11:59:59 PM becomes 235959, or 12:00:00 AM becomes 000000. 4.3 SAP JCo Installation The SAP Java Connector file, sapjco.
Chapter 4 Creating SAP BAPI OTDs Section 4.4 Creating BAPI and RFC OTDs You must manually add these files to the following location: c:\WINNT\system32 Note: Restart both Enterprise Designer and the domain after installing the JAR file. 4.3.2 Procedures (UNIX) The instructions for the installation of SAP JCo on other operating systems are included in the corresponding download files. On UNIX operating systems, add the OS specific shared lib files to the library path.
Chapter 4 Creating SAP BAPI OTDs Section 4.4 Creating BAPI and RFC OTDs To create BAPI OTDs 1 In the Explorer tab of the Enterprise Designer, right click the Project, click New, and click Object Type Definition. The New Object Type Definition Wizard dialog box appears. 2 Click SAP BAPI and click Next. The Select SAP Object page appears. Figure 9 BAPI Wizard—SAP Object Selection 3 To convert a BAPI object to OTD, select the BAPI option. To convert an RFC object to OTD, select the RFC option. 4 Click Next.
Chapter 4 Creating SAP BAPI OTDs Section 4.4 Creating BAPI and RFC OTDs Figure 10 BAPI Wizard—System Parameters 5 Enter the information for the SAP R/3 system for the SAP eWay to connect to: For this option Enter System ID System ID of the SAP R/3 system. Application server Host name of the SAP R/3 system. System number System number of the SAP R/3 system. SAP Routing String Router string of hostnames/IP addresses of all SAP routers between the Logical Host and the SAP gateway host (optional).
Chapter 4 Creating SAP BAPI OTDs Section 4.4 Creating BAPI and RFC OTDs Figure 11 BAPI Wizard—Login Parameters 7 Enter the information to log into the SAP system: For this option Enter Client Number Client number of the SAP R/3 system. User name User name. Password Login password. 8 Click Next. The Select BAPI/RFC page appears, showing the application components eWay™ Adapter for SAP BAPI User’s Guide 44 Sun Microsystems, Inc.
Chapter 4 Creating SAP BAPI OTDs Section 4.5 BAPI and RFC OTDs Figure 12 BAPI Wizard—Select BAPI/RFC In the BAPI tree, you can navigate to a particular SAP application component and select a BAPI object. 9 Expand the SAP application component folder, click a BAPI, and click Finish. The OTD Editor window appears, displaying the OTD. For information about the BAPI and RFC OTDs, refer to the section below.
Chapter 4 Creating SAP BAPI OTDs Section 4.5 BAPI and RFC OTDs Figure 13 CostCenter OTD The figure above shows the CostCenter OTD. The OTD has nodes for each of the BAPIs in the CostCenter business object. The OTD also has WSDL operations such as GetListExecute and GetListReceive. These WSDL operations are used when the OTD is used in a Business Process. The execute methods are used for client mode operations. The receive methods are used for server mode operations.
Chapter 4 Creating SAP BAPI OTDs Section 4.5 BAPI and RFC OTDs Figure 14 CostCenter OTD — Relaunch eWay™ Adapter for SAP BAPI User’s Guide 47 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 For the SAP BAPI eWay to interact successfully with SAP R/3, you must configure the SAP R/3 application as described in this chapter. The SAP R/3 screen captures in this chapter correspond to SAPGUI version 6.2, and SAP R/3 version 4.7. They are included to illustrate the general nature of the procedures, and contain only example values. Refer to the documentation supplied with your SAP R/3 system to determine the exact procedures.
Chapter 5 Configuring SAP R/3 Section 5.1 Creating the RFC Destination for the eWay Figure 16 RFC Destination Maintenance Window 3 Click TCP/IP connections and Create to display the RFC Destination entry window. eWay™ Adapter for SAP BAPI User’s Guide 49 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.1 Creating the RFC Destination for the eWay Figure 17 RFC Destination Entry Window 4 Type in the name of the RFC Destination (use a Logical System name refer to Naming the Logical System on page 54), an accompanying Description, and enter for the Connection Type (TCP/IP). eWay™ Adapter for SAP BAPI User’s Guide 50 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.1 Creating the RFC Destination for the eWay Figure 18 RFC Destination 5 Click Save to display the RFC Destination window corresponding to your entry. 6 Select the Registered as Server Program option. 7 Enter the Program ID and click Save. This program ID must be exactly the same as that specified in the eWay Program ID property. This value is case sensitive. For information, refer to “Program ID” on page 33.
Chapter 5 Configuring SAP R/3 Section 5.1 Creating the RFC Destination for the eWay Figure 19 RFC Destination Window 8 Click Test Connection, which tests the connection for logon speed and message transfer speed. When the inbound Project is deployed and running, the results are displayed in a table; otherwise, return code 3 is displayed. Figure 20 Connection Test Results eWay™ Adapter for SAP BAPI User’s Guide 52 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 5.2 Section 5.2 Configuration Needed in SAP R/3 to Send and Receive IDocs Configuration Needed in SAP R/3 to Send and Receive IDocs For the SAP BAPI eWay to interact successfully with the SAP R/3 system, you must configure the SAP R/3 system as described in this chapter. The SAP R/3 screen captures in this chapter correspond to SAPGUI version 6.2, and SAP R/3 version 4.0. They are included to illustrate the general nature of the procedures, and contain only example values.
Chapter 5 Configuring SAP R/3 Section 5.3 Configuring the Distribution Model Figure 22 Communications Hierarchy RFC Destination Communications Port Partner Profile The RFC Destination defines the entity to which Remote Function Calls (RFCs) can be made; it is the same as the Logical System in the Distribution Model. The Communications Port defines a channel for communication of IDocs.
Chapter 5 Configuring SAP R/3 Section 5.3 Configuring the Distribution Model Figure 23 SAP R/3 System Window 1 In the SAP R/3 System home window, type SALE into the command field and click Enter to display the Distribution (ALE) Structure window. Figure 24 Distribution (ALE) Structure Display Window 2 Expand the tree to display IDoc Interface / Application Link Enabling (ALE) > Basic Settings > Logical Systems > Define Logical System. 3 Click the Activity button to select Define Logical System.
Chapter 5 Configuring SAP R/3 Section 5.3 Configuring the Distribution Model Figure 25 New Entries Window 6 Click Save. The Change Request Entry window appears. Figure 26 Change Request Entry Window (1) 7 Click the Create request button, to display the Create Request window. 8 Enter a short description (e.g., eWay Test) and click Save. The Change Request entry window appears. 9 Click Enter to add the new data into the system.
Chapter 5 Configuring SAP R/3 5.3.2 Section 5.3 Configuring the Distribution Model Specifying the Distribution Model Cautionary Notes Two notes of caution are appropriate at this point: 1 We recommend that you should use the Z prefix when defining a name. This prefix is reserved for external use, and does not conflict with any SAP naming conventions. Following these rules should prevent any interference with standard SAP functionality or conflicts with standard SAP terminology.
Chapter 5 Configuring SAP R/3 Section 5.3 Configuring the Distribution Model Figure 28 Distribution Structure Window 1 Click the Activity button next to Maintain Distribution Model and Distribute Views to display the Maintain Distribution Model window. Figure 29 Maintain Distribution Model Window 2 Select the Menu path Edit > Model View > Create to display the Create Model View dialog box. eWay™ Adapter for SAP BAPI User’s Guide 58 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.3 Configuring the Distribution Model Figure 30 Create Model View Dialog Box 3 Enter the logical name you want for the new Distribution Model View, along with a brief descriptive name or message (for your own use). 4 Click Continue (Enter), which returns you to the previous window. Your new Model View now appears in the tree, as shown in Figure 31. Figure 31 Maintain Distribution Model Tree 5 Highlight the new entry and select Add Message Type.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications 7 Select Continue (Enter), which returns you to the previous window. The values you select now appear in the Distribution Model tree, as shown in Figure 33. Figure 33 Maintain Distribution Model Tree 8 Save your entry, click Back and then Cancel to return to the Distribution Structure window. 5.4 Configuring Communications This section describes the necessary communication configuration.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 34 SAP R/3 System Window 1 In the SAP R/3 System home window, type WE21 into the command field and click Continue (Enter) to display the WF-EDI Port Definition window. Figure 35 WF-EDI Port Definition Tree 2 Expand the tree under Transactional RFC to display the currently-defined Ports. 3 Select the desired Port from the list, or select Change to display the Port Definition for Asynchronous RFC Overview window.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 36 Port Details Window 4 Type in a Version (specifies IDoc record type), Logical destination, and Description, matching the entries made previously. 5 Select Enter, which displays the Change Request Query dialog window. [Note that you must have CTS (Correction and Transport System) turned on for this screen to be displayed.] 6 Select Create Request, which displays the Create Request dialog window.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 38 Partner Profile: Initial Screen Window 2 Type the name of the logical system created previously into the Partner number field, select LS for the Partner type, and select Create. This creates the Partner, and displays the Create Partner Profile window. eWay™ Adapter for SAP BAPI User’s Guide 63 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 39 Create Partner Profile Window 3 Under the Classification tab, select ALE for the Partner class and A (Active) for the Partner status, then Save. You now have created the Partner, and need to continue to the next section to configure the Partner Profile. 5.4.3 Configuring a Partner Profile Transaction: WE20 In this section, you configure the Inbound or Outbound Parameters in the Partner Profile.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 40 New Entries: Details of Created Entries Window 3 Select CREMAS as a Message type and CRE1 as a Process code from the drop-down menus, then click Save. The entries now appear in the list in the EDI Partner Profile: Inbound Parameters Overview window. eWay™ Adapter for SAP BAPI User’s Guide 65 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.4 Configuring Communications Figure 41 EDI Partner Profile: Inbound Parameters Overview Window 4 Follow the same procedure for Outbound parameters, as seen in Figure 42. eWay™ Adapter for SAP BAPI User’s Guide 66 Sun Microsystems, Inc.
Chapter 5 Configuring SAP R/3 Section 5.5 Security Issues Figure 42 EDI Partner Profile: Outbound Parameters 5 After making your entries, Save and then Back to get to the main SAP R/3 System window. 5.5 Security Issues SAP R/3 uses authorization objects to allow access to various levels of operation. A minimum set of authorization objects required for the SAP BAPI eWay to operate is described below. Use this only as a reference for setting up your own profiles.
Chapter 5 Configuring SAP R/3 Section 5.5 Security Issues RFC1 SCCR SYST ZDG1 Permission for Processing BAPI Type Under BAPI/EDI > Distributing master data and BAPI/EDI, select: Receiving BAPIs via RFC eWay™ Adapter for SAP BAPI User’s Guide 68 Sun Microsystems, Inc.
Chapter 6 Reviewing the Sample Projects This chapter provides an introduction to the SAP BAPI eWay components, and information on how these components are created and implemented in a Java CAPS Project. It is assumed that the reader understands the basics of creating a Project using the Sun SeeBeyond Enterprise Designer. For more information on creating an eGate Project, see the “Sun SeeBeyond eGate™ Tutorial” and the “Sun SeeBeyond eGate™ Integrator User’s Guide”.
Chapter 6 Reviewing the Sample Projects 6.1.1 Section 6.2 SAP Version Support prjBapiOutbound.zip The prjBapiOutbound.zip file contains the prjBAPIOutbound sample project, which demonstrates how to access flight ID and type by passing the airline code via an outbound BAPI. In addition to the sample Project, the SAP_BAPI_eWay_Sample.zip file also contains the following files generated by running the prjBAPIOutbound sample Project: inputBAPIFlightGetList.
Chapter 6 Reviewing the Sample Projects Section 6.4 Importing a Sample Project Deploy the Project 3 Check the output. 6.4 Importing a Sample Project Sample eWay Projects are included as part of the installation package. To import a sample eWay Project to the Enterprise Designer do the following: 1 Extract the samples from the Enterprise Manager to a local file. Sample files are uploaded with the eWay’s documentation SAR file, and then downloaded from the Enterprise Manager’s Documentation tab.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Create an Environment on page 86 Configure the eWays on page 87 Create the Deployment Profile on page 90 Create and Start the Domain on page 91 Run the Sample Project on page 92 6.5.1 Create a Project The first step is to create a new Project in the Enterprise Designer. 1 Start the Enterprise Designer. 2 From the Project Explorer tree, right-click the Repository and select New Project.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project 3 Enter a new name for the OTD. For this example, use CustBAPI. 4 Click Finish to create the CustBAPI OTD. 5 Open the new CustBAPI OTD and add a new field under the CustBAPI element and rename it test1. 6.5.3 Create the Java Collaboration Definitions The next step is to create the Java Collaboration Definitions using the Collaboration Definition Wizard (Java).
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Create the Collaboration Business Rules The following steps demonstrate how to create the business rules for the jcdFlightGetList Collaboration. 1 From the Business Rules toolbar, select the Rule icon and then connect the test1 field under Input, to the AIRLINE field under Flight_1 > GetList > ImportParams.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 45 jcdFlightGetList Collaboration 3 From the Business Rules toolbar, select the Rule icon. Next, right-click GetList (located under Flight_1), and choose Select method to call... from the list of available options. Select the execute() method from the list of available methods. The execute() method now appears in the Business Rules Designer window.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 46 jcdFlightGetList Collaboration 4 Select a new rule from the Business Rules toolbar. Next, select String > Concat from the Business Rules Designer toolbar. A Concat appears on the canvas. 5 Select String > Literal String from the Business Rules toolbar, then enter OUTPUT type: = in the String box and connect this to the String of the Concat.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 47 jcdFlightGetList Collaboration 6 Using the same procedures documented in the previous step, make the following field connections to the concat in the Business Rules Designer window: ID to str (Sting) with Literal String “ID =” Number to str (Sting) with Literal String “NUM =” Message to str (Sting) with Literal String “MESSAGE =” The result should appear as seen in Figure 48.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 48 jcdFlightGetList Collaboration 7 Connect the result (String) in the concat to the test1 field, located under jcdFlightGetList > output. eWay™ Adapter for SAP BAPI User’s Guide 78 Sun Microsystems, Inc.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 49 jcdFlightGetList Collaboration 8 The resulting collaboration should display the following code: package prjBAPIOutbound; public class jcdFlightGetList { public com.stc.codegen.logger.Logger logger; public com.stc.codegen.alerter.Alerter alerter; public com.stc.codegen.util.CollaborationContext collabContext; public com.stc.codegen.util.
Chapter 6 Reviewing the Sample Projects 6.5.4 Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Create the Business Process The next step in the sample is to create the bpBAPIOutbound eInsight Business Process in which the business rules are defined. Steps to create a business process include: 1 Right-click your new Project in the Enterprise Designer’s Project Explorer, and select New > Business Process from the shortcut menu.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 53 bpBAPIOutbound eInsight Business Process — business rule 6 Create a business rule between jcdFlightGetList.flightInput and the end of the Scope. Next, connect the Test1 field under jcdFlightGetList.flightInput.Output > CustBapi to the text field located under FileClient.write.Input.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 55 bpBAPIOutbound eInsight Business Process 8 Double-click to open the Exception handler box. 9 From the Business Process toolbar, drag a Business Rule activity to the Exception Handler canvas. Also drag a JMS.send activity from the Project Explorer, located under Sun SeeBeyond > eGate > JMS to the Exception Handler canvas.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 57 bpBAPIOutbound eInsight Business Process 12 Click on the Exception Handler box and then from the Business Process toolbar, click the Show Property Sheet icon, then configure the following for the Exception Handler. Exception Name --> ns4:JavaException Output --> jcdFlightGetList.flightInput.
Chapter 6 Reviewing the Sample Projects 6.5.5 Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Create a Connectivity Map The Connectivity Map provides a canvas for assembling and configuring a Project’s components. Steps required to create a new Connectivity Map: 1 From the Project Explorer tree, right-click the new prjBAPIOutbound Project and select New > Connectivity Map from the shortcut menu.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 59 Connectivity Map Components 6.5.6 Bind the eWay Components The final step in creating a Connectivity Map is binding the eWay components together. Steps required to bind eWay components together: 1 Double-click the cmBAPIOutbound Connectivity Map in the Project Explorer tree. The Connectivity Map appears in the Enterprise Designers canvas.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 60 Connectivity Map - Binding the Components 3 Minimize the Binding dialog boxes by clicking the chevrons in the upper-right corners. 4 Save your current changes to the Repository. 6.5.7 Create an Environment Environments include the external systems, Logical Hosts, Integration Servers and Message Servers used by a Project and contain the configuration information for these components.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project 7 Right-click lhBAPIOutbound and select New Integration Server. A new Integration Server (IntegrationSvr1) is added to the Environment Explorer tree under lhBAPIOutbound. Rename the Integration Server isBAPIOutbound. 8 Right-click lhBAPIOutbound and select Sun SeeBeyond JMS IQ Manager. A new SBJMSIQMgr1 gets added to the Environment Explorer tree under lhBAPIOutbound.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 62 eWays in the cmDelete Connectivity Map Inbound File eWay Outbound File eWay Outbound SAP BAPI eWay Configure the eWay Properties in the Connectivity Map The prjBAPIOutbound sample Project requires outbound eWay properties.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Table 11 Outbound eWay—Client Connection Settings Name Required Value Transaction ID Verification Database C:\JavaCAPS\data\SapTRFC.TIDdb Maximum TID Database Rows 200 Enable ABAP Debug Window No Use Load Balancing No 2 Click OK to save your changes and close the window. Note: For additional information on these properties, see Configuring the Outbound eWay Properties on page 27.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Table 12 Outbound SAP BAPI eWay— Client Connection Settings Name Client Number Required Value An alphanumeric string. Do not omit leading zeros. There is no default setting. User Any alphanumeric value. There is no default setting. Password An alphanumeric string. There is no default setting. Language There are no required values.
Chapter 6 Reviewing the Sample Projects Section 6.5 Building and Deploying the prjBAPIOutbound Sample Project Figure 63 Deployment Profile 6.5.10 Create and Start the Domain To build and deploy your Project, you must first create a domain. A domain is an instance of a Logical Host. After the domain is created, the Project is built and then deployed. Note: You are only required to create a domain once when you install the Java Composite Application Platform Suite.
Chapter 6 Reviewing the Sample Projects 6.5.11 Section 6.6 Building and Deploying the prjIDocInbound Sample Project Build and Deploy the Project The Build process compiles and validates the Project’s Java files and creates the Project EAR file. Build the Project 1 From the Deployment Editor toolbar, click the Build icon. 2 If there are any validation errors, a Validation Errors pane will appear at the bottom of the Deployment Editor and displays information regarding the errors.
Chapter 6 Reviewing the Sample Projects Section 6.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 4 Specify the SAP R/3 login parameters for your system, and click Next. 5 select IDOC_INBOUND_ASYNCHRONOUS from the list of RFCs to retrieve, and then click Finish. 6 The IDOC_INBOUND_ASYNCHRONOUS OTD is added to the Enterprise Explorer.
Chapter 6 Reviewing the Sample Projects 6.6.3 Section 6.6 Building and Deploying the prjIDocInbound Sample Project Create the Java Collaboration Definitions The next step is to create the Java Collaboration Definitions or JCDs using the Collaboration Definition Wizard (Java). Once you create the Collaboration Definition, you can write the Business Rules using the Collaboration Editor.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Creating the Collaboration Business Rules The following steps demonstrate how the business rules for the jcdProcessCREMAS Collaboration. 1 From the Business Rules toolbar, select the Rule icon. Next, right-click input (located under jcdProcessCREMAS), and choose Select method to call... from the list of available options. Select the marshal() method from the list of available methods.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 66 jcdProcessCREMAS Business Rule 4 The resulting Collaboration displays the following code: package prjIDocInbound; public class jcdProcessCREMAS { public com.stc.codegen.logger.Logger logger; public com.stc.codegen.alerter.Alerter alerter; public com.stc.codegen.util.CollaborationContext collabContext; public com.stc.codegen.util.TypeConverter typeConverter; public void inputCREMAS( com.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 6 Select the output message by selecting prjIDocInbound > IDOC_MATMAS04_4X_46C, then click Next. 7 Select the OTDs used in this Collaboration by selecting Sun SeeBeyond > eWays > File > FileClient. 8 Click Finish, the jcdProcessMATMAS Collaboration is created.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 68 jcdProcessMATMAS Business Rule 3 From the Business Rules toolbar, select the Rule icon. Next, right-click FileClient_1 (located under jcdProcessMATMAS), and choose Select method to call... from the list of available options. Select the writeBytes() method.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project public com.stc.codegen.util.TypeConverter typeConverter; public void inputMATMAS( com.stc.sapale.iDOC_MATMAS04_4X_46C.IDOC_MATMAS04_4X_46C input, com.stc.sapale.iDOC_MATMAS04_4X_46C.IDOC_MATMAS04_4X_46C output, com.stc.connector.appconn.file.FileApplication FileClient_1 ) throws Throwable { FileClient_1.setByteArray( input.marshal() ); FileClient_1.writeBytes(); } } 6.6.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 71 bpIDocInbound Business Rule 4 From the Business Process toolbar, drag two Business Rule activities to the Business Process canvas. Figure 72 bpIDocInbound Business Rule 5 From the Project Explorer, drag unmarshal operations from the IDOC_CREMAS03_4X_46A OTD and IDOC_MATMAS04_4X_46C OTD to the Business Process canvas.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 74 bpIDocInbound Business Rule 7 Connect the canvas elements together as seen in Figure 75.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 76 Decision Gate Properties Window 4 Next, add a string literal and call it CREMAS. Connect the string literal to any 2 field. Figure 77 Decision Gate Properties Window eWay™ Adapter for SAP BAPI User’s Guide 103 Sun Microsystems, Inc.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 5 Drag the MESTYP (under IDOC_CONTROL_REC_40) to any 1, and drag return boolean to Result. Figure 78 Decision Gate Properties Window 6 Repeat the same procedure for the second row (check if MATMAS) and then click OK. This completes the Decision Gate Properties window. Steps to configure the CREMAS business rules include: 1 Open the Business Rule that follows the Check if CREMAS condition.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 79 CREMAS Business Rule 3 Create and open the business rule between the IDOC_CREMAS03_4X_46A.unmarshal and jcdProcessCREMAS.inputCREMAS activities. 4 Connect the IDOC_CREMAS03_4X_46A.unmarshal.Output OTD to the jcdProcessCREMAS.inputCREMAS.Input OTD.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 81 MATMAS Business Rule 3 Create and open the business rule between the IDOC_MATMAS04_4X_46C.unmarshal and jcdProcessMATMAS.inputMATMAS activities. 4 Connect the IDOC_MATMAS04_4X_46C.unmarshal.Output OTD to the jcdProcessMATMAS.inputMATMAS.Input OTD.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 2 The New Connectivity Map appears and a node for the Connectivity Map is added under the Project, on the Project Explorer tree labeled CMap1. Rename this project to be cmIDocInbound. Populate the Connectivity Map You add the Project components to the Connectivity Map by dragging the icons from the Connectivity Map toolbar to the canvas.
Chapter 6 Reviewing the Sample Projects 6.6.6 Section 6.6 Building and Deploying the prjIDocInbound Sample Project Bind the eWay Components The final step in creating a Connectivity Map is binding the eWay components together. Steps required to bind eWay components together: 1 Double-click the cmBAPIOutbound Connectivity Map in the Project Explorer tree. The Connectivity Map appears in the Enterprise Designers canvas.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 84 Connectivity Map - Binding the JCD Components 3 Minimize the Binding dialog boxes by clicking the chevrons in the upper-right corners. 4 Save your current changes to the Repository. 6.6.7 Create an Environment Environments include the external systems, Logical Hosts, Integration Servers and Message Servers used by a Project and contain the configuration information for these components.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 5 Right-click envIDocInbound and select New File External System. Name the External System esFileExt. Click OK. esFileExt is added to the Environment Editor. 6 Right-click envIDocInbound and select New Logical Host. LogicalHost1 is added to the Environment Editor tree. Rename the Logical Host lhIDocInbound. 7 Right-click lhIDocInbound and select New Integration Server.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Figure 86 eWays in the cmDelete Connectivity Map Outbound File eWay Inbound SAP BAPI eWay Outbound File eWay Configure the eWay Properties in the Connectivity Map The prjIDocInbound sample Project includes inbound and outbound eWay properties.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 2 Click OK to save your changes and close the window. Note: For additional information on these properties, see Configuring the Inbound eWay Properties on page 25. Configure the File eWay External Environment Properties The prjBAPIOutbound sample Project requires outbound File eWay Environment properties.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project Table 14 Inbound SAP BAPI eWay— Server Connection Settings Name Application Server Hostname Required Value Any valid Hostname. There is no default setting. System Number Any numeric value. There is no default setting. Client Number An alphanumeric string. Do not omit leading zeros. There is no default setting. User Any alphanumeric value. There is no default setting.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 2 Enter a name for the Deployment Profile (for this sample dpSAPBAPI). Select envIDocInbound as the Environment and click OK. 3 From the Deployment Editor toolbar, click the Automap icon. The Project’s components are automatically mapped to their system windows, as seen in Figure 87. Figure 87 Deployment Profile 6.6.
Chapter 6 Reviewing the Sample Projects Section 6.6 Building and Deploying the prjIDocInbound Sample Project 5 Make any necessary changes to the Create Domain dialog box and click Create. The new domain is added to the Domain Manager. Select the domain and click the Start an Existing Domain button. Once your domain is started, a green check mark indicates that the domain is running. For more information about creating and managing domains see the eGate Integrator™ System Administration Guide. 6.6.
Chapter 6 Reviewing the Sample Projects 6.7 Section 6.7 Additional Sample Project Scenarios Additional Sample Project Scenarios The following section describes an additional scenario involving Transactional Remote Function Calls (tRFCs) 6.7.1 About Sending IDocs to SAP R/3 Using tRFCs This section describes the procedure to send IDocs to SAP R/3 using the IDOC_INBOUND_ASYNCHRONOUS RFC OTD and the BAPI eWay.
Chapter 6 Reviewing the Sample Projects Section 6.7 Additional Sample Project Scenarios Unmarshal - To unmarshal IDOC data to this OTD IDOC_INBOUND_ASYNCRONOUSExecute - To send IDOC to SAP IDOC_INBOUND_ASYNCRONOUSReceive - To receive IDOc from SAP The IDOC_INBOUND_ASYNCRONOUS OTD is NOT a message-able OTD, and the unmarshal web service is specifically provided to unmarshal IDOC data to this OTD.
Chapter 6 Reviewing the Sample Projects Section 6.7 Additional Sample Project Scenarios Figure 90 File — Unmarshal business rule 2 Click the RFC_IDOC_INBOUND_ASYNCHRONOUS.IDOC_INBOUND_ ASYNCHRONOUSExecute business rule and then click the Property Sheet icon. The property sheet for this business rule appears. 3 Change the Input property to RFC_IDOC_INBOUND_ASYNCHRONOUS. unmarshal.Output, then click the Property Sheet icon again to close the property sheet for this business rule.
Chapter 6 Reviewing the Sample Projects Section 6.7 Additional Sample Project Scenarios B Add a business rule between RFC_IDOC_INBOUND_ASYNCHRONOUS. unmarshal and RFC_IDOC_INBOUND_ASYNCHRONOUS.IDOC_INBOUND_ ASYNCHRONOUSExecute. Next, from the Business Rules Designer toolbar, drag a get GUID (located under Nodes) to the canvas. C Connect GUID in the get GUID box to the EID field, located under RFC_IDOC_INBOUND_ASYNCHRONOUS.unmarshal.Output.
Chapter 6 Reviewing the Sample Projects Section 6.7 Additional Sample Project Scenarios Figure 93 Client Mode Connectivity Map using BAPI eWay eWay™ Adapter for SAP BAPI User’s Guide 120 Sun Microsystems, Inc.
Appendix A SAP Data Type Conversion Table Use the following SAP data type conversion table to help map the data type in the ABAP Directory to their respective JCo and Java data types. Table 15 Data Type Conversion Table ABAP type Description JCo type code Java data type b 1-byte integer JCO.TYPE_INT1 int s 2-byte integer JCO.TYPE_INT2 int I 4-byte integer JCO.TYPE_INT int C Character JCO.TYPE_CHAR String N Numerical JCO.TYPE_NUM Character String P Binary Coded Decimal JCO.
Index Enable RFC Trace 26, 28, 88, 111 enabling 30, 89 load balancing 30, 89 eWay Connectivity Map 23, 25 eWay environment properties 30 eWay plug-ins, installing 19 external properties, eWay 31 Index A G alert codes 20 Application Server Group 36 Application Server Hostname 33, 35, 113 architecture, eWay 7 authorization objects 67 Automap 90, 114 Gateway Hostname 32, 36, 112 Gateway Service 33, 36, 112 I IDoc OTD creating 41 Importing sample Projects 71 installation 15–20 Installing eWay plug-ins 19
Index Server connection settings, inbound 25, 27, 32, 34 Setting Properties Client connector settings 35 configuring SAP BAPI eWay 23 connection retry settings 37 eWay Connectivity Map 23, 25 eWay environment properties 30 eWay external 31 inbound SAP BAPI eWay 32 outbound eWay 25 outbound properties 27 outbound SAP BAPI eWay 35 Server connection settings 25, 27, 32, 34 System ID 34, 36, 113 System Number 34, 35, 113 outbound eWay properties 25 outbound properties 27 overview sample Projects 69 P partner