background image

Chapter 6

Section 6.6

Reviewing the Sample Projects

Building and Deploying the prjIDocInbound Sample Project

eWay™ Adapter for SAP BAPI User’s Guide

94

Sun Microsystems, Inc.

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.

Steps required to create the IDOC_CREMAS03_4X_46A OTD:

1

Right-click your new Project in the Enterprise Designer’s Project Explorer, and 
select 

New

 > 

Object Type Definition

.

2

Select 

SAP IDoc

 from the list of OTD Wizards and click 

Next

.

3

Select the From 

SAP Directly

 radio button and click 

Next

.

4

Enter the system parameters for the SAP R/3 system and click 

Next

.

5

Enter the SAP R/3 system login parameters and click 

Next

.

6

Select the following IDoc parameters for the SAP Metadata:

Š

System Release: 

4.6C

Š

IDoc Type:

 CREAMAS03

Click the List IDocs button to display the IDoc Type List window. Scroll down to 
select the CREAMAS03 IDoc type (Vendor master data distribution)

7

Click 

Next

 to review your selections. To close this wizard and create the OTD, click 

Finish

.

Steps required to create the IDOC_MATMAS04_4X_46C OTD:

1

Right-click your new Project in the Enterprise Designer’s Project Explorer, and 
select New > Object Type Definition.

2

Select 

SAP IDoc

 from the list of OTD Wizards and click 

Next

.

3

Select the From 

SAP Directly

 radio button and click 

Next

.

4

Enter the system parameters for the SAP R/3 system and click 

Next

.

5

Enter the SAP R/3 system login parameters and click 

Next

.

6

Select the following IDoc parameters for the SAP Metadata:

Š

System Release:

 4.6C

Š

IDoc Type: 

MATMAS04 

Click the List IDocs button to display the IDoc Type List window. Scroll down to 
select the MATMAS04 IDoc type (Material Master).

7

Click 

Next

 to review your selections. To close this wizard and create the OTD, click 

Finish

.

Summary of Contents for eWay SAP BAPI

Page 1: ...SUN SEEBEYOND eWAY ADAPTER FOR SAP BAPI USER S GUIDE Release 5 1 3 ...

Page 2: ...s Unis Tous droits réservés Sun Microsystems Inc détient les droits de propriété intellectuels relatifs à la technologie incorporée dans le produit qui est décrit dans ce document En particulier et ce sans limitation ces droits de propriété intellectuels peuvent inclure un ou plus des brevets américains listés à l adresse http www sun com patents et un ou les brevets supplémentaires ou les applica...

Page 3: ...ended Audience 13 Text Conventions 13 Related Documents 14 Sun Microsystems Inc Web Site 14 Documentation Feedback 14 Chapter 2 Installing the eWay 15 Installing the SAP BAPI eWay 15 Installing the SAP BAPI eWay on an eGate supported system 15 Adding the eWay to an Existing Sun Java Composite Application Platform Suite Installation 16 After Installation 17 Extracting the Sample Projects and Javado...

Page 4: ... eWay 32 Server Connection Settings 32 MDB Settings 34 Outbound SAP BAPI eWay 35 Client Connection Settings 35 Connection Retry Settings 37 Connection Pool Settings 37 Chapter 4 Creating SAP BAPI OTDs 39 SAP BAPI Encoding 39 Date and Time Stamp Requirements 40 SAP JCo Installation 40 Procedures Windows 32 40 Procedures UNIX 41 Creating BAPI and RFC OTDs 41 BAPI and RFC OTDs 45 Chapter 5 Configurin...

Page 5: ... in the Connectivity Map 88 Configure the File eWay External Environment Properties 89 Configure the SAP BAPI eWay External Environment Properties 89 Create the Deployment Profile 90 Create and Start the Domain 91 Build and Deploy the Project 92 Run the Sample Project 92 Building and Deploying the prjIDocInbound Sample Project 92 Create a Project 93 Create the OTDs 93 Create the Java Collaboration...

Page 6: ...uild and Deploy the Project 115 Run the Sample 115 Additional Sample Project Scenarios 116 About Sending IDocs to SAP R 3 Using tRFCs 116 The RFC OTD used to send receive IDOCs 116 Client Mode sending IDOCs to SAP R 3 via IDOC_INBOUND_ASYNCRONOUS 117 Appendix A SAP Data Type Conversion Table 121 Index 122 ...

Page 7: ...his Release on page 11 What s In This Document on page 12 Sun Microsystems Inc Web Site on page 14 Documentation Feedback on page 14 1 1 About SAP SAP creates software for the Enterprise Resource Planning ERP business sector The company main product is SAP R 3 which uses a three tier application architecture database application server and client to facilitate real time data processing 1 2 About t...

Page 8: ... RFM requires the following parameters IMPORT parameters data provided to the BAPI EXPORT parameters data returned by the BAPI CHANGING parameters data provided to and or returned by the BAPI RFC TABLE parameters data provided to and or returned by the BAPI RFC The detailed metadata for these parameters such as descriptions of their value types and mandatory or optional nature can be found under S...

Page 9: ... below shows a non transactional outbound process Figure 3 Outbound Data Flow Java CAPS to SAP R 3 The figure above shows the following steps for the outbound data flow 1 The Collaboration or Business Process populates the appropriate BAPI or RFC Import Changing and Table parameter nodes on the BAPI RFC OTD with data from an inbound OTD 2 The eWay logs onto the SAP R 3 application using preconfigu...

Page 10: ... Process accesses all pertinent data nodes and sends the gathered information to other Java CAPS components 3 The eWay returns the results of the RFM execution back to SAP Inbound Data Flow via tRFC Communication via tRFC is the similar to RFC except that it adds transactional verification steps prior to committing or rolling back tRFC is preferred over RFC because of the additional reliability By...

Page 11: ...be committed by calling onCommitTID 5 The eWay updates the TID in the file database as being Committed commits the data and sends an onCommitTID return to SAP R 3 6 If the RFM call did not return successfully for any reason SAP R 3 informs the eWay that the data must be rolled back by calling onRollbackTID 7 The eWay sends an onRollbackTID return to SAP R 3 confirming that the TID was not committe...

Page 12: ...now support LDAP key values MDB Pool Size Support Provides greater flow control throttling by specifying the maximum and minimum MDB pool size Connection Retry Support Allows you to specify the number of attempts to reconnect and the interval between retry attempts in the event of a connection failure Relaunchable OTD Support An OTD can be rebuilt and saved under the same name then relaunched back...

Page 13: ...Conversion Table Provides a table that shows the mapping between SAP data types to the SAP JCo and their corresponding Java data types 1 4 1 Scope This document describes the process of installing configuring and running the SAP BAPI eWay This document does not cover the Java methods exposed by this eWay For information on the Java methods download and view the SAP BAPI eWay Javadoc files from the...

Page 14: ...web site is your best source for up to the minute product news and technical support information The site s URL is http www sun com 1 6 Documentation Feedback We appreciate your feedback Please send any comments or suggestions regarding this document to CAPS_docsfeedback sun com Monospaced Command line arguments code samples variables are shown in bold italic java jar filename jar Blue bold Hypert...

Page 15: ...ocess The following section describes how to install the components required for this eWay Refer to the readme for the latest information on Supported Operating Systems External System Requirements Java Composite Application Platform Suite Requirements Known Issues Note When the Repository is running on a UNIX operating system the eWays are loaded from the Java Composite Application Platform Suite...

Page 16: ...r the last SAR file has been selected 5 Once your product s installation is finished continue installing the Java Composite Application Platform Suite as instructed in the Composite Application Platform Suite Installation Guide 2 1 2 Adding the eWay to an Existing Sun Java Composite Application Platform Suite Installation It is possible to add the eWay to an existing Java CAPS installation Steps r...

Page 17: ...t pane 3 Click the icon next to Javadoc and extract the ZIP file Note that two separate Javadocs are contained within including Flight zip RFC_IDOC_ASYNCHRONOUS zip 4 Extract each ZIP and then open the index html within each extracted file to view the Javadoc Steps to extract the Sample Projects include 1 Click the Documentation tab of the Suite Installer then click the Add ons tab 2 Click the Sun...

Page 18: ...ject from the shortcut menu The Import Manager appears 2 Browse to and select your exported Project file 3 Click Import A warning message Missing APIs from Target Repository may appear at this time This occurs because various product APIs were installed on the ICAN 5 0 x Repository when the Project was created that are not installed on the Java CAPS 5 1 3 Repository These APIs may or may not apply...

Page 19: ...PS 5 1 3 since these fields in 5 1 3 are now represented as Java data type strings In 5 0 x these date fields were represented as data type java util Date 2 3 Installing Enterprise Manager eWay Plug Ins The Sun SeeBeyond Enterprise Manager also referred to as Enterprise Manager throughout the document is a Web based interface that allows you to monitor and manage your Java CAPS applications The En...

Page 20: ...ert is to warn the administrator or user that a condition has occurred To View the eWay Alert Codes 1 Add the eWay Enterprise Manager plug in for this eWay 2 From the Enterprise Manager s Explorer toolbar click the Configuration icon 3 Click the Web Applications Manager tab and go to the Manage Alert Codes sub tab Your installed eWay alert codes display under the Results section For information on...

Page 21: ...y is unable to connect to SAP R 3 and is in retry mode None SAPBAPI TIDFILE NOTAVAIL000006 Alert to indicate that the TID File is inaccessible Check that the directory for the TID file exists and has write permission for the user SAPBAPI CONNECT SERVER STARTED000007 Alert to indicate that SAP JCO Server is registered with SAP R 3 and started None SAPBAPI CONNECT SERVER STARTED ERROR000008 Alert to...

Page 22: ...ns for deploying applications to the Sun Java System Application Server provided in the Sun SeeBeyond eGate Integrator System Administration Guide Because automatic deployment is not supported directly from Enterprise Designer for the Weblogic Application Server additional instructions are provided below 2 4 1 WebLogic Application Servers 1 Build the EAR file which is generated in the Enterprise D...

Page 23: ...ers specific to the SAP BAPI eWay and may vary from other SAP BAPI eWays in the Project From the Environment Explorer tree which contains global SAP connectivity parameters that commonly apply to all SAP BAPI eWays SAP BAPI external systems having the same connectivity configuration in the Project Saved parameters are shared by all eWays in the SAP BAPI External System Properties window For additi...

Page 24: ...es 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 2 The Configuration properties window opens displaying the default properties for the eWay The properties default to the correct eWay direction In this case it opens properties for the outbound ...

Page 25: ...gories Inbound eWay Configuration Sections Include Server Connection Settings Outbound eWay Configuration Settings Include Client Connection Settings 3 3 1 Configuring the Inbound eWay Properties The Inbound eWay Properties include parameters required to receive data from SAP R 3 into Java CAPS The following server connection settings are configured in the Inbound eWay Properties window Server Con...

Page 26: ... provides a manifest If Enable RFC Trace is set to No then no trace file is generated RFC Trace Level Trace level specifies the complexity of the information in the trace file 0 provides minimal trace logging and 5 provides the maximum trace logging of diagnostic information in the trace file Integer value from 0 min to 5 max The default number is 0 The Enable RFC Trace level only affects the JCo ...

Page 27: ...ion of the Transaction ID Verification database Specify the name of the file based database which persists the TIDs Provide the path to the database file that records the disposition of all transactions outgoing from this eWay The database records whether transactions are C committed U unprocessed or rolled back R reserved or pending A valid path to the database file For example the default locati...

Page 28: ...same location under logicalhost is domains domain name config The JCoTrace log provides Java Runtime version and path information It also provides a manifest If Enable RFC Trace is set to No then no trace file is generated RFC Trace Level Trace level specifies the complexity of the information in the trace file 0 provides minimal trace logging and 5 provides the maximum trace logging of diagnostic...

Page 29: ...ack by calling BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK In this mode you must use the commit and rollback methods on the BAPI RFC OTD A transaction mode of Non Transactional or Transactional RFC tRFC via VIA COMMIT ROLLBACK BAPI The default mode is NON TRANSACTIONAL Transaction ID Verification Database Specifies the location of the Transaction ID Verification database Specify the name ...

Page 30: ...ove those TIDs from its TID tracking database and reduce resource consumption At least 1 row The default is 200 rows Enable ABAP Debug Window Enables the ABAP debugging window Enabling the Enable ABAP Debug Window property opens the ABAP debugging window on the Logical Host The window shows the debug information for the RFC enabled ABAP application that is called by SAP R 3 This property only work...

Page 31: ...al System created for the SAP BAPI Project and select Properties from the list box The Environment Configuration Properties window appears Figure 8 SAP BAPI eWay Environment Configuration 4 Click on any folder to display the default configuration properties for that section 5 Click on any property field to make it editable After modifying the configuration properties click OK to save the changes 3...

Page 32: ...onment properties include server connection parameters that are required to implement the project and are configured in the inbound eWay Environment Properties window The Inbound SAP BAPI eWay includes the following configuration section Server Connection Settings MDB Settings Server Connection Settings The following are the Server Connection Settings Table 6 Inbound SAP BAPI eWay Server Connectio...

Page 33: ...99 5 H 207 105 30 146 H Do not omit the H tokens to begin separate and end the routers A valid router string There is no default setting Gateway Service Specifies the gateway service of SAP R 3 The gateway service of the SAP R 3 system sends transactions The SAP recommended value is the string sapgw concatenated with the SAP system number For example if the system number is 00 the gateway service ...

Page 34: ...tting Password Specifies the password for the logon user An alphanumeric string There is no default setting Language Specifies the logon language used for SAP R 3 access by the eWay A base language is required Languages include EN English DE German JA Japanese KO Korean The default is EN English System ID Specifies the system ID of the SAP R 3 instance Any valid SAP System ID There is no default s...

Page 35: ...Required Value Application Server Hostname Specifies the host name of the SAP R 3 application server Any valid Hostname There is no default setting System Number Specifies the system number of the SAP R 3 application server Use this property when you are not using SAP load balancing For information refer to Use Load Balancing on page 30 Any numeric value There is no default setting Client Number S...

Page 36: ...ervice for the Application Server This parameter is optional and should be configured when NOT using SAP Load Balancing The SAP recommended value is the string sapgw concatenated with the SAP system number For example if the system number is 00 the gateway service is sapgw00 There is no default setting Message Server Hostname Specifies the host name of the R 3 Message Server IF using Load Balancin...

Page 37: ...AP gateway host For example if there are two routers saprouter1 and saprouter2 in order from the Logical Host to the SAP R 3 as follows saprouter1 204 79 199 5 saprouter2 207 105 30 146 The router string in this case is as follows H 204 79 199 5 H 207 105 30 146 H Do not omit the H tokens to begin separate and end the routers A valid router string There is no default setting Table 9 Outbound SAP B...

Page 38: ...Maximum pool size The maximum number of physical connections the pool should contain 0 zero indicates that there is no maximum The default number of connections is 10 Max Idle Timeout in Seconds A timer thread periodically removes unused connections This parameter defines the interval at which this thread runs This thread removes unused connections after the specified idle time expires It allows t...

Page 39: ... the SAP R 3 instance The default for all processed byte data is UTF 8 regardless of connection type Unicode or non Unicode When attempting to unmarshal data flows using an encoding other than UTF 8 such as UTF 16 then you must also call the setUnmarshalEncoding method to specify this encoding This enables the eWay to properly unmarshal the byte array You also need to set the correct Character Set...

Page 40: ...ap com connectors Once logged in this link redirects you to SAP Service Marketplace Click the following links to access the SAP Java Connector SAP JCo tools and services page SAP NetWeaver SAP NetWeaver in Detail Application Platform Connectivity Connectors SAP Java Connector Tools Services The following section details the basic guidelines for installation 4 3 1 Procedures Windows 32 The followin...

Page 41: ...correct 64 bit JCo files version 2 1 3 or later have been applied Note The SAP R 3 application must be configured to communicate with the SAP BAPI eWay as described in Configuring SAP R 3 in the SAP BAPI eWay Intelligent Adapter User s Guide Note We recommend only using the directory path when setting your library path not the directory path and file name Note JCo 2 1 6 does not support mixed case...

Page 42: ...signer 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 The System Parameters page appears ...

Page 43: ...ameters page appears 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 Language Language used for SAP R 3 access RFC Trace NO to disable RFC tracing...

Page 44: ... 44 Sun Microsystems Inc Figure 11 BAPI Wizard Login Parameters 7 Enter the information to log into the SAP system 8 Click Next The Select BAPI RFC page appears showing the application components For this option Enter Client Number Client number of the SAP R 3 system User name User name Password Login password ...

Page 45: ...C OTDs refer to the section below You can now built the Collaborations or Business Processes as described in Building and Deploying the prjBAPIOutbound Sample Project on page 71 and Building and Deploying the prjIDocInbound Sample Project on page 92 The section below describes the BAPI methods operations that are available for you to use in the Java Collaborations or Business Process 4 5 BAPI and ...

Page 46: ...er mode operations If required you can also use the Relaunch option of the OTD to relaunch the CostCenter OTD wizard see Figure 14 and rebuild the BAPI OTD for the same BAPI RFC Please note that selecting a BAPI RFC other than the original one used to build the OTD will corrupt your OTD and its associated Collaborations and Business Processes On Relaunch the OTD is rebuilt again with the changed m...

Page 47: ...Chapter 4 Section 4 5 Creating SAP BAPI OTDs BAPI and RFC OTDs eWay Adapter for SAP BAPI User s Guide 47 Sun Microsystems Inc Figure 14 CostCenter OTD Relaunch ...

Page 48: ...umentation supplied with your SAP R 3 system to determine the exact procedures What s In This Chapter Creating the RFC Destination for the eWay on page 48 Security Issues on page 67 5 1 Creating the RFC Destination for the eWay For the SAP BAPI eWay to receive communications from SAP R 3 you must set the eWay up as an RFC destination in SAP R 3 as described below To create the RFC destination for ...

Page 49: ...P R 3 Creating the RFC Destination for the eWay eWay Adapter for SAP BAPI User s Guide 49 Sun Microsystems Inc Figure 16 RFC Destination Maintenance Window 3 Click TCP IP connections and Create to display the RFC Destination entry window ...

Page 50: ...eWay Adapter for SAP BAPI User s Guide 50 Sun Microsystems Inc 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 T for the Connection Type TCP IP ...

Page 51: ...e 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 ...

Page 52: ... s Guide 52 Sun Microsystems Inc 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 ...

Page 53: ... 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 Refer to the documentation supplied with your SAP R 3 system to determine the exact procedures Figure 21 Distribution Model Hierarchy Following this high level setup you need to define Communications parameters in SAP R 3 to specify the correct routing of IDocs ...

Page 54: ...n Model The Communications Port defines a channel for communication of IDocs The Partner Profile acts as an identifier for the eGate system and provides a communications gateway by incorporating elements of the ALE interface 5 3 Configuring the Distribution Model You need to complete the following in SAP R 3 to run a tRFC BAPI inbound Naming the Logical System on page 54 Specifying the Distributio...

Page 55: ...ribution 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 This displays the Logical Systems Overview window 4 Click the New entries button to display the New Entries window 5 Enter the logi...

Page 56: ... 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 You are now returned to the Logical Systems Overview window and the new Logical System appears in the list 10 Click Save and select the Back button repeatedly...

Page 57: ...d 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 Transaction SALE Figure 27 SAP R 3 System Window 1 In the SAP R 3 System home window type SALE into the command field an...

Page 58: ...icrosystems Inc 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 ...

Page 59: ...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 This displays the Add Message Type dialog box Figure 32 Add Message Type Dialog Box 6 Type the desired values for the four parameters into the text boxes or sel...

Page 60: ...ibution Structure window 5 4 Configuring Communications This section describes the necessary communication configuration Defining the Communications Port on page 60 Creating a Partner Profile on page 62 Configuring a Partner Profile on page 64 5 4 1 Defining the Communications Port This section describes how to set up the communication port for Transactional RFC Transaction WE21 The Communications...

Page 61: ... 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 ...

Page 62: ...rt System turned on for this screen to be displayed 6 Select Create Request which displays the Create Request dialog window 7 Enter a Short description and Save 8 Select Back repeatedly to return to the SAP R 3 System window 5 4 2 Creating a Partner Profile Transaction WE20 Here you create the Partner for the Logical System you created earlier Note that the LS Partner Type is used for all ALE dist...

Page 63: ...s Guide 63 Sun Microsystems Inc 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 Partner Number window ...

Page 64: ...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 1 In the Partner Profile Initial Screen window select the desired Partner Number for example ZSRINI ...

Page 65: ...PI User s Guide 65 Sun Microsystems Inc 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 ...

Page 66: ...SAP R 3 Configuring Communications eWay Adapter for SAP BAPI User s Guide 66 Sun Microsystems Inc Figure 41 EDI Partner Profile Inbound Parameters Overview Window 4 Follow the same procedure for Outbound parameters as seen in Figure 42 ...

Page 67: ...urity 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 These settings are located under Cross Application Authorization Objects Refer to the SAP R 3 documentation for additional information Function...

Page 68: ...ring SAP R 3 Security Issues eWay Adapter for SAP BAPI User s Guide 68 Sun Microsystems Inc RFC1 SCCR SYST ZDG1 Permission for Processing BAPI Type Under BAPI EDI Distributing master data and BAPI EDI select Receiving BAPIs via RFC ...

Page 69: ...Project on page 70 Importing a Sample Project on page 71 Building and Deploying the prjBAPIOutbound Sample Project on page 71 Building and Deploying the prjIDocInbound Sample Project on page 92 6 1 About the Sample Projects Two sample Projects are included with the SAP BAPI eWay These sample Projects enable you to see how Java CAPS can work with SAP R 3 applications The SAP BAPI eWay sample Projec...

Page 70: ...contains the prjIDocInbound sample project which demonstrates how to use an inbound RFC to receive IDocs In addition to the sample Project the SAP_BAPI_eWay_Sample zip file also contains the following files generated by running the prjIDocInbound sample Project CREMASoutput1 dat a sample output file containing CREMAS message type data MATMASoutput1 dat a sample output file containing MATMAS messag...

Page 71: ...tains the sample Project ZIP file Select a sample Project file and click Import 4 Click Close after successfully importing the sample Project 6 5 Building and Deploying the prjBAPIOutbound Sample Project The following sections provide instructions on how to manually create the sample Project which was based on SAP R 3 6 0 ECC This sample demonstrates how to use the GetList BAPI of the Flight busin...

Page 72: ...turn results of flight lists CustBAPI Custom defined OTD that is used to receive and send data to the triggering Business Process Additional information on creating OTDs is found at Creating SAP BAPI OTDs on page 39 Steps required to create the Flight OTD 1 Right click your new Project in the Enterprise Designer s Project Explorer and select New Object Type Definition The New Object Type Definitio...

Page 73: ...tion Definition you can write the Business Rules using the Collaboration Editor Steps required to create the jcdFlightGetList Collaboration 1 From the Project Explorer right click the sample Project and select New Collaboration Definition Java from the shortcut menu The Collaboration Definition Wizard Java appears 2 Name your Collaboration jcdFlightGetList 3 Under Web Service Type select New Creat...

Page 74: ...ess 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 Figure 44 jcdFlightGetList Collaboration 2 Click the Math icon from the Business Rules Designer toolbar and select Literal number from the drop down list Give the number a value of 3 and connect...

Page 75: ...Microsystems Inc 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 ...

Page 76: ...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 Next drag TYPE located under jcdFlightGetList GetList Return to str String in the conca...

Page 77: ...Inc 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 ...

Page 78: ...lding and Deploying the prjBAPIOutbound Sample Project eWay Adapter for SAP BAPI User s Guide 78 Sun Microsystems Inc Figure 48 jcdFlightGetList Collaboration 7 Connect the result String in the concat to the test1 field located under jcdFlightGetList output ...

Page 79: ...nContext collabContext public com stc codegen util TypeConverter typeConverter public void flightInput ud1 CustBAPI_1621432015 CustBAPI input ud1 CustBAPI_1621432015 CustBAPI output flight Flight Flight_1 throws Throwable Flight_1 getGetList getImportParams setAIRLINE input getTest1 Flight_1 getGetList getImportParams setMAX_ROWS 3 Flight_1 getGetList execute if Flight_1 getGetList hasRETURN for i...

Page 80: ...ess1 to bpBAPIOutbound 2 Drag a FileClient receive and a FileClient write Activity located under Sun SeeBeyond eWays File FileClient to the Business Process canvas Figure 50 bpBAPIOutbound eInsight Business Process 3 From the Business Process toolbar drag a Scope to the canvas Once on your canvas double click the icon to expand the scope Figure 51 bpBAPIOutbound eInsight Business Process 4 Drag a ...

Page 81: ...tGetList 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 Figure 54 bpBAPIOutbound eInsight Business Process business rule 7 From the Business Process toolbar drag a Catch Named Exception from the Intermediate Events drop down list to the Fault Handler canvas icon the icon on ...

Page 82: ...y 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 10 Double click the Business Rule activity and then in the Business Rules Designer connect the Message field located under jcdFlightGetList flightInput Fault to the TextMessage field located under JMS Send Input JMS MessageProperties Figure...

Page 83: ...om 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 Fault Figure 58 bpBAPIOutbound eInsight Business Process Exception Handler Note Review the Sun SeeBeyond eInsight Business Process Manager User s Guide for a more detailed description of the steps required to ...

Page 84: ...ar to the canvas The cmBAPIOutbound Connectivity Map in the prjBAPIOutbound Project requires the following components File External Application x2 SAP BAPI External Application jcdFlightGetList Java Collaboration bpBAPIOutbound eInsight Business Process JMS Queue Any eWay added to the Connectivity Map is associated with an External Application To establish a connection to SAP BAPI first select SAP...

Page 85: ...vas 2 Double click both the cmBAPIOutbound_bpBAPIOutbound Business Process and the cmBAPIOutbound_jcdFlightGetList Collaboration to display their Binding dialog boxes Map the following Services jcdFlightGetList under Invoked Services of cmBAPIOutbound_bpBAPIOutbound to CustBAPI under Implemented Services of cmBAPIOutbound_jcdFlightGetList FileSender under Implemented Services of cmBAPIOutbound_bpB...

Page 86: ...erprise Designer s Environment Editor Steps required to create an Environment 1 From the Enterprise Designer s Enterprise Explorer click the Environment Explorer tab 2 Right click the Repository and select New Environment A new Environment is added to the Environment Explorer tree 3 Rename the new Environment to envBAPIOutbound 4 Right click envBAPIOutbound and select New SAP BAPI External System ...

Page 87: ...JMS IQ Manager A new SBJMSIQMgr1 gets added to the Environment Explorer tree under lhBAPIOutbound A screen shot of the Environment components is seen in Figure 61 Figure 61 Environment Editor envBAPIOutbound 9 Save your current changes to the Repository 6 5 8 Configure the eWays eWays facilitate communication and movement of data between the external applications and the eGate system The Connectiv...

Page 88: ... txt 2 Click OK to save your changes and close the window Steps required to configure the Outbound File eWay properties 1 Double click the eaFileOut eWay and modify the following property for your system Parameter Settings Output File Name outputFlight d dat 2 Click OK to save your changes and close the window Steps required to configure the Outbound SAP BAPI eWay properties 1 Double click the eaS...

Page 89: ...d modify the following properties Directory C temp Configure the SAP BAPI eWay External Environment Properties The prjBAPIOutbound sample Project requires outbound eWay Environment properties Steps required to configure the outbound SAP BAPI eWay Environment properties 1 Expand the envBAPIOutbound Environment in the Environment Explorer 2 Right click esBAPIExt and select Properties The Properties ...

Page 90: ...ick the prjBAPIOutbound Project and select New Deployment Profile 2 Enter a name for the Deployment Profile for this sample dpSAPBAPI Select envBAPIOutbound 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 63 Client Number An alphanumeric string Do not omit leading...

Page 91: ...ion of your Java Composite Application Suite installation 2 Double click the domainmgr bat file The Domain Manager appears 3 If you have already created a domain select your domain in the Domain Manager and click the Start an Existing Domain button Once your domain is started a green check mark indicates that the domain is running 4 If there are no existing domains a dialog box indicates that you ...

Page 92: ... Administration Guide 6 5 12 Run the Sample Project Additional steps are required to run the deployed sample Project Steps required to run the sample Project 1 Use the inputBAPIFlightGetList txt trigger file included in the sample Project to execute the SAP BAPI function module The File eWay polls the directory for the input file name as defined in the Inbound File eWay Properties window The Busin...

Page 93: ...ght click the Repository and select New Project A new Project Project1 appears on the Project Explorer tree 3 Click twice on Project1 and rename the Project for this sample prjIDocInbound 6 6 2 Create the OTDs The sample Project requires three OTDs to interact with the SAP BAPI eWay These OTDs include RFC_IDOC_INBOUND_ASYNCHRONOUS The RFC OTD that is used to receive or send IDocs to SAP R 3 IDOC_C...

Page 94: ... IDoc parameters for the SAP Metadata System Release 4 6C IDoc Type CREAMAS03 Click the List IDocs button to display the IDoc Type List window Scroll down to select the CREAMAS03 IDoc type Vendor master data distribution 7 Click Next to review your selections To close this wizard and create the OTD click Finish Steps required to create the IDOC_MATMAS04_4X_46C OTD 1 Right click your new Project in...

Page 95: ...aster Steps required to create the jcdProcessCREMAS Collaboration 1 From the Project Explorer right click the sample Project and select New Collaboration Definition Java from the shortcut menu The Collaboration Definition Wizard Java appears 2 Enter a Collaboration Definition name for this sample jcdProcessCREMAS 3 Under Web Service Type select New Create a new Web Service operation and then click...

Page 96: ... 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 the marshal method appears in the Business Rules Designer window 2 Connect result byte to byteArray under jcdProcessCREMAS FileClient_1 Figure 65 jcdProcessCREMAS Business Rule 3 From the Business Rules toolbar select the...

Page 97: ..._46A IDOC_CREMAS03_4X_46A input com stc sapale iDOC_CREMAS03_4X_46A IDOC_CREMAS03_4X_46A output com stc connector appconn file FileApplication FileClient_1 throws Throwable FileClient_1 setByteArray input marshal FileClient_1 writeBytes Steps required to create the jcdProcessMATMAS Collaboration 1 From the Project Explorer right click the sample Project and select New Collaboration Definition Java...

Page 98: ... jcdProcessMATMAS Collaboration is created Figure 67 jcdProcessMATMAS Creating the Collaboration Business Rules The following steps demonstrate how the business rules for the jcdProcessMATMAS Collaboration 1 From the Business Rules toolbar select the Rule icon Next right click input located under jcdProcessMATMAS and choose Select method to call from the list of available options Select the marsha...

Page 99: ...on Next right click FileClient_1 located under jcdProcessMATMAS and choose Select method to call from the list of available options Select the writeBytes method Figure 69 jcdProcessMATMAS Business Rule 4 The resulting Collaboration displays the following code package prjIDocInbound public class jcdProcessMATMAS public com stc codegen logger Logger logger public com stc codegen alerter Alerter aler...

Page 100: ...n which the business rules are defined Steps required to create the 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 The eInsight Business Process Designer appears and BusinessProcess1 is added to the Project Explorer tree Rename BusinessProcess1 to bpIDocInbound 2 Drag a IDOC_INBOUND_ASYNCH...

Page 101: ...o 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 Figure 73 bpIDocInbound Business Rule 6 From the Project Explorer drag inputCREMAS operation located under jcdProcessCREMAS and inputMATMAS operation locate...

Page 102: ...ts After adding the basic Business Process elements on the Business Process canvas complete the following Configure the CREMAS Decision Gate Properties Configure the CREMAS Business Rules Configure the MATMAS Business Rules Steps to configure the Decision Gate Properties include 1 Rename the following components Decision to Check MSG Type Case 1 to Check if CREMAS Case 2 to Check if MATMAS 2 Doubl...

Page 103: ...ng the prjIDocInbound Sample Project eWay Adapter for SAP BAPI User s Guide 103 Sun Microsystems Inc 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 ...

Page 104: ...e 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 2 Expand the output element located under RFC_IDOC_INBOUND_ASYNCHRONOUS IDOC_INBOUND_ASYNCHRON OUSReceive Input and connect the...

Page 105: ... inputCREMAS activities 4 Connect the IDOC_CREMAS03_4X_46A unmarshal Output OTD to the jcdProcessCREMAS inputCREMAS Input OTD Figure 80 CREMAS Business Rule Steps to Configure the MATMAS Business Rules Include 1 Open the Business Rule that follows the Check if MATMAS condition 2 Expand the output element located under the input of the RFC_IDOC_INBOUND_ASYNCHRONOUS IDOC_INBOUND_ASYNCHRONOUSReceive ...

Page 106: ...the jcdProcessMATMAS inputMATMAS Input OTD Figure 82 MATMAS Business Rule Note Review the Sun SeeBeyond eInsight Business Process Manager User s Guide for a more detailed description of the steps required to connect and add business rules to a modeling elements in a business process 6 6 5 Create a Connectivity Map The Connectivity Map provides a canvas for assembling and configuring a Project s co...

Page 107: ...dProcessCREMAS Java Collaboration jcdProcessMATMAS Java Collaboration bpIDocInbound eInsight Business Process Any eWay added to the Connectivity Map is associated with an External Application To establish a connection to SAP BAPI first select SAP BAPI as an External Application to use in your Connectivity Map Steps required to select the External Systems 1 Click the External Application icon on th...

Page 108: ...laboration and the cmIDocInbound_jcdProcessMATMAS1 Collaboration to display their Binding dialog boxes Map the following Services jcdProcessCREMAS under Invoked Services of cmIDocInbound_bpIDocInbound1 to IDOC_CREMAS03_4X_46A under Implemented Services of cmIDocInbound_jcdProcessCREMAS1 jcdProcessMATMAS under Invoked Services of cmIDocInbound_bpIDocInbound1 to IDOC_MATMAS04_4X_46C under Implemente...

Page 109: ... Integration Servers and Message Servers used by a Project and contain the configuration information for these components Environments are created using the Enterprise Designer s Environment Editor Steps required to create an Environment 1 From the Enterprise Designer s Enterprise Explorer click the Environment Explorer tab 2 Right click the Repository and select New Environment A new Environment ...

Page 110: ...ght click lhIDocInbound and select New Integration Server A new Integration Server IntegrationSvr1 is added to the Environment Explorer tree under lhIDocInbound Rename the Integration Server isBAPIInbound Figure 85 Environment Editor envIDocInbound 8 Save your current changes to the Repository 6 6 8 Configure the eWays eWays facilitate communication and movement of data between the external applic...

Page 111: ...utput d dat 2 Click OK to save your changes and close the window 3 Double click the eaFileOutMATMAS eWay and modify the following property for your system Parameter Settings Output File Name MATMASoutput d dat 4 Click OK to save your changes and close the window Steps required to configure the inbound SAP eWay properties 1 Double click the eaSAPBAPIIn eWay and modify the following properties for y...

Page 112: ...mp Configure the SAP BAPI eWay External Environment Properties The prjIDocInbound sample Project requires inbound eWay Environment properties Steps required to configure the inbound SAP BAPI eWay Environment properties 1 Expand the envIDocInbound Environment in the Environment Explorer 2 Right click esSAPExt and select Properties The Properties window appears 3 Click Client Configuration Settings ...

Page 113: ... Project Explorer right click the prjIDocInbound Project and select New Deployment Profile Application Server Hostname 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 Password An alphanumeric st...

Page 114: ...main 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 CAPS Steps required to create and start the domain 1 Navigate to your JavaCAPS51 logicalhost directory where JavaCAPS51 is the location of your Java Composite Application Suite installation 2 Double click the domainmgr...

Page 115: ... 3 After the Build has succeeded you are ready to deploy your Project Deploy the Project 1 From the Deployment Editor toolbar click the Deploy icon Click Yes when the Deploy prompt appears 2 A message appears when the project is successfully deployed You can now test your sample 3 You can also deploy applications using Enterprise Manager For more information see the Sun SeeBeyond eGate Integrator ...

Page 116: ...SYNCHRONOUS RFC OTD and the BAPI eWay The RFC OTD used to send receive IDOCs The figure below shows the RFC OTD IDOC_INBOUND_ASYNCRONOUS created via the SAP BAPI OTD Wizard Figure 88 RFC OTD In the OTD Editor you can see that this OTD has marshal unmarshal methods as well as an executeAsyncronous method which takes a string EID event ID as a parameter Sending or receiving IDOCs to or from SAP is a...

Page 117: ...n alone in an eInsight Business Processes Client Mode sending IDOCs to SAP R 3 via IDOC_INBOUND_ASYNCRONOUS The following screen illustrates and example Business Process to send IDocs to SAP R 3 Figure 89 Business Process The example seen in Figure 89 shows that we receive IDoc data from a File unmarshal it to the RFC OTD and call the Execute web service Figure 90 displays the business rule betwee...

Page 118: ...e 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 Figure 91 Execute Operation Property Sheet 4 Assign a unique GUID to the EID node of the unmarshal output container To do this A Create a link between RFC_IDO...

Page 119: ...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 Figure 92 Unmarshal Execute business rule Note that the IDOC_INBOUND_ASYNCRONOUS is used to send and receive IDOCs via Transactional RFC Asynchronous operation Therefore the Transaction Mode Configuration of the BA...

Page 120: ...apter 6 Section 6 7 Reviewing the Sample Projects Additional Sample Project Scenarios eWay Adapter for SAP BAPI User s Guide 120 Sun Microsystems Inc Figure 93 Client Mode Connectivity Map using BAPI eWay ...

Page 121: ...AP 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 TYPE_BCD BigDecimal D Date JCO TYPE_DATE String T Time JCO TYPE_TIME String F Float JCO TYPE_FLOAT double X Raw data JCO TYPE_BYTE byte g String ...

Page 122: ...0 114 distribution model 54 57 E EAR File deploying 22 Enable ABAP Debug Window 30 89 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 G Gateway Hostname 32 36 112 Gateway Service 33 36 112 I IDoc OTD creating 41 Importing sample Projects 71 installation 15 20 Install...

Page 123: ...3 using 41 SAP Java Connector installation 40 SAP JCo installation 41 SAP system configuration communications port 60 distribution model 54 57 logical system name 54 partner profile 62 64 RFC destination 48 security 67 SAP_BAPI_eWay_Sample zip 69 security SAP 67 Server connection settings inbound 25 27 32 34 Setting Properties Client connector settings 35 configuring SAP BAPI eWay 23 connection re...

Reviews: