Mysap4 60
Mysap4 60
Mysap4 60
30September2004
This edition of this document applies to the adapter for mySAP.com, for BASIS 4.0–4.6, SAP Web AS 6.20
(5724-H01), version 6.0.x.
To send us your comments about IBM WebSphere Business Integration documentation, email doc-
comments@us.ibm.com. We look forward to hearing from you.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
© Copyright International Business Machines Corporation 1997, 2004. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Chapter 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Adapter environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Connector architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
How the vision connector framework works . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 12. Developing business objects for the ALE Module . . . . . . . . . . . 135
iv Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Creating the IDoc definition file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Business object structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Supported verbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Processing multiple IDocs with a wrapper business object . . . . . . . . . . . . . . . . . . . 147
Chapter 15. Developing business objects for the RFC Server Module . . . . . . . . 161
Business object naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Business object structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Supported verbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Business object attribute properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Business object application-specific information . . . . . . . . . . . . . . . . . . . . . . . 166
Using generated business objects and business object handlers . . . . . . . . . . . . . . . . . . 169
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve
Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Business object development utilities . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Business object names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Business object structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Business object attribute properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Business object application-specific information . . . . . . . . . . . . . . . . . . . . . . . 188
Generating business objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Chapter 20. Installing and customizing the ABAP Extension Module . . . . . . . . . 209
Connector transport file installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Verifying connector transport file installation . . . . . . . . . . . . . . . . . . . . . . . . 213
Upgrading the ABAP Extension Module . . . . . . . . . . . . . . . . . . . . . . . . . 213
Enabling the SAP application for the connector . . . . . . . . . . . . . . . . . . . . . . . 214
Modifying adapter-delivered ABAP objects . . . . . . . . . . . . . . . . . . . . . . . . 216
Preventing event ping-pong . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Contents v
Chapter 21. Business object processing in the ABAP Extension Module . . . . . . . 219
Business object conversion to a flat structure . . . . . . . . . . . . . . . . . . . . . . . . 220
Business object data routing to ABAP handlers . . . . . . . . . . . . . . . . . . . . . . . 223
How ABAP handlers process business object data . . . . . . . . . . . . . . . . . . . . . . 224
Flat structure conversion to a business object . . . . . . . . . . . . . . . . . . . . . . . . 229
Chapter 22. Developing business objects for the ABAP Extension Module . . . . . . 231
Background information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Developing business objects using dynamic transaction . . . . . . . . . . . . . . . . . . . . 236
Developing business objects using IDocs . . . . . . . . . . . . . . . . . . . . . . . . . 241
Calling the ABAP Extension Module and ABAP handler . . . . . . . . . . . . . . . . . . . . 249
Chapter 23. Developing event detection for the ABAP Extension Module . . . . . . . 251
Designing an event detection mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 251
Implementing an event detection mechanism . . . . . . . . . . . . . . . . . . . . . . . . 255
vi Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Connector-specific configuration properties . . . . . . . . . . . . . . . . . . . . . . . . 325
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Programming interface information . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Trademarks and service marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Contents vii
viii Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figures
1. Configuring agent properties . . . . . . . 7 42. Providing additional information for an HDR
2. Architecture of the connector for SAP . . . . 8 business object . . . . . . . . . . . 70
3. Vision connector framework and connector 43. 512 byte warning . . . . . . . . . . 70
modules . . . . . . . . . . . . . . 9 44. Size and type of BO properties for an HDR
4. Multi-Threading architecture of the connector business object . . . . . . . . . . . 71
for SAP . . . . . . . . . . . . . . 12 45. Saving business object definition . . . . . 71
5. Selecting the ODA . . . . . . . . . . 47 46. BAPI Module architecture . . . . . . . . 90
6. Configuring agent properties . . . . . . . 48 47. Business object processing for the BAPI
7. Tree with expanded nodes . . . . . . . 51 Module . . . . . . . . . . . . . . 91
8. Caching notification . . . . . . . . . . 52 48. Mapping between a business object and a
9. Associating a file and entering search criteria 52 BAPI . . . . . . . . . . . . . . . 99
10. Confirming selection of nodes and leaves 53 49. Correspondence between a business object
11. Generating the definition . . . . . . . . 53 and an example BAPI . . . . . . . . . 104
12. Providing additional information for an IDoc 50. ALE Module architecture . . . . . . . 116
type business object . . . . . . . . . . 55 51. Business object event processing . . . . . 126
13. Specifying function modules for the ABAP 52. Relationship of WebSphere business objects
handler . . . . . . . . . . . . . . 56 for SAP and an IDoc . . . . . . . . . 137
14. Specifying the ABAP handler in Business 53. Relationship Between data record business
Object Designer . . . . . . . . . . . 56 object and IDoc Definition fields . . . . . 145
15. Providing additional information for BOR or 54. Wrapper business object containing child
RFC business objects . . . . . . . . . 58 business objects . . . . . . . . . . . 148
16. Specifying attributes for removal from the 55. RFC Server Module architecture . . . . . 153
definition . . . . . . . . . . . . . 58 56. Business object processing . . . . . . . 156
17. Caching notification . . . . . . . . . . 59 57. Mapping between a business object and a
18. Enter a Search Pattern . . . . . . . . . 59 BAPI . . . . . . . . . . . . . . 164
19. Search results tree expanded for RFC node 60 58. Mapping between a business object and an
20. Confirm source nodes for BAPI calls in the example BAPI . . . . . . . . . . . 168
transaction . . . . . . . . . . . . . 60 59. Hierarchical Dynamic Retrieve Module
21. Multiple BAPI call selection message . . . . 61 architecture . . . . . . . . . . . . 175
22. Assign a prefix and business object name to 60. Example customer and address relationship 181
the transaction . . . . . . . . . . . 61 61. Multiple-cardinality business object
23. Assign a BAPI call sequence within the BAPI relationship . . . . . . . . . . . . 182
transaction object . . . . . . . . . . 62 62. Example customer and sales view
24. Optional BAPI call parameters message 62 relationship . . . . . . . . . . . . 182
25. Attributes tab for the sap_salesorder_txn 63. Example: current business object stores the
business object . . . . . . . . . . . 63 foreign key . . . . . . . . . . . . 190
26. Configure Agent window with ResultSet 64. ABAP Extension Module architecture 195
property set to True . . . . . . . . . . 63 65. Business object processing of doVerbFor() 198
27. Caching notification . . . . . . . . . . 64 66. Adapter-provided business object processing
28. Search criteria for ResultSets . . . . . . . 64 components . . . . . . . . . . . . 199
29. Search results tree expanded for RFC node 64 67. Event notification process . . . . . . . 201
30. Confirm source nodes for attributes . . . . 65 68. /CWLD/ADD_TO_QUEUE . . . . . . . 205
31. Provide business object name information 66 69. /CWLD/ADD_TO_QUEUE_IN_FUTURE 205
32. Specify the Query attribute of the business 70. Event priority with function module
object . . . . . . . . . . . . . . 66 /CWLD/ADD_TO_QUEUE . . . . . . . 207
33. Select the primary key . . . . . . . . . 67 71. Business object processing . . . . . . . 220
34. Select a field on the table/structure . . . . 67 72. Conversion from a business object to a flat
35. Notification of Query attribute name . . . . 68 structure . . . . . . . . . . . . . 222
36. Select the foreign key . . . . . . . . . 68 73. Flat business object SAP_Material . . . . . 227
37. Foreign key path confirmation . . . . . . 68 74. Hierarchical business object SAP sales order
38. Optional parameters notification for the (IDoc) . . . . . . . . . . . . . . 228
GETLIST BAPI . . . . . . . . . . . 69 75. IDoc handler architecture . . . . . . . 241
39. Set property values for the ResultSet object. 69 76. Business Object Wizard—Select Agent 283
40. Optional parameters notification for the 77. Business Object Wizard—Select Source 284
GETDETAIL BAPI . . . . . . . . . . 69 78. Test Connector . . . . . . . . . . . 285
41. Attributes tab of the ResultSet object . . . . 70 79. Test Connector—New Profile . . . . . . 285
Such issues are unique to every customer deployment and must be measured
within or close to the exact environment where the adapter is to be deployed. You
should contact your IBM services representative to discuss the configuration of
your deployment site, and for details on planning and evaluating these kinds of
metrics, given your specific configuration.
Audience
This document is for IBM consultants and customers. You should be familiar with
SAP and WebSphere business integration system adapter development.
Related documents
The complete set of documentation available with this product describes the
features and components common to all WebSphere Business Integration Adapters
installations, and includes reference material on specific components.
You can download, install, and view the documentation at the following sites:
v For general adapter information; for using adapters with WebSphere message
brokers (WebSphere MQ Integrator, WebSphere MQ Integrator Broker,
WebSphere Business Integration Message Broker); and for using adapters with
WebSphere Application Server, see the IBM WebSphere Business Integration
Adapters InfoCenter:
http://www.ibm.com/websphere/integration/wbiadapters/infocenter
v For using adapters with WebSphere InterChange Server, see the IBM WebSphere
InterChange Server InfoCenters:
http://www.ibm.com/websphere/integration/wicserver/infocenter
http://www.ibm.com/websphere/integration/wbicollaborations/infocenter
v For more information about WebSphere message brokers:
http://www.ibm.com/software/integration/mqfamily/library/manualsa/
v For more information about WebSphere Application Server:
http://www.ibm.com/software/webservers/appserv/library.html
Typographic conventions
This document uses the following conventions:
Naming conventions
In this document the following naming conventions are used:
v The connector component of the adapter for mySAP.com is referred to simply as
the connector.
v The “connector” refers to the combination of the Vision Connector Framework
and a connector module.
xii Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
New in this release
New in version 6.0.x
This release of the document contains the following new information:
Editorial changes:
v The title of this manual has changed from Adapter for mySAP.com User Guide
(SAP R/3 V.4.x) to Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web
AS 6.20)
v Certain parts and chapters of this manual have been restructured for editorial
clarification.
v The title of the IBM CrossWorlds Station tool has changed to ″IBM WebSphere BI
Station.″
SAPODA changes:
v New configure agent properties have been added to the Configure Agent
window of the Business Object Designer wizard. The properties enable new
connector features, such as BAPI transaction and ResultSet support. For details,
see Table 5 on page 48.
v SAPODA provides caching support of search results in RFC nodes. The caching
service runs in the background whenever you start SAPODA and the cached
searches are purged when you end the session. For details, see “Expand nodes
and select objects” on page 50.
v SAPODA supports BAPI transaction objects. For details, see “BAPI transaction
business objects” on page 59.
v SAP provides ResultSet support for DB2 Information Integrator. For details, see
“ResultSet business objects” on page 63.
December 2003
v Adapter installation information has been moved from this guide. See Chapter 2
for the new location of this information.
v Beginning with version 5.5, the adapter for mySAP.com is no longer supported
on Microsoft Windows NT.
xiv Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
New in version 5.4.x
This section lists the new features and improvements made in this release.
v The Extension Module supports objects with hierarchy levels greater than eight.
v Support for newer versions of SAP JCo have been added, up to version 2.0.8.
v Performance enhancements have been made for service call requests in the ALE
Module.
v The Adapter for mySAP.com is now supported on HP-UX
Note: Patch releases refer to this version of the connector as mySAP.com R/3
Connector
This manual provides information about using this adapter with InterChange
Server (ICS) and WebSphere message brokers as your integration broker.
Important: Because the connector has not been internationalized, do not run it
against InterChange Server version 4.1.1 if you cannot guarantee that
only ISO Latin-1 data will be processed.
xvi Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v This manual documents how to specify ALE Communication Partner
information in application-specific information. For more information, see
“Parent wrapper business object” on page 139.
Important: BAPI business object handlers generated before the IBM CrossWorlds
Connector for SAP version 4.3.0 are not thread-safe. To guarantee
data consistency and integrity when using multi-threading, you must
regenerate these business object handlers. The business objects do
not require any change.
v The connector running on Solaris now uses SAP’s Java API and fully supports
all connector modules. Because IBM WebSphere does not ship the Java API, you
must download it from SAP’s website. For more information, see “Adapter
dependencies” on page 5.
v Corrections have been made to the following sections of the Overview:
– “Communication between the connector and an SAP application” on page 9
– “Processing business objects” on page 10
v The connector no longer uses the CharacterEncoding configuration property.
v The connector uses the RefreshLogonCycle configuration property differently.
For more information, see “RefreshLogonCycle” on page 331.
v A new section that documents a namespace problem has been added to the
troubleshooting chapter: “Event distribution problem on Microsoft Windows
(connector version 4.2.7 only)” on page 76.
xviii Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
“NumberOfListeners” on page 331, “PollQuantity” on page 331,
RefreshLogonCycle, “RfcProgramId” on page 331, and “RfcTraceOn” on page
331.
v During startup, a temporary log file is created that contains all of the startup
messages. For more information, see .
The connector for mySAP.com is a run time component of the WebSphere Business
Integration Adapter for mySAP.com. The mySAP.com Adapter includes a
connector, message files, configuration tools, and an Object Discovery Agent
(ODA). The connector allows the WebSphere integration broker to exchange
business objects with SAP applications.
Adapter environment
Before installing, configuring, and using the adapter, you must understand its
environment requirements. This section contains the following topics:
v “Broker compatibility”
v “Adapter supported software and standards” on page 5
v “Adapter platforms” on page 4
v “Adapter dependencies” on page 5
v “Common event infrastructure” on page 6
v “Application response measurement” on page 6
v “Locale-dependent data” on page 6
Broker compatibility
This adapter runs with the WebSphere Business Integration Adapter
FrameworkV2.6 and requires one of the following:
v WebSphere InterChange ServerV4.2.2,V4.3
v WebSphere MQ IntegratorV2.1
v WebSphere MQ Integrator BrokerV2.1
v WebSphere Business Integration Message BrokerV5.0.1
v WebSphere Application Server EnterpriseV5.0.2, in conjunction with WebSphere
Studio Application Developer Integration EditionV5.0.1
v WebSphere Business Integration Server FoundationV5.1.1
Note: For instructions on installing the integration broker and its prerequisites, see
the following documentation.
For WebSphere InterChange Server (ICS), see the System Installation Guide for
UNIX or for Windows.
http://www.ibm.com/software/integration/mqfamily/library/manualsa/
http://www.ibm.com/software/webservers/appserv/library.html
Adapter platforms
In addition to a broker, this adapter requires one of the following operating
systems:
v All operating system environments require the Java compiler (IBM JDK 1.4.2 for
Windows 2000) for compiling custom adapters
v AIX:
AIX 5.1 with Maintenance Level 4
AIX 5.2 with Maintenance Level 1. This adapter supports 32-bit JVM on a
64-bit platform.
v Solaris:
Solaris 8 (2.8) with Solaris Patch Cluster dated Feb. 11, 2004 or later
Solaris 9 (2.9) with Solaris Patch Cluster dated February 11, 2004 or later. This
adapter supports 32-bit JVM on a 64-bit platform.
v HP-UX:
HP-UX 11.i (11.11) with June 2003 GOLDBASE11i and June 2003 GOLDAPPS11i
bundles
v Linux:
Red Hat Enterprise Linux AS 3.0 with Update 1
Red Hat Enterprise Linux ES 3.0 with Update 1
Red Hat Enterprise Linux WS 3.0 with Update 1
SUSE Linux Enterprise Server x86 8.1 with SP3
SUSE Linux Standard Server x86 8.1 with SP3
4 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Framework (administrative tools only)
Windows 2003 (Standard Edition or Enterprise Edition)
Adapter dependencies
Prior to installing the connector:
v Install the most recent SAP Support Package for your version of SAP.
SAP delivers Support Packages for: Basis, the R/3 application, ABAP, and HR.
They provide bug fixes for the ABAP code in the SAP application. Use an
updated SAP kernel. The kernel is the executables, written in C++, that carry out
transports, interface with the operating system, communicate with the database,
and run the system.
v Set up a CPIC user account in the SAP application. Give this account the
necessary privileges to manipulate the data required by the business objects
supported by the connector.
For example, if the connector must perform certain SAP business transactions,
the connector’s account in the SAP application must have the permissions to
perform these transactions. You must set the connector-specific configuration
properties ApplicationUserName and ApplicationPassword using this account
information. For more information on how to set these properties, see Chapter 3,
“Configuring the connector,” on page 21 and Appendix E, “Connector-specific
configuration properties,” on page 325.
v Set up a user account in SAP with privileges to install and administer the
connector. The account should have the following characteristics:
– A valid SAP user name and password
– ABAP developer access
– Table configuration access
– Administration access for transactions SM21 and SM50 to administer and
monitor the connector
v If using the ALE Module, see “Prerequisites to running the ALE Module” on
page 121 for additional information on installing WebSphere MQ queues.
Chapter 1. Overview 5
For details about connector properties, see Chapter 3, “Configuring the
connector,” on page 21, Appendix D, “Standard configuration properties,” on
page 301, andAppendix E, “Connector-specific configuration properties,” on
page 325.
For more information, refer to the Common Event Infrastructure appendix in this
guide.
Locale-dependent data
The connector has been internationalized so that it can support multi-byte
character sets for non-Unicode SAP systems. Note that the information in this
section does not apply to Unicode-based SAP systems.
This adapter supports the processing of bidirectional script data for the Arabic and
Hebrew languages when the adapter is run in a Windows environment.
Bidirectional processing is not supported in non-Windows environments. To use
the bidirectional capacity, you must configure the bidirectional standard properties.
For more information, you must configure the bidirectional standard properties.
For more information, refer to the standard configuration properties fo connectors
in Appendix D, “Standard configuration properties,” on page 301.
When the connector transfers data from a location that uses one character code set
to a location that uses a different code set, it performs character conversion to
preserve the meaning of the data.
The Java runtime environment within the Java Virtual Machine (JVM) represents
data in the Unicode character code set. Unicode contains encodings for characters
in most known character code sets (both single-byte and multibyte). Most
components in the IBM WebSphere business integration system are written in Java.
Therefore, when data is transferred between most IBM WebSphere business
integration components, there is no need for character conversion.
Because this connector is written in Java, it does not need to convert application
data (including data in an IDoc file) written in native encoding. The SAP JCo
6 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
library converts such application data to Unicode before the connector processes it.
Figure 1 illustrates the components involved in data conversion.
JCO library
To log error and informational messages in the appropriate language and for the
appropriate country or territory, configure the Locale standard configuration
property for your environment. For more information on these properties, see
Appendix D, “Standard configuration properties,” on page 301.
Important: The character code set that SAP applications use for Japanese is
SAP-8000. This code set does not support MS932 characters. Also, SJIS
maps some characters to non-standard Unicode characters. Therefore,
the SAP JCo library cannot handle some characters. If these characters
are included in the SAP application or the IBM WebSphere business
object, the connector replaces them with the # or ? character. When
data contains these characters, it is not processed correctly, and the
connector does not report errors.
Terminology
The following terms are used in this guide:
v ASI (Application-Specific Information) Metadata tailored to a particular
application or technology. ASI exists at both the attribute and business object
level of a business object. See also Verb ASI.
v BO (Business Object) A set of attributes that represent a business entity (such as
Employee) and an action on the data (such as a create or update operation).
Components of the WebSphere business integration system use business objects
to exchange information and trigger actions.
v BO (Business Object) handler A connector component that contains methods
that interact with an application and that transforms request business objects
into application operations.
v Foreign key A business object attribute that defines the mapping of dependent
attributes.
v ODA (Object Discovery Agent) A tool that automatically generates a business
object definition by examining specified entities within the application and
“discovering” the elements of these entities that correspond to business object
attributes. When you install the adapter, the ODA is automatically installed.
Business Object Designer provides a graphical user interface to access the ODA
and to work with it interactively.
v Verb ASI (application-specific information) For a given verb, the verb ASI
specifies how the connector should process the business object when that verb is
active. The verb ASI contains the name of the method to call to process the
current request business object.
Chapter 1. Overview 7
Connector architecture
The connector for SAP is written in Java and consists of two parts: the vision
connector framework and connector modules (the connector’s application-specific
component, the connector framework, and business object handlers). The vision
connector framework provides a metadata-driven layer of abstraction to the
connector framework used by all WebSphere business integration system adapters.
The vision connector framework extends the methods in the adapter framework.
The connector modules extend the methods in the vision connector framework and
communicate with an SAP application.
Figure 2 illustrates the architecture of the connector and the relationship of the
adapter framework and vision connector framework. The visionConnectorAgent
class can implement any number of connector modules.
Figure 3 on page 9 illustrates the vision connector framework and its association
with connector modules.
8 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Vision connector framework
visionConnector visionBOHandler
The vision connector framework provides the following capabilities for the
connector:
v Calls any implementation of the init(), pollForEvents(), and terminate()
methods.
v Routes business objects to specific business object handlers based on the verb
application-specific information of a business object.
Connector modules
The connector modules are Java classes that extend the methods in the vision
connector framework. They support the vision connector framework by providing
specific functionality, such as logging into the SAP application, processing events
and business objects, and terminating the connection to the SAP application. The
connector modules carry out requests between the vision connector framework and
the SAP application. By default, the vision connector framework uses the
connectors\SAP directory as the root directory for the connector modules.
Connector modules may not use all of the framework methods. For example, one
module might use the init() and terminate() methods while another module
uses only the pollForEvents() method. However, every method in the
visionConnectorAgent and visionBOHandler classes must be implemented for each
connector module. Methods that a connector does not use must be implemented as
dummy methods, that is, they do nothing but exit.
Chapter 1. Overview 9
Processing business objects
The connector is metadata driven. Metadata, in the WebSphere business integration
system, is application-specific data that is stored in business objects and that assists
a connector module in its interaction with the application. A metadata-driven
connector module handles each business object that it supports based on metadata
encoded in the business object definition rather than on instructions hard-coded in
the connector module.
Business object metadata includes the structure of a business object, the settings of
its attribute properties, and the content of its application-specific information.
Because connector modules are metadata driven, they can handle new or modified
business objects without requiring modifications to the connector-module code.
The vision connector framework uses the value of the verb application-specific
information in the top-level business object to call the appropriate connector
module to process the business object. The verb application-specific information
provides the classname of the connector module.
For example:
AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler,
You need not specify the package name and classname for the verb
application-specific information if the business object is used:
v by the ALE Module to process application events; however, when you use the
ALE Module to process service call requests, you must specify the package name
and classname
v by the ABAP Extension Module, which uses the default business object handler
(sap.sapextensionmodule.VSapBOHandler)
10 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Most business object processing is specific to each connector module. For more
information on business object processing for the ABAP Extension Module, see
“Business object processing” on page 197, “Business object data and ABAP
handlers” on page 225, and “Configuring an object to be archived” on page 265.
Chapter 1. Overview 11
System-wide connector framework
init() DoVerbFor()
Terminate() PollForEvents()
visionBOHandler
visionConnector
Connection pool
Connector module
Connector modules
WebSphere Business
InterChange Server
SAP R/3
SAP gateway
Event processing
The connector performs the following steps when handling a poll call:
1. The adapter framework creates a single dedicated thread to handle poll calls.
This thread calls the pollForEvents() method of the vision connector
framework at the frequency specified in the PollFrequency configuration
property.
2. The thread polls SAP, which uses a dialog process to locate and return the
event.
12 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
The polling thread dies only when the connector shuts down.
Note: Because the RFC Server connector agent pushes events out of SAP instead of
polling for events, it spawns its own threads instead of using threads
created by the connector framework. Because the ALE connector agent uses
the RFC Server connector agent to access events, it also spawns its own
threads instead of using threads created by the connector framework when
it processes events.
Request processing
Independently of polling, the adapter framework can create multiple
request-processing threads, one for each request business object. Each request
thread instantiates the appropriate business object handler.
For example, when processing business object requests from InterChange Server,
the number and type of business object handlers depends on the number and type
of the collaborations sending the requests:
v If multiple collaborations send business objects, each request thread instantiates
a business object handler of the appropriate type.
v If a multi-threaded collaboration sends multiple business objects of the same
type, the request threads instantiate an equal number of business object handlers
of that type.
Chapter 1. Overview 13
SAP locks the dialog process while processing an interaction, releasing it only
when the interaction completes. Therefore, multiple concurrent requests lock an
equal number of dialog processes until processing finishes.
14 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 2. Installing the connector
This chapter describes how to install the connector component of the adapter for
mySAP.com, and contains the following sections:
v “Installing the connector for mySAP.com and related files” on page 15
v “Installing the SAP JCo” on page 18
v “Upgrading the connector for the ALE Module’s management of TIDs” on page
19
Important: If you are upgrading versions of the connector, you must replace the
connector Java Archive files (.jar). You also need to upgrade the
connector transport files as well as any business object transports that
you have previously installed. Depending on changes made to the
connector, you may need to load a new copy of the SAPConnector.txt
file into your repository. See the Release Notes for more information.
Installation tasks
To install the connector for mySAP.com, you must confirm that the necessary
connector prerequisites exist in your environment, install the integration broker,
and run the connector installation.
For details about installing the broker, see the appropriate implementation
documentation of the broker you are using.
http://www.ibm.com/websphere/integration/wbiadapters/infocenter
It is recommended that you choose a unique naming convention for each connector
component. For example, if you are using two connectors you could name them
SAP1Connector and SAP2Connector.
16 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
5. Initialize the connector configuration properties so that all connectors poll the
same SAP application for events.
6. Only if the IBM WebSphere InterChange Server is the integration broker, add
map references for each connector.
7. Specify the business objects supported by each connector.
8. Only if WebSphere InterChange Server is the integration broker, assign
collaborations to the appropriate connectors. Currently, a collaboration can be
handled by only one connector. If collaborations are already set up, you may
need to stop them and then rebind the ports.
9. If you are using the ABAP Extension Module for business object handing, set
up the distribution of events to each connector that you install. Use IBM
WebSphere BI Station (transaction /n/CWLD/HOME). See “Setting up event
distribution” on page 214 for instructions on setting up event distribution for
each combination of business object, integration broker, and connector.
Verifying installation
The installer copies the standard files associated with the connector into your
system. It installs the connector into the ProductDir\connectors\SAP directory.
Note that ProductDir represents the directory where the connector is installed.
Backslashes (\) are used as the convention for directory paths. For UNIX
installations, substitute slashes (/) for backslashes (\). All file pathnames are
relative to the directory where the product is installed on your system
Before you can use the connector, you must configure the connector from the
installer’s Connector Configuration screen. From this screen:
v Choose SAP from the Select Connector Name list.
v Click Install to have Installer generate the customized SAP wrapper,
connector_manager_SAP.
Note: For more information on installing the connector component, refer to the
System Installation Guide for UNIX.
18 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
SAP calls their Java API the Java Connector (SAP JCo). The connector for SAP
currently supports SAP JCo V.2.1.3.
1. Download the SAP JCo for the operating system on which your connector is
running. The SAP JCo is available for download from SAP’s website at
http://service.sap.com/connectors. You must have an SAPNet account to
access the SAP JCo (if you do not already have one, contact your local SAP
Basis administrator).
If the SAP JCo version that the connector supports is not available for
download from SAP Service Marketplace, please check the most current
adapter patch notes for the latest version of JCo that is supported or contact
your IBM representative.
2. Copy the following unzipped SAP JCo files into your environment:
UNIX:
From the zipped file, extract the executable jar file (sapjco.jar) and the
runtime libraries (librfccm and libsapjcorfc).
If you have already followed instructions for installing the adapter on the same
machine on which you install SAPODA, copy these files from the
\connectors\SAP directory to the \ODA\SAP directory. If you install SAPODA on
a different machine from the connector, after you unzip the SAP JCo files, copy
these three files to the \ODA\SAP directory.
Windows:
From the zip file, extract the executable jar file, (.jar extension) and the
runtime libraries (.dll extension). If you have already followed instructions for
installing the adapter on the same machine on which you install SAPODA,
copy these files from the \connectors\SAP directory to the \ODA\SAP directory.
If you install SAPODA on a different machine from the connector, after you
unzip the SAP JCo files, copy these three files (librfc32.dll, sapjco.jar, and
sapjcorfc.dll) to the \ODA\SAP directory. For Windows, the librfc32.dll
requires one or more C runtime dlls. The C runtime dlls depend on the version
of the SAP release being used.
Note: Through SAP release 45B, the C runtime dll required is msvcrt.dll
version 5.00.7022 or newer. Starting with SAP release 46A, the C runtime
dlls required are msvcrt.dll version 6.00.8267.0 or newer and
msvcp60.dll version 6.00.8168.0 or newer. The dll or dlls should be
copied into the C:\WINNT\system32 directory. This dll or these dlls
may already be present and if not, can be found on the “Presentation
CD” that contains the Windows SAPGUI setup in the folder
<cddrive>:\GUI\Windows\Win32\system. See SAP OSS note number
0182805 for more information.
Attention: To enable the ALE Module to process IDocs to and from the SAP
application, you must upgrade the connector. However, it is imperative that you
allow the current IDoc processing cycle to complete before upgrading the
connector.
To complete the processing of current files in the event and WIP directories:
v Temporarily halt the transmission of IDocs both to and from the connector.
v Verify that there are no IDocs (files) in the following directories when you
upgrade:
UNIX
$CROSSWORLDS/connectors/SAP/ale/events
$CROSSWORLDS/connectors/SAP/ale/wip
Windows
%CROSSWORLDS%\connectors\SAP\ale\events
%CROSSWORLDS%\connectors\SAP\ale\wip
UNIX
$CROSSWORLDS/connectors/SAP/ale/archive
Windows
%CROSSWORLDS%\connectors\SAP\ale\archive
Note: If, when using transaction SM58, you find unsuccessfully processed IDocs in
the SAP system, wait until the connector is upgraded to resubmit these
IDocs. After you complete the upgrade of the connector, correct the errors
and resubmit the IDocs for processing through the WebSphere MQ queues
using the new TID management.
Once these directories are clear, apply the upgrade and follow the configuration
instructions in:
v “Connector-specific configuration properties” on page 325
v Chapter 10, “Overview of the ALE Module,” on page 115
v Chapter 11, “Using the ALE Module,” on page 121
20 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 3. Configuring the connector
This chapter describes how to install and configure the adapter using Connector
Configurator.
If your adapter supports DB2 Information Integrator, use the WMQI options and
the DB2 II standard properties (see the Notes column in the standard properties
appendix.)
The mode in which you run Connector Configurator, and the configuration file
type you use, may differ according to which integration broker you are running.
For example, if WMQI is your broker, you run Connector Configurator directly,
and not from within System Manager (see “Running Configurator in stand-alone
mode” on page 22).
Because standard properties are used by all connectors, you do not need to define
those properties from scratch; Connector Configurator incorporates them into your
configuration file as soon as you create the file. However, you do need to set the
value of each standard property in Connector Configurator.
The range of standard properties may not be the same for all brokers and all
configurations. Some properties are available only if other properties are given a
specific value. The Standard Properties window in Connector Configurator will
show the properties available for your particular configuration.
Some properties in the Connector Configurator use directory paths, which default
to the Windows convention for directory paths. If you use the configuration file in
a UNIX environment, revise the directory paths to match the UNIX convention for
these paths. Select the target operating system in the toolbar drop-list so that the
correct operating system rules are used for extended validation.
To do so:
v From Start>Programs, click IBM WebSphere InterChange Server>IBM
WebSphere Business Integration Tools>Connector Configurator.
v Select File>New>Connector Configuration.
v When you click the pull-down menu next to System Connectivity Integration
Broker, you can select ICS, WebSphere Message Brokers or WAS, depending on
your broker.
You may choose to run Connector Configurator independently to generate the file,
and then connect to System Manager to save it in a System Manager project (see
“Completing a configuration file” on page 27.)
You can create a brand-new template for the connector-specific properties of your
connector, or you can use an existing connector definition as the template.
v To create a new template, see “Creating a new template” on page 23.
v To use an existing file, simply modify an existing template and save it under the
new name. You can find existing templates in your
\WebSphereAdapters\bin\Data\App directory.
After you have made selections for the general characteristics of the property, click
the Value tab.
Specifying values
The Value tab enables you to set the maximum length, the maximum multiple
values, a default value, or a value range for the property. It also allows editable
values. To do so:
1. Click the Value tab. The display panel for Value replaces the display panel for
General.
2. Select the name of the property in the Edit properties display.
3. In the fields for Max Length and Max Multiple Values, enter your values.
The Value column shows the value that you entered in the Property Value dialog
box, and any previous values that you created.
The Default Value column allows you to designate any of the values as the
default.
The Value Range shows the range that you entered in the Property Value dialog
box.
After a value has been created and appears in the grid, it can be edited from
within the table display.
To make a change in an existing value in the table, select an entire row by clicking
on the row number. Then right-click in the Value field and click Edit Value.
24 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Setting dependencies
When you have made your changes to the General and Value tabs, click Next. The
Dependencies - Connector-Specific Property Template dialog box appears.
Setting pathnames
Some general rules for setting pathnames are:
v The maximum length of a filename in Windows and UNIX is 255 characters.
v In Windows, the absolute pathname must follow the format
[Drive:][Directory]\filename: for example,
C:\WebSphereAdapters\bin\Data\Std\StdConnProps.xml
In UNIX the first character should be /.
v Queue names may not have leading or embedded spaces.
You also need to select an integration broker. The broker you select determines the
properties that will appear in the configuration file. To select a broker:
Important: Connector Configurator does not check the spelling of the name
that you enter. You must ensure that the name is correct.
v System Connectivity
Click ICS or WebSphere Message Brokers or WAS.
v Select Connector-Specific Property Template
Type the name of the template that has been designed for your connector.
The available templates are shown in the Template Name display. When you
select a name in the Template Name display, the Property Template Preview
display shows the connector-specific properties that have been defined in
that template.
Select the template you want to use and click OK.
3. A configuration screen appears for the connector that you are configuring. The
title bar shows the integration broker and connector name. You can fill in all
the field values to complete the definition now, or you can save the file and
complete the fields later.
4. To save the file, click File>Save>To File or File>Save>To Project. To save to a
project, System Manager must be running.
If you save as a file, the Save File Connector dialog box appears. Choose *.cfg
as the file type, verify in the File Name field that the name is spelled correctly
and has the correct case, navigate to the directory where you want to locate the
file, and click Save. The status display in the message panel of Connector
Configurator indicates that the configuration file was successfully created.
Important: The directory path and name that you establish here must match
the connector configuration file path and name that you supply in
the startup file for the connector.
5. To complete the connector definition, enter values in the fields for each of the
tabs of the Connector Configurator window, as described later in this chapter.
26 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v A connector definition file.
This is a text file that lists properties and applicable default values for a specific
connector. Some connectors include such a file in a \repository directory in
their delivery package (the file typically has the extension .txt; for example,
CN_XML.txt for the XML connector).
v An ICS repository file.
Definitions used in a previous ICS implementation of the connector may be
available to you in a repository file that was used in the configuration of that
connector. Such a file typically has the extension .in or .out.
v A previous configuration file for the connector.
Such a file typically has the extension *.cfg.
Although any of these file sources may contain most or all of the connector-specific
properties for your connector, the connector configuration file will not be complete
until you have opened the file and set properties, as described later in this chapter.
To use an existing file to configure a connector, you must open the file in
Connector Configurator, revise the configuration, and then resave the file.
Follow these steps to open a *.txt, *.cfg, or *.in file from a directory:
1. In Connector Configurator, click File>Open>From File.
2. In the Open File Connector dialog box, select one of the following file types to
see the available files:
v Configuration (*.cfg)
v ICS Repository (*.in, *.out)
Choose this option if a repository file was used to configure the connector in
an ICS environment. A repository file may include multiple connector
definitions, all of which will appear when you open the file.
v All files (*.*)
Choose this option if a *.txt file was delivered in the adapter package for
the connector, or if a definition file is available under another extension.
3. In the directory display, navigate to the appropriate connector definition file,
select it, and click Open.
The toolbar has a droplist called Target System that allows you to select the target
operating system for extended validation of the properties. The available options
are: Windows, UNIX, Other (if not Windows or UNIX), and None-no extended
validation (switches off extended validation). The default on startup is Windows.
Note: For connectors that use JMS messaging, an additional category may display,
for configuration of data handlers that convert the data to business objects.
For connectors running on ICS, values for these properties are also required:
v Associated Maps
v Resources
v Messaging (where applicable)
28 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Standard properties of a connector are shared by both the application-specific
component of a connector and its broker component. All connectors have the
same set of standard properties. These properties are described in Appendix A of
each adapter guide. You can change some but not all of these values.
v Application-specific properties apply only to the application-specific component
of a connector, that is, the component that interacts directly with the application.
Each connector has application-specific properties that are unique to its
application. Some of these properties provide default values and some do not;
you can modify some of the default values. The installation and configuration
chapters of each adapter guide describe the application-specific properties and
the recommended values.
To get more information on a particular standard property, move the mouse over
the entry in the Description column for that property in the Standard Properties
tabbed sheet. If you have Extended Help installed, a Help window will open and
display details of the standard property.
For the location of the Extended Help files, refer to the AdapterHelpName property
in the standard properties appendix.
The Update Method displayed for each property indicates whether a component or
agent restart is necessary to activate changed values.
The adapter user guide for each connector contains a list and description of each
property and its default value.
If a property has multiple values, the Encrypt check box will appear for the first
value of the property. When you select Encrypt, all values of the property will be
encrypted. To decrypt multiple values of a property, click to clear the Encrypt
check box for the first value of the property, and then enter the new value in the
Verification dialog box. If the input value is a match, all multiple values will
decrypt.
Update method
Refer to the descriptions of update methods found in the Standard configuration
properties for connectors appendix, under “Configuration property values overview”
on page 302.
30 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If ICS is your broker
To specify that a business object definition is supported by the connector, or to
change the support settings for an existing business object definition, click the
Supported Business Objects tab and use the following fields.
Deleting a business object from the supported list changes the connector definition
and makes the deleted business object unavailable for use in this implementation
of this connector. It does not affect the connector code, nor does it remove the
business object definition itself from System Manager.
Agent support: If a business object has Agent Support, the system will attempt to
use that business object for delivering data to an application via the connector
agent.
To indicate that the business object is supported by the connector agent, check the
Agent Support box. The Connector Configurator window does not validate your
Agent Support selections.
You must restart the server for changes in transaction level to take effect.
If you have System Manager running, you can select the empty box under the
Business Object Name column in the Supported Business Objects tab. A combo
If you are working in stand-alone mode (not connected to System Manager), you
must enter the business object name manually.
If you have System Manager running, you can select the empty box under the
Business Object Name column in the Supported Business Objects tab. A combo box
appears with a list of the business objects available from the Integration
Component Library project to which the connector belongs. Select the business
object you want from this list.
The list of business objects contains the application-specific business object which
the agent supports and the corresponding generic object that the controller sends
to the subscribing collaboration. The association of a map determines which map
will be used to transform the application-specific business object to the generic
business object or the generic business object to the application-specific business
object.
If you are using maps that are uniquely defined for specific source and destination
business objects, the maps will already be associated with their appropriate
business objects when you open the display, and you will not need (or be able) to
change them.
If more than one map is available for use by a supported business object, you will
need to explicitly bind the business object with the map that it should use.
32 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Explicit
In some cases, you may need to explicitly bind an associated map.
Explicit binding is required only when more than one map exists for a particular
supported business object. When ICS boots, it tries to automatically bind a map
to each supported business object for each connector. If more than one map
takes as its input the same business object, the server attempts to locate and
bind one map that is the superset of the others.
If there is no map that is the superset of the others, the server will not be able to
bind the business object to a single map, and you will need to set the binding
explicitly.
To explicitly bind a map:
1. In the Explicit column, place a check in the check box for the map you want
to bind.
2. Select the map that you intend to associate with the business object.
3. In the File menu of the Connector Configurator window, click Save to
Project.
4. Deploy the project to ICS.
5. Reboot the server for the changes to take effect.
Resources (ICS)
The Resource tab allows you to set a value that determines whether and to what
extent the connector agent will handle multiple processes concurrently, using
connector agent parallelism.
Not all connectors support this feature. If you are running a connector agent that
was designed in Java to be multi-threaded, you are advised not to use this feature,
since it is usually more efficient to use multiple threads than multiple processes.
Messaging (ICS)
The Messaging tab enables you to configure messaging properties. The messaging
properties are available only if you have set MQ as the value of the
DeliveryTransport standard property and ICS as the broker type. These properties
affect how your connector will use queues.
To validate the queue, use the Validate button to the right of the Messaging Type
and Host Name fields on the Massaging tab.
By default, Privacy is turned off. Check the Privacy box to enable it.
This path and file should be on the same system as the Connector Configurator.
You can use the Browse button at the right only if the target system is the one
currently running. It is greyed out unless Privacy is enabled and the Target System
in the menu bar is set to Windows.
The Message Privacy Level may be set as follows for the three messages categories
(All Messages, All Administrative Messages, and All business Object Messages):
v “” is the default; used when no privacy levels for a message category have been
set.
v none
Not the same as the default: use this to deliberately set a privacy level of none
for a message category.
v integrity
v privacy
v integrity_plus_privacy
The Key Maintenance feature lets you generate, import and export public keys for
the server and adapter.
v When you select Generate Keys, the Generate Keys dialog box appears with the
defaults for the keytool that will generate the keys.
v The keystore value defaults to the value you entered in Keystore Target System
Absolute Pathname on the Security tab.
v When you select OK, the entries are validated, the key certificate is generated
and the output is sent to the Connector Configurator log window.
Before you can import a certificate into the adapter keystore, you must export it
from the server keystore. When you select Export Adapter Public Key, the Export
Adapter Public Key dialog box appears.
v The export certificate defaults to the same value as the keystore, except that the
file extension is <filename>.cer.
v
When you select Import Adapter Public Key, the Import Adapter Public Key
dialog box appears.
v The import certificate defaults to <ProductDir>\bin\ics.cer (if the file exists on
the system).
v The import Certificate Association should be the server name. If a server is
registered, you can select it from the droplist.
The Adapter Access Control feature is enabled only when the value of
DeliveryTransport is IDL. By default, the adapter logs in with the guest identity. If
the Use guest identity box is not checked, the Adapter Identity and Adapter
Password fields are enabled.
34 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Setting trace/log file values
When you open a connector configuration file or a connector definition file,
Connector Configurator uses the logging and tracing values of that file as default
values. You can change those values in Connector Configurator.
Note: You can only use the STDOUT option from the Trace/Log Files tab for
connectors running on the Windows platform.
v To File:
Writes logging or tracing messages to a file that you specify. To specify the
file, click the directory button (ellipsis), navigate to the preferred location,
provide a file name, and click Save. Logging or tracing message are written
to the file and location that you specify.
Note: Both logging and tracing files are simple text files. You can use the file
extension that you prefer when you set their file names. For tracing
files, however, it is advisable to use the extension .trace rather than
.trc, to avoid confusion with other files that might reside on the
system. For logging files, .log and .txt are typical file extensions.
Data handlers
The data handlers section is available for configuration only if you have designated
a value of JMS for DeliveryTransport and a value of JMS for
ContainerManagedEvents. Not all adapters make use of data handlers.
The file is saved as an XML document. You can save the XML document in three
ways:
v From System Manager, as a file with a *.con extension in an Integration
Component Library, or
v In a directory that you specify.
v In stand-alone mode, as a file with a *.cfg extension in a directory folder. By
default, the file is saved to \WebSphereAdapters\bin\Data\App.
v You can also save it to a WebSphere Application Server project if you have set
one up.
Note: You will need to change other configuration properties as well as the broker
mode property if you switch integration brokers.
To do so, open the startup file used for the connector, and verify that the location
and file name used for the connector configuration file match exactly the name you
have given the file and the directory or path where you have placed it.
For example, to add the locale en_GB to the list of values for the Locale property,
open the stdConnProps.xml file and add the line in boldface type below:
36 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
<Property name="Locale"
isRequired="true"
updateMethod="component restart">
<ValidType>String</ValidType>
<ValidValues>
<Value>ja_JP</Value>
<Value>ko_KR</Value>
<Value>zh_CN</Value>
<Value>zh_TW</Value>
<Value>fr_FR</Value>
<Value>de_DE</Value>
<Value>it_IT</Value>
<Value>es_ES</Value>
<Value>pt_BR</Value>
<Value>en_US</Value>
<Value>en_GB</Value>
<DefaultValue>en_US</DefaultValue>
</ValidValues>
</Property>
Important: If you are upgrading versions of the connector, you must replace the
connector Java Archive files (.jar). You also need to upgrade the
connector transport files as well as any business object transports that
you have previously installed. Depending on changes made to the
connector, you may need to load a new copy of the SAPConnector.txt
file into your repository. See the Release Notes for more information.
On UNIX systems the startup script should reside in the ProductDir/bin directory.
When the startup script runs, it expects by default to find the configuration file in
the Productdir (see the commands below). This is where you place your
configuration file.
Note: You need a local configuration file if the adapter is using JMS transport.
You can invoke the connector startup script in any of the following ways:
v On Windows systems, from the Start menu
Select Programs>IBM WebSphere Business Integration
Adapters>Adapters>Connectors. By default, the program name is “IBM
WebSphere Business Integration Adapters”. However, it can be customized.
Alternatively, you can create a desktop shortcut to your connector.
v From the command line
– On Windows systems:
start_connName connName brokerName [-cconfigFile ]
– On UNIX-based systems:
Starting the connector with the load balancing feature initiates communication with
the message server specified by the Hostname property. The message server then
finds the application server with the least load. Once this application server is
determined, the message server routes all future RFC communication with the
connector through this one application server. The connector is considered as one
dialog user with the message server.
The load balancing feature works best in an SAP environment where the connector
processes low volumes and the number of users is large. For high volumes
consider connecting directly to one of your larger application servers.
40 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
For information on configuring the connector for load balancing, see the
description of the following connector properties:
v “ApplicationPassword” on page 329
v “ApplicationUserName” on page 329
v “Client” on page 329
v “Group” on page 329
v “Hostname” on page 330
v “InDoubtEvents” on page 330
v “SAPSystemID” on page 332
Note: Familiarity with IDoc types, BAPIs, RFC-enabled function modules within
an SAP system, and SAP tables can aid in understanding how SAPODA
operates.
Important: Business object names like attribute name or verb name, must use only
characters defined in the code set associated with the U. S. English
locale (en_US). For additional information see the Business Object
Development Guide.
Installing SAPODA
To install SAPODA, use Installer for IBM WebSphere Business Integration
Adapters. Follow the instructions in the Implementation Guide for WebSphere
InterChange Server, Implementation Guide for WebSphere Message Brokers, Adapter for
WebSphere MQ Integrator Broker, System Installation Guide for Windows or for Unix.
When the installation is complete, the following files are installed in the product
directory on your system:
v ODA\SAP\SAPODA.jar
v ODA\messages\SAPODAAgent.txt
v ODA\messages\SAPODAAgent_ll_TT.txt (message files specific to a to a
language (_ll)country or territory (_TT))
v ODA\SAP\start_SAPODA.bat (Windows only)
v ODA/SAP/start_SAPODA.sh (UNIX only)
Note: In this document, backslashes (\) are used as the convention for directory
paths. For UNIX installations, substitute slashes (/) for backslashes. All
product path names are relative to the directory where the product is
installed on your system.
Launching SAPODA
You can launch SAPODA by running the appropriate file:
UNIX
start_SAPODA.sh
Windows
start_SAPODA.bat
You configure and run SAPODA using Business Object Designer. Business Object
Designer locates an ODA using the Agent’s host and the port. The Agent’s name is
44 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
specified in the AGENTNAME variable of each script or batch file. The default ODA
name for this connector is SAPODA. For more on ODAs and business object
definitions and how to configure, start and use ODAs, see the IBM WebSphere
Business Object Development Guide.
The Business Object Designer uses this information when selecting a message file.
The default search order is to first look for the locale-specific file that matches the
locale in which the Business Object Designer is running. If that is not found, the
Business Object Designer defaults to the English-US (en_US) version, and finally,
the Business Object Designer looks for the file name without any locale or
language information.
Although not required, if you create multiple instances of the ODA script or batch
file and provide a unique name for each represented ODA, you can have a
message file for each ODA instance. Alternatively, you can have differently named
ODAs use the same message file.
The MessageFile property does not display in the Configure agent properties
window of Business Object Designer if you use the deployment descriptor
odk_dd.xml file that exists in the ODA root directory.
Note: .If a non-English locale is required, the same naming convention is still
applicable; for example, SAPODA1Agent_zh_TW.txt.
For information on where you configure these values, see “Configure initialization
properties” on page 47.
After you launch an ODA, you must launch Business Object Designer to configure
and run it. There are six steps in Business Object Designer to generate a business
object definition using an ODA. Business Object Designer provides a wizard that
guides you through each of these steps.
46 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
5. “Generate the definition” on page 53 and, optionally, “Provide additional
information” on page 54.
6. “Save the definition” on page 71.
Note: If Business Object Designer does not locate your desired ODA, enter the
host and port into their respective fields.
2. Select the desired ODA from the displayed list.
The possible values that you can select from the drop-down list
are 100 (default) and 50.
48 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 5. SAPODA properties (continued)
Property name Property type Description
TraceFileName String Name of the trace file. If the file does not exist, SAPODA
creates it in the \ODA\SAP directory. If the file already exists,
SAPODA appends to it.
Important: Correct the name of the message file if the default value displayed in
Business Object Designer represents a non-existent file. If the name is
not correct when you move forward from this dialog box, Business
The nodes whose names are preceded by a plus sign (+) are expandable. Click on
them to display more nodes or leaves. SAPODA generates business object
definitions only from leaves.
Figure 7 on page 51 illustrates this dialog box as originally displayed and with
some nodes expanded.
50 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 7. Tree with expanded nodes
When a leaf’s name is displayed in bold type, you can select the leaf as the basis
for its business object to be generated. Use standard Windows procedures to select
multiple leaves. In other words, depress the CTRL key while you use the mouse to
select multiple leaves.
SAPODA uses a polymorphic node type that allows you to associate a flat file with
a node. Initially the node displays without any leaves. You can browse a file
system and select files to add to that node. The node is called polymorphic
because its nature changes from a leaf to a branch when you associate it to one or
more files.
Note that if you expand the RFC node, the following message (Figure 8 on page
52) appears indicating that search results in RFC nodes are cached. This caching
service provides a smaller number of leaf nodes, depending on the search criteria,
and thus enables SAPODA to generate ResultSet and BAPI transaction business
objects more efficiently. Search results are sorted and then displayed. The caching
service runs in the background whenever you start SAPODA and the cached
searches are purged when you end the session. The number of search results that
can be cached is determined by the value of the MaximumHits property set in the
Configure agent properties window, shown in Figure 6 on page 48.
Figure 9 illustrates two ways of limiting the number of leaves that Business Object
Designer returns:
v A context-sensitive menu that allows you to open a window for browsing files.
From this window, you can select which files to associate.
v A wizard that allows you to specify search characters in an object’s name or
description.
Example of searching
by RFC function name
After you have selected all desired leaves for object generation, click the Next
button. For information on how to filter the objects returned, see the Business
Object Development Guide.
52 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 10. Confirming selection of nodes and leaves
Note: If there are multiple segments at the top-level of the IDoc, when SAPODA
generates the business object definition for the ABAP Extension Module, it
uses the first IDoc segment to represent the top-level business object.
SAPODA represents the other top-level segments as child business objects.
v UseFieldName
Generate the attribute name from either the SAP field name or the SAP field
description, the default being the SAP field description.
Important: If the earlier version of the IDoc type has fewer segments than the
current version, SAPODA might create a definition with missing
segments or SAPODA might display an error indicating that the
generation of the business object definition was unsuccessful. This
inconsistency is due to different versions of SAP requiring different
API calls.
54 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 12 illustrates the two versions of the BO properties window, one for an
extracted IDoc Type definition file and one for an IDoc defined in the SAP system.
BO properties for
an IDoc file
defined in SAP
system
Figure 12. Providing additional information for an IDoc type business object
:/CWLD/IDOC_HANDLER
If you already know the function module names to pass to the ABAP handler,
select Yes at this prompt. SAPODA displays the window illustrated in Figure 13 on
page 56..
Note: If many IDoc types are in a definition file, the Function module BO
Properties window is provided for each IDoc type in the file. The General
IDoc type BO properties window is provided only once.
After you save the business object definition, the General tab in Business Object
Designer displays the required application-specific information at the business
object level of the topmost business object. Figure 14 illustrates such a window
with the two specified function modules.
For more information about the ABAP handler, see “Business object data routing to
ABAP handlers” on page 223.. For more information about application-specific
information required by the ABAP Extension Module, see “Developing business
object definitions using SAPODA” on page 236..
56 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v BAPI transaction top-level business objects
v ResultSet business objects
Single BAPI business objects: When the ResultSet property on the Configure
Agent window is set to False, as illustrated in Figure 6 on page 48, you can use
SAPODA to create a single BAPI transaction business objects or a BAPI transaction
business object that contains multiple BAPI calls. This section provides details
about business objects for Single BAPI calls.
For details about creating business objects for BAPI transactions, see “BAPI
transaction business objects” on page 59. For details about creating business objects
for ResultSets, see “ResultSet business objects” on page 63.
There are two BO Properties windows for a single BAPI object of BOR or RFC
type. The properties displayed in the first window allow you to specify or change:
v Prefix —If you are satisfied with the value you entered for the DefaultBOPrefix
property in the Configure Agent window (Figure 6 on page 48), you do not need
to change the value here.
v Verb —Specify the verb.
v Server Support—If the definition is to be generated for the connector’s RFC
Server Module, specify yes. If the definition is to be generated for the
connector’s BAPI Module, specify no.
v UseFieldName—Generate the attribute name from either the SAP field name or
the SAP field description, the default being the SAP field description.
After you click OK to move forward from the first BO Properties window,
SAPODA gives you the opportunity to reduce the size of the generated definition.
You are prompted whether you want to remove from the definition any attributes
that represent optional parameters. This prompt displays only if there are optional
parameters to remove. Reducing the size of the definition can enhance
performance later when the connector processes instances of the business object.
Figure 15. Providing additional information for BOR or RFC business objects
If you click Yes in the prompt illustrated above, the second BO Properties window
displays. You can specify removal of each optional parameter of a BAPI/RFC
interface by changing its Value from Yes (include a corresponding attribute in the
generated definition) to No (do not include an attribute).
If you click No in the prompt illustrated above, the final wizard displays. For more
information, see “Save the definition” on page 71.
Optional parameter
Return parameter
58 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
corresponding to a return structure or table. If a definition lacks such
an attribute, an error occurs when its corresponding generated code is
compiled. If you get this compile error, examine the BAPI to determine
if SAP was using a different return structure. In this case, change the
generated Java code to point to the proper parameter.
With the ResultSet property on the Configure Agent window set to False, click
Next on this window to proceed to the caching notification window (Figure 27 on
page 64) and then click OK.
Figure 18 illustrates the next window that appears, which allows you to specify the
criteria that SAPODA will use to search for and display BAPI calls. For the
example used in this section, the criteria is all BAPI calls starting with the text
″BAPI_SALESORDER.″
After you specify the search criteria on the Enter a Search Pattern window, click
OK to set the criteria. Figure 29 on page 64 illustrates the search results tree with
the RFC node expanded. On this window, select the BAPI calls that SAPODA will
use to create the attributes of the BAPI transaction business object. In this example,
the BAPI calls selected are BAPI_SALESORDER_CHANGE and
BAPI_SALESORDER_CONFIRMDELVRY.
Click Next to proceed to the confirmation window, illustrated in Figure 20. The
two BAPI calls selected in Figure 19 are listed.
Figure 20. Confirm source nodes for BAPI calls in the transaction
Click Next on this screen. A message window appears notifying you that you have
selected more than one BAPI call. Click Yes to indicate that your intention is to
create a BAPI transaction business object from these multiple BAPI calls.
60 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 21. Multiple BAPI call selection message
The next screen allows you to apply a prefix and a name to the BAPI transaction
object. In this example, the prefix entered is sap_, and the name for the transaction
object is salesorder_txn. The UseFieldName property determines whether the
attribute name will be generated using the field name in SAP or the field
description.
Figure 22. Assign a prefix and business object name to the transaction
Next, indicate the order in which the selected BAPI calls should be executed when
the transaction object is processed. In this example, the BAPI_SALESORDER_CHANGE
call is executed first, followed by the BAPI_SALESORDER_CONFIRMDELVRY call. You can
apply a COMMITafter any BAPI you wish to commit within the transaction.
SAPODA assumes a COMMIT as the final step of the transaction.
The following message appears for each BAPI call in the sequence that has
optional parameters. Figure 24 illustrates this message for the first BAPI call in the
sequence (BAPI_SALESORDER_CHANGE).
Click Yes to pick and choose which optional parameters you want to add as
attributes of the individual BAPI business object that will be contained within the
BAPI transaction object. If you click No, all the optional parameters will be applied
as attributes of the individual BAPI object within the BAPI transaction object.
After you have created BAPI object attributes for each BAPI call within the BAPI
transaction object, the Business Object wizard displays the object tree of the BAPI
transaction object. Figure 25 on page 63 illustrates the Attributes tab for the
sap_salesorder_txn business object created in this example.
62 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 25. Attributes tab for the sap_salesorder_txn business object
ResultSet business objects: When the ResultSet property on the Configure Agent
window is set to True, as illustrated in Figure 26, SAPODA creates top-level
ResultSet business objects. ResultSet business objects enable Information Integrator
support for DB2.
Figure 26. Configure Agent window with ResultSet property set to True
Click Next on the Configure Agent window and then click OK on the caching
notification window (Figure 27 on page 64).
The next window in the wizard allows you to specify the criteria that SAPODA
will use to search for and display BAPI calls. In this example, the asterisk, which is
a wildcard, indicates that the criteria is all BAPI calls starting with the text
″BAPI_CUSTOMER_GET.″
Click OK to set the criteria. Figure 29 illustrates the search results tree with the
RFC node expanded. On this window, select the BAPI calls that SAPODA will use
to create the attributes of the ResultSet business object.
64 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
A ResultSet object has two attributes: Query (of type query object), and Result (of
type result object). The Query attribute is typically generated from the GETLIST
BAPI call, while the Result attribute is generated from GETDETAIL BAPI call.
Click Next to proceed to the confirmation window, illustrated in Figure 30, which
allows you to confirm the source BAPI calls for the business object’s attributes.
The Business Object wizard also requires you to indicate which BAPI call that you
selected in Figure 29 on page 64 should be used for the Query attribute. From the
drop-down list, select the GETLIST BAPI call, as illustrated in Figure 32. SAPODA
automatically treats the other selected call as the Result attribute of the ResultSet
object.
Click OK to proceed to the next window, on which you specify the Query
parameter (primary key) of the Query BAPI you selected in Figure 32. In this
example, the BAPI call is GETLIST.
66 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 33. Select the primary key
A message window appears indicating the full path of the Query parameter, as
illustrated in Figure 35 on page 68. The path includes the BAPI call parameters
selected in the previous two windows, in this example BAPICUSTOMER_ADDRESSDATA
and CUSTOMER.
You must also specify the foreign key for the ResultSet object, as illustrated in
Figure 36. The foreign key establishes the relationship between the Query attribute
and Result attribute of the ResultSet object.
The Business Object wizard provides a message confirming the full path to the
foreign key, in this case BAPI_CUSTOMER_GETDETAIL.CUSTOMERNO, as illustrated in
Figure 37.
The following window indicates that the GETLIST BAPI has optional parameters
and that you can pick and choose from these optional parameters to create
corresponding attributes on the business object. Choosing No, as in this example,
means that the wizard generates business object attributes for all the parameters.
68 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 38. Optional parameters notification for the GETLIST BAPI
The following screen, illustrated in Figure 39, allows you to set property values for
the ResultSet object.
The following window indicates that the GETDETAIL BAPI has optional parameters
and that you can pick and choose from these optional parameters to create
corresponding attributes on the business object. Choosing No, as in this example,
means that the wizard generates business object attributes for all the parameters.
In addition, only 512 bytes of information from a table can be returned. When a
table returns more than 512 bytes, you will be presented with the dialog found in
Figure 43.. Answering “No” returns attributes (column descriptions) from the
beginning of the table until the 512 byte maximum is reached.
70 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 44. Size and type of BO properties for an HDR business object
When saving a business object to the file system for the ALE Module with Business
Object Designer, you need to load the sap_idoccontrol object first. This object is
delivered and not generated by SAPODA but is required before saving the parent
business object to the file system.
For information on modifying a business object definition, see the Business Object
Development Guide. For information on the business object definition that a specific
connector module requires, and the modifications you must make before the
connector can process it, see the appropriate module’s documentation:
v Chapter 22, “Developing business objects for the ABAP Extension Module,” on
page 231
v Chapter 12, “Developing business objects for the ALE Module,” on page 135
v Chapter 9, “Developing business objects for the BAPI Module,” on page 97
v Chapter 15, “Developing business objects for the RFC Server Module,” on page
161
v Chapter 18, “Developing business objects for the Hierarchical Dynamic Retrieve
Module,” on page 179
72 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 6. Troubleshooting the connector
This chapter describes problems that you may encounter when starting up or
running the connector component of the adapter for mySAP.com.
Generic troubleshooting
This section describes problems that you may encounter when starting up or
running any module of the adapter. It covers the following troubleshooting areas:
v “Startup problems”
v “Connector dies” on page 74
v “Collaborations not subscribing to business objects (WebSphere InterChange
Server only)” on page 74
Startup problems
The following subsections provide suggestions for common startup problems.
Note: This problem is relevant to all connector modules except the RFC Server
Module.
Connector dies
If the connector dies with a message “connection to the SAP application is
lost“or you get an RFC system exception, then you may have a network problem.
Check the short dump for the connector user or the time when the error occurred.
Use the IBM WebSphere BI Station tool or go to transaction ST22. If you still need
more information, check the system log by going to transaction SM21.
74 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
http://www-1.ibm.com/support/
docview.wss?rs=203&context=SW000&q1=wbi+performance
+tuning&uid=swg21173114&loc=en_US&cs=utf-8&lang=en
http://java.sun.com/docs/hotspot/VMOptions.html
The following URL provides a useful FAQ about the HotSpot Engine:
http://java.sun.com/docs/hotspot/PerformanceFAQ.html
Transport files
If you get errors when installing the adapter’s transport files for the ABAP
Extension Module:
v Verify that you installed the correct transport files. You must install version 3.x
transport files on an R/3 version 3.x system and version 4.x transport files on an
SAP application running BASIS 4.x to 4.7 and SAP Web AS 6.20. Transport files
are installed in their own directories. For details about the transport files and
their installation directories, see “Connector transport files” on page 210.
v Verify that you installed the transports in the correct order. Some transport files
have dependencies such as existing tables.
For example, one transport file creates a data element for a table and another
transport creates a table for that data element. If the table is not created first, the
system returns an error.
v Verify that the necessary transport files were installed properly. Each transport
file adds specific functionality for the connector.
For more information, see “Connector transport files” on page 210.
Startup problems
If the connector logs in to the SAP application successfully, but the connector’s log
in the SAP application is empty:
v Check that logging is turned on. If logging is turned off, use IBM WebSphere BI
Station to turn it on. By default, logging is set to 1. For more information, see
Chapter 24, “Managing the ABAP Extension Module,” on page 263.
v Check that the connector is logged on to the same machine where you are
viewing the connector log file.
v Check that the Namespace configuration property is set to true. If you have
upgraded to the connector’s namespace from the previous YXR environment, the
connector may still be logging into the YXR environment. If this is the case, set
This problem is caused by a change SAP has made in their java API (SAP JCo).
To fix the problem, load a patch transport that changes only the event request and
event return function modules provided by the adapter. Load this patch transport
in 4.0 and 4.5 SAP systems that do not have the namespace (/CWLD/) infrastructure.
Note: The namespace ABAP infrastructure does not have this problem.
Event handling
The following subsections provide suggestions for event handling problems.
76 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If you have multiple connectors subscribed to the same business object, then one
connector might be processing the wrong events. For more information on
distributing events between multiple connectors, see on page 206..
v If you have a lock object for an event in the SAP application, then the SAP
application may not finish processing the save process for that event.
Check the connector’s event table in the SAP application to see if the event has a
status of L (Locked). If the status is L, then you most likely have a problem in
the SAP application and not the connector.
v The connector might have died while processing the event. Check the status of
the event in the connector’s event table in the SAP application. If the status is R
(Retrieved), then the event has not been moved to the archive table. If the
event’s status is R, verify that the event did not make it to the destination.
If the event did not make it to the destination, change the status from R to Q
(Queued). Events with a status of Q are picked up by the connector at the next
poll interval. To change the status from R to Q, go to the event table, select the
event, and then click the Edit button. In the window that appears, change the
Event Status field from R to Q.
Large Objects
Large objects may require additional changes to process successfully. ABAP
Extension Module objects are converted to a flat structure before passing the data
to the SAP application or converted from a flat structure when receiving the data
from the SAP application. See “Business object conversion to a flat structure” on
page 220 for more information. This flat structure is held in memory with each
attribute for an object instance being a row in the structure. For each attribute, 373
bytes of data are passed between the connector and the SAP application. The
number of attributes multiplied by 373 gives an approximation of the size of the
flat structure. As well, an instance of the object is also in memory. Therefore, an
object with many child objects (segments) may require a change to the Java heap
size in the startup script for the connector’s Java process in order to avoid an
out-of-memory error.
Unix:
The SAP application may also require changes to the ABAP timeout parameter to
process a large object successfully.
78 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
and you may be specifying the format MMDDYYYY. This causes the BAPI to
fail, because the specified format is not understood.
v Check that the application-specific information of each attribute is correct. If
these values are not correct, then the BAPI Module does not populate the object
correctly before sending it back to the SAP application.
v Check that the I and E parameters are specified properly. Remember that I
identifies the import parameter and E identifies the export parameter. For more
information, see “Business object fails to process” on page 80.
If you want to implement polling for the BAPI Module, you must use the polling
capabilities in the ABAP Extension Module. For more information, see Chapter 19,
“Overview of the ABAP Extension Module,” on page 195..
Startup problems
If the connector cannot register with the SAP application:
v Check that the SAP application is available.
v Check that you have properly set the standard and connector-specific connector
configuration properties. Specifically, check the gwService,, Hostname,,
RfcProgramId,, and Modules, properties. For more information, see Chapter 3,
“Configuring the connector,” on page 21, Appendix E, “Connector-specific
configuration properties,” on page 325, and Chapter 6, “Troubleshooting the
connector,” on page 73.
Connector dies
If your connector dies, check the following:
v Check that threads are being spawned by the RFC Server Module. Verify that
the NumberOfListeners property is set properly. For more information, see the
“NumberOfListeners” on page 331..
v Verify that the RFC program ID is set up so that the RFC Server Module
registers itself with the SAP Gateway. For more information, see the
“RfcProgramId” on page 331 and “Registering the RFC Server Module with the
SAP gateway” on page 159..
Event handling
The following subsections provide suggestions for common event handling
problems.
80 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Startup problems
The following subsections provide suggestions for common startup problems.
Event handling
The connector logs information about successfully processed IDocs in a JMS-MQ
event message (in the queue specified in the SAPALE_Event_Queue configuration
property) to the EventState.log file. This file is located in the directory specified in
the AleEventDir configuration property.
Note: Each event message can contain multiple IDocs, each of which represents a
business object.
Important: The connector does not create the log file automatically the first time it
processes an event. You must create this file for before you run the
connector for the first time.
where <TID> is the current transaction ID being processed, and each number
represents the sequence number of all work units in the event message.
For example, if the connector has successfully processed three of the first four
IDocs in the current event message, the second IDoc failed processing, and the
connector has not yet finished processing the current event message the
EventState.log file might show:
<TID> :: OS, 1F, 2S, 3S
If the connector went down before processing the entire event message, at startup
the connector will use the information in the log file to resume processing the
events in the message at the point where it had stopped processing. The connector
reads the log to get the transaction ID of the event to be recovered, the latest work
unit, and the status of each work unit. Then the connector begins sending to the
integration broker the business objects that represent each IDoc in the event
message with a sequence number greater than the last number in the log file. In
the previous example, the connector will processing the fifth IDoc in the current
event message.
The connector keeps the contents of the log file in memory to enhance
performance. It accesses the file on disk only to update it with a new entry. The
connector reads the log file only at recovery time.
For information on how the connector uses the EventState.log file in the recovery
process, see “Failure recovery.”
Failure recovery
Note: These recovery steps do not apply if a disk failure occurs or if a disk is full.
82 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
3. If the connector goes down before it processes all IDocs in an event message, it
uses the information in EventState.log to determine where to begin processing
during the recovery process. When it comes back up, the connector checks
whether there are any entries in the log file.
v If there are no entries, the connector sends all IDocs in the event message to
the integration broker.
v If there are entries, the connector will use this information to resume
processing an event message at the point where it had stopped processing.
The connector reads the log to get the name of the event message to be
recovered and the latest IDoc sequence number. Then the connector sends to
the integration broker each IDoc in the event message with a sequence
number greater than the last number in the log file. In this example, the
event message is moved to the archive queue and the IDocProcessStatus is
updated according to the status of each work unit in the EventState.log.
Using the log file prevents the connector from sending the same IDoc
multiple times to the integration broker. The connector keeps the log file in
memory to enhance performance. The connector accesses the file on disk
only to update it with a new entry, and reads the log file only at recovery
time.
Request processing
If a subscribing business object is not being processed by the ALE Module, then:
v Check that the vision connector framework is set to call the ALE Module. The
Modules property must be set to ALE.
v Check that the connector subscribes to the business object.
Error types
Table 6 describes the types of tracing messages that the Hierarchical Dynamic
Retrieve Module outputs at each trace level. These messages are in addition to any
tracing messages output by the WebSphere business integration system’s
architecture, such as the Java connector execution wrapper and the WebSphere MQ
message interface.
Table 6. Connector tracing messages
Tracing level Tracing messages
Level 0 Message that identifies the connector version.
84 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Connector message file
Error messages that the connector generates are stored in a message file named
Connector.txt. Each error has an error number followed by the error message. For
example:
1210
1211
Troubleshooting SAPODA
There are two known problems you might encounter when using SAPODA:
v SAPODA runs without messages.
If the message file specified for the ODA does not exist, the ODA runs without
messages. This problem is caused during configuration of the ODA when
Business Object Designer displays a default name for the message file. The
default name follows the naming convention:
AgentNameAgent.txt
If the name of the actual message file does not follow this convention and the
default value is not overwritten with the actual value, Business Object Designer
displays an error message in the window from which the ODA was launched.
This message does not pop up in Business Object Designer.
For more information, see“Working with error and trace message files” on page
45..
v On a Windows system, if Business Object Designer cannot find required library
files in the Path environment variable or the files are not on the system, it
displays a CORBA Exception while attempting to get the tree nodes. For
information about these files, see“Before using SAPODA” on page 44..
Perform the following steps to access Technotes and Flashes on the WebSphere
Business Integration Support Web site:
1. Go to http://www.ibm.com/software/integration/websphere/support/
2. Select the component area of interest and browse or search the Technotes and
Flashes sections.
86 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Part 2. BAPI Module
Figure 46 illustrates the overall architecture of the BAPI Module. The BAPI Module
is made up of the connector framework, the connector’s application-specific
component for BAPI, and a single BAPI business object handler to support all
BAPI calls, as well as the SAP RFC Library. In addition to the single BAPI business
object handler provided by the BAPI Module, you can create custom business
object handlers, as described in “Using custom business object handlers” on page
108.
Integration broker
SAP application
SAP gateway
BAPI
90 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
vision business object handler processes all of the business objects passed between
the BAPI Module and the integration broker. In the BAPI Module, a single BAPI
business object handler supports all BAPI calls.
doVerbFor()
BAPI
BO handler
doVerbFor()
SAP R/3
SAP gateway
Once invoked by the vision business object handler, the BAPI business object
handler executes in the following manner:
1. Receives the WebSphere business object for SAP from the vision business object
handler.
2. Populates the BAPI parameters with business object data.
3. Executes a BAPI call using RFC and passes the BAPI parameters to the SAP
application. The business object handler waits for the business object data to be
returned.
4. Receives the business object data (BAPI parameters).
5. Converts the BAPI parameters back to WebSphere business object data.
6. Passes the business object to the Vision business object handler and ultimately
to the integration broker.
Note: If a BAPI Module has a Return Structure or Return Table, the connector
checks for the message types A (abort) and E (error) to determine if the
service call request processed successfully. A message type A or E indicates
that the service call request failed to process. If a BAPI does not have a
Return Structure or Return Table, you must implement your own error
handling. The error message or messages, within the structure or table, are
returned in the return status descriptor.
Chapter 7. Overview of the BAPI Module 91
Supporting BAPIs
The business object generation utility, SAPODA, generates business object
definitions that support BAPIs. SAPODA interprets the interface of a BAPI, maps
its parameters to the business object attributes, and adds the application-specific
information (ASI) for each attribute.
Note: Some BAPIs do not have single field parameters that correspond to simple
attributes in the WebSphere business object. The connector requires every
top-level business object to have a simple attribute that serves as the key
attribute. Therefore, when generating a business object and business object
handler from a BAPI without a single field parameter, SAPODA creates a
key attribute named Dummy_key in the top-level business object, marks it
as the key attribute, and adds dummy_key as the application-specific
information of this attribute. Dummy_key provides the connector with a key
attribute so that it can process the business object. However, the connector
ignores the value of the Dummy_key attribute when modifying application
data.
The BAPI business object handler returns SUCCESS when all the BAPI calls in the
transaction process successfully. The business object handler also provides error
handling in case of failures. If a BAPI call in the transaction fails processing, the
subsequent calls in the transaction terminate and, depending on the error code,
BAPI_RETURN returns either FAIL or APPRESPONSETIMEOUT.
The BAPI interface does not provide a rollback mechanism for transactions. You
can achieve rollback in one of the following ways:
v By terminating all subsequent BAPI calls, thus terminating the transaction before
COMMIT occurs. The connector terminates the transaction when an error is
detected. If there is no intrinsic COMMIT in the BAPIs that are already invoked,
no further steps are required.
v By calling another BAPI that can roll back work that has already been commited
in the case of BAPIs that have an intrinsic COMMIT.
For details about the strucutre of BAPI transaction business objects, see Chapter 9,
“Developing business objects for the BAPI Module,” on page 97.
92 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
business object. This object contains two attributes, BAPI_Query and BAPI_Result,
that represent Query BAPI and Result BAPI objects. For details about the structure
of BAPI ResultSet objects, see “Business object structure for BAPI ResultSets” on
page 100.
It also discusses how the business object generation utility, SAPODA, generates the
definitions. The chapter assumes you understand how the connector processes
business objects. For more information on business object processing in the BAPI
Module, see Chapter 7, “Overview of the BAPI Module,” on page 89.
SAP supports many methods that can be mapped to the standard verbs (Create,
Update, Delete, and Retrieve) that the connector supports. You can develop
business objects and business object handlers to support any method used by
BAPIs.
Note: SAPODA must have access to the BAPI in an SAP system to retrieve the
BAPI interface.
This chapter describes business objects that support BAPIs; however, the BAPI
Module can be used to support any RFC-enabled function.
Some BAPIs may not have all of the types of parameters. For example, a BAPI
may have importing and table parameters only.
SAPODA automatically maps the BAPI structure and table parameters to child
business objects, and BAPI simple parameters to the corresponding simple
attribures on WebSphere business objects for SAP as described in Table 8..
Note: The illustrations in this chapter use SAP_ or sap_ as the business object
prefix. You can specify your own meaningful prefix when you create your
business object definitions.
SAPODA guarantees that all attribute names in the business object definition are
unique. If a BAPI has multiple parameters with the same field description,
SAPODA adds a counter as the suffix to the generated attribute name.
Important: You can modify the attribute names at any time after you generate the
business object definition. However, when you modify an attribute
name, do not modify the application-specific information. The
connector uses this information to identify the BAPI parameter to
which the attribute corresponds. For more information on the
application-specific information, see “Attribute-level ASI” on page 103.
A business object based on a BAPI can contain no more than two levels of
hierarchy. Therefore, all BAPI simple parameters correspond to attributes of the
top-level business object, and BAPI structure and table parameters correspond to
child business objects.
98 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 9. Correspondence between BAPIs and business objects for SAP
BAPI interface parameter WebSphere business object for SAP
Simple field Attribute of the top-level business object
Structure Single-cardinality child business object
Table Multiple-cardinality child business objects
Figure 48 illustrates the association between a business object and a BAPI. The
figure illustrates a fragment of the sap_bapi_salesorder_createfromdat2 business
object, which corresponds to the BAPI_SALESORDER_CREATEFROMDAT2 BAPI.
sap_bapi_salesorder_createfromdat2 BAPI_SALESORDER_CREATEFROMDAT2
Name = sap_order_items_in
Type = sap_order_items_in
Cardinality = n
[Verb]
Name = Create
AppSpecificInfo = sap.bapi.client.
BAPI_SALESORDER_CREATEFROMDAT2
sap_order_header_in
Name = sap_order_header_in
AppSpecificInfo = IORDER_HEADER_IN:
sap_order_items_in
Name = sap_order_items_in
AppSpecificInfo =IORDER_ITEMS_IN:EORDER_ITEMS_IN
The wrapper business object contains two attributes of the object type: BAPI_Query
and BAPI_Result. The BAPI_Query attribute represents the Get List BAPI on the ASI
parameter. For example, bapi=BAPI_CUSTOMER_GETLIST. The BAPI_Result attribute
represents the Get Detail BAPI on the ASI parameter. Note that SAPODA always
adds a suffix of _rs to the name of the child business objects of the BAPI_Query
and BAPI_Result. For example, sap_BAPI_addressdata_rs.
For details about the attribute-level ASI of a BAPI ResultSet object, see
“Attribute-level ASI for BAPI ResultSets” on page 105.
For more information about ResultSet processing, consult the DB2 Information
Integrator documentation.
Supported verbs
The BAPI Module supports the standard verbs (Create, Update, Delete, and
Retrieve) used by the WebSphere business integration system. For each supported
verb, a BAPI can have an associated method. The verb is given meaning by the
BAPI method. In other words, a BAPI call has inherent functionality, independent
of the verb associated with it. Most BAPIs support one of the following operations:
create, retrieve, update, and delete.
100 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 10. Simple attributes properties: Top-level business object (continued)
Property name Description
AppSpecificInfo Contains the name of the BAPI parameter that corresponds to
the associated attribute. The format is:
IABAPFieldName:EABAPFieldName
Table 11 lists and describes the attributes that represent a child or array of child
business objects. SAPODA generates the properties described below.
Table 11. Properties of an attribute that represents a child or children
Property name Description
Name The value is the name of the structure or table parameter. The
format is: BOprefix_BAPIParameterName. Any special
characters that exist in the business object name will be
replaced with an underscore character _.
Type The value is the type of child business object; in other words,
the type is BOprefix_BAPIParameterName.
ContainedObjectVersion SAPODA sets the value to 3.0.0.
Relationship SAPODA sets the value to containment.
IsKey For a BAPI transaction or ResultSet, SAPODA sets the value
of the first attribute to true, and the value of all other
attributes to false.
IsForeignKey SAPODA sets the value to false.
IsRequired Specifies whether an attribute must contain a value. SAPODA
sets the value to false.
AppSpecificInfo Contains the name of the BAPI parameter that corresponds to
the associated attribute. The format is:
IBAPIParameterName:EBAPIParameterName
Important: Simple attributes can have two special values: CxIgnore and CxBlank.
When a business object is sent to the BAPI Module as a service call
request and the business object has simple attributes set to CxIgnore or
CxBlank, it is as if those attributes are invisible to the BAPI Module.
However, the SAP application initializes such an attribute to its ABAP
data type. The BAPI Module converts all returned blank values to
CxIgnore.
Verb-level ASI
The verb-level ASI should be set for each type of object as described in Table 14.
Note that there is no verb ASI for BAPI ResultSet business objects.
Table 14. Verb-level ASI
Object type Verb ASI
Objects representing single BAPI calls verb ASI=NameOfBAPI
Objects representing BAPI transactions verb ASI=NameOfBAPI1;NameOfBAPI2;NameOfBAPI3
Objects representing custom business object handlers CBOH=bapi.client.customBOHandlerName
102 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Backward compatibility for objects representing single BAPI
calls
Note that the connector supports verb ASI formats of business objects from earlier
releases, where the value of the AppSpecific property captures the classname of the
BAPI-specific business object handler (verb ASI= bapi.client.BOHandlerName,
where bapi.client is the WebSphere Business Integration qualifier of the
BAPI-specific business object handler name and BOHandlerName is the name of the
class). You must include the value client before the business object handler name
to identify that the business object handler acts as a client. Note that while the
connector supports these earlier formats, SAPODA does not automatically generate
them and therefore you must explicitly specify them by name in the verb ASI.
Attribute-level ASI
The connector uses the value of an attribute’s application-specific information to
determine which importing, exporting, and table parameters to use. The value of
this property contains the prefix I (for importing parameters) or E (for exporting
parameters). The prefix indicates whether the attribute value is used to pass data
into or out from the SAP application.
Because structure parameters can be either importing or exporting, they use either
an I or an E before the parameter value. Because table parameters can pass data to
and return data from a BAPI, they can have both I and E parameter values.
Important: Always use a colon (:) separator when you specify parameter values
with I and E. If specifying only an importing value, the colon must
follow the value. If specifying only an exporting value, the colon must
precede the value. If specifying both values, the colon follows the
importing value and precedes the exporting value.
Figure 49 on page 104 illustrates the correspondence between a business object and
an example BAPI named BAPI_EXAMPLE. In the example, the simple attributes
(Attribute_1, Attribute_2, and Attribute_3) specify only an importing or exporting
parameter. The attribute that represents a child business object (Child_1)
corresponds to an exporting structure parameter. The attribute that represents an
array of child business objects (Child_2) corresponds to a table parameter.
Each child business object has a simple attribute that corresponds to a field of the
corresponding structure or table (Attribute_11 and Attribute_14, respectively). You
can find these fields by looking at the details of the BAPI.
BAPI_EXAMPLE
Parent_BAPI_BO
[BusinessObjectDefinition] FUNCTION BAPI_EXAMPLE.
Name = Parent_BAPI_BO *"---------------------------------------------------
AppSpecificInfo = *"*"
[Attribute] *" IMPORTING
Name = Attribute_1 *" Field_1 ...
AppSpecificInfo = IField_1: *" Field_3 ...
*" EXPORTING
Name = Attribute_2 *" Field_2 ...
AppSpecificInfo = :EField_2 *" Return ...
*" TABLES
Name = Attribute_3 *" Table_7 ...
AppSpecificInfo = IField_3:
ENDFUNCTION.
Name =Child_1
Type =Child_1
Cardinality = 1
AppSpecificInfo = :Ereturn
Name = Child_2
Type = Child_2
Cardinality = n
AppSpecificInfo = ITable_7:ETable_7
Child_2 (1)
Child_1
[BusinessObjectDefinition]
Name = Child_1
AppSpecificInfo = :Ereturn
[Attribute]
Name = Attribute_11
ASI = IField_11:EField_11
Child_2
[BusinessObjectDefinition]
Name = Child_2
AppSpecificInfo = ITable_7:ETable_7
[Attribute]
Name = Attribute_14
AppSpecificInfo = IField_14:EField_14
104 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 15. AppSpecificInfo format for specific kinds of attributes (continued)
AppSpecificInfo Format Attribute Type
IFieldName:EFieldName Represents an attribute of a child business object mapped to a
field in a table or structure parameter
The Key attribute of the BAPI_Result object is identified using the attribute-level
ASI key=name_Of_KeyAttribute. The business object handler uses this information
for performance optimization.
The Foreign Key attribute of the BAPI Result object captures the relationship
between BAPI_Result and BAPI_Query objects. It is identified using the attribute
level ASI FK=BAPI_Query:Name of child object of BAPI_Query that contains the
key attribute:name of key attribute.
After the objects are generated, you must add the business object definition to your
WebSphere business integration system’s runtime environment.
v Use Business Object Designer to copy the business object definition into your
repository.
Important: You can modify the name of the generated business object as well as
the name of its child business objects. To do so, you must edit the
Note: For BAPIs and RFC-enabled ABAP functions that are developed in a
development namespace, SAPODA removes or replaces ″/″ characters in the
function name with ″_″ when naming the business object definition, .java,
and .class files. SAPODA removes the ″/″ character only when it is the first
character of the name. Although the definition name or file name does not
contain this character, the code still accurately calls the specified function
with its proper name containing the ″/″ characters. Also, when a function
name begins with a digit, SAPODA prepends the name with the string Rfm_.
To enable multiple business objects to contain the return business object, you must
modify the name of the return business object to be unique for each business
object.
To rename the return business object, modify the definition of each business object
definition that contains it. The definition of the child business object is contained in
the same definition file as its parent.
Note: Alternatively, if InterChange Server is the integration broker, you can use
the repos_copy command to load the definition into the repository.
106 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Generated business object definition contains unnecessary
attributes and child business objects
SAPODA interprets all BAPI interface parameters and, for each one, it creates a
corresponding business object attribute or child business object. To increase
performance of business object processing, remove from the business object
definition all attributes and business objects that are not required.
Note: SAPODA facilitates graphically removing all optional attributes and child
business objects before definition generation. For more information, see
Chapter 9, “Developing business objects for the BAPI Module,” on page 97.
To increase performance of business object processing, you can also remove from
the application-specific information all importing and exporting table parameter
values that are not required.
After definition generation, you can use Business Object Designer to manually edit
the business object definition if you require other changes. However, be careful
that you remove only attributes that you absolutely will not be using.
Important: If you do change the name, ensure that you modify all references to
the name as well. However, do not modify the parameter names of the
generated application-specific information.
Note: Alternatively, if Interchange Server is the integration broker, you can use
the repos_copy command to load the definition into the repository.
For example, for a create operation, if you do not need to return the table data
from the SAP application after the create operation has completed, you can remove
the exporting parameter value (such as Etable name).
For a retrieve operation, you do not need to specify any importing table
parameters. Therefore, you can remove the importing parameter value (such as
Itable name).
import AppSide_Connector.JavaConnectorUtil;
import CxCommon.BusinessObjectInterface;
import CxCommon.CxMsgFormat;
import CxCommon.CxStatusConstants;
import CxCommon.ReturnStatusDescriptor;
import com.crossworlds.connectors.sap.codegen.BapiBOHandlerBase;
import com.crossworlds.connectors.sap.codegen.exception.CwBoHandlerAppResponseTimeout;
import com.crossworlds.connectors.sap.codegen.exception.CwBoHandlerProcessingFailed;
import com.crossworlds.connectors.sap.visionframework.VisionBOHandlerInterface;
import com.crossworlds.connectors.sap.visionframework.VisionConnectorAgent;
import com.sap.mw.jco.IRepository;
import com.sap.mw.jco.JCO;
public Bapi_customer_getlist()
{
}
108 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
JCO.Function function = new JCO.Function(repository.getFunctionTemplate("BAPI_CUSTOMER_GETLIST"));
try
{
traceMessage(JavaConnectorUtil.LEVEL1, 27025, CxMsgFormat.XRD_INFO, theObj.getName(), theObj.getVerb(),
null, null);
// get defaults and check for required fields for Create and Update only
if ((theObj.getVerb().equalsIgnoreCase("Create")) || (theObj.getVerb().equalsIgnoreCase("Update")))
{
traceMessage(JavaConnectorUtil.LEVEL4, 27021, CxMsgFormat.XRD_INFO, theObj.getName(),
null, null, null);
JavaConnectorUtil.initAndValidateAttributes(theObj);
}
try {
// After successful RfcCall: check Structure/Table RETURN for Bapi Return Codes E or A that
// indicate failure
this.checkBapiRc(function);
// Clean up
if (theClient != null) vca.releaseClient(theClient);
// Return Success
return CxStatusConstants.SUCCEED;
}
try
{
JCO.ParameterList p = function.getTableParameterList();
this.readBapiRc(p.getTable("RETURN"));
}
catch (CwBoHandlerProcessingFailed cw)
{
throw cw;
}
catch (Exception e)
{
try
{
JCO.ParameterList p = function.getExportParameterList();
if (p != null)
this.readBapiRc(p.getStructure("RETURN"));
else
{
String msg = logMessage(27045, CxMsgFormat.XRD_INFO, null,null, null, null);
110 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
throw new CwBoHandlerProcessingFailed(msg);
}
}//end try
catch (JCO.Exception o)
{
String msg = logMessage(27045, CxMsgFormat.XRD_INFO, null,null, null, null);
throw new CwBoHandlerProcessingFailed(msg);
}
}
};
The following example illustrates a script for compiling the custom BOHandler on
the Windows platform. Note that to run this script, the JDK must be installed on
your machine.
REM @echo off REM
set JCLASSES=%AGENT%;%JCO_JAR%;%CWLIB%;%WBIA%
echo classpath = %JCLASSES%
endlocal
pause
112 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Part 3. ALE Module
The ALE Module uses the RFC Server Module for event handling. The ALE
Module uses WebSphere MQ queues for Transaction ID (TID) and IDocs
management. The connector checks for subscriptions when processing the data
from SAP to the connector, resulting in transactions remaining in SAP until the
collaboration is started.
v The integration broker sends a WebSphere Business Integration Adapter business
object for SAP. The business object’s data represents a processing request to the
connector. The connector converts the business object to a table format
compatible with the SAP Intermediate Document (IDoc) format. The connector
uses Remote Function Calls (RFCs) to the ALE interface to pass the IDoc data to
the SAP system.
v The connector receives data representing an application event from SAP in IDoc
table format. It converts the data to a WebSphere Business Integration Adapter
business object for SAP before sending it to the integration broker. The connector
uses RFCs to the ALE Module to receive the data from the ALE interface.
Important: In releases of the connector prior to version 4.8.2, the connector used
collaborations, business objects, and maps to store Transaction IDs
(TIDs) and their status in the repository, and used the local file system
to store IDoc data. Version 4.8.2 of the connector replaces the previous
management of TIDs and IDoc data with the use of WebSphere MQ
queues.
SAP delivers the RFC libraries in Java and C. The connector is delivered and run
as a Java archive (JAR) file.
MQSeries
JMS interface queues WebSphere Business
for MQSeries Integration Broker
SAP gateway
116 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v The vision connector framework starts the RFC Server connector component,
which spawns listener threads. Each listener thread uses the RFC library and the
SAP gateway to register a single handle to the SAP application.
v The listener thread processes events from the SAP application.
An event is the execution of an ABAP function that transfers data to the listener.
The event data sent by SAP may represent one or more such heterogeneous
executions.
Each event from SAP is considered a transaction. The connector uses a two-step
process with a Transaction ID (TID) to handle each event, guaranteeing
once-only delivery of data from SAP to the connector.
v WebSphere MQ queues persistently store a JMS-MQ message for each event.
Each JMS-MQ message stores the TID identifying the event, the status of the
TID, the IDoc data associated with the event, and the processing status of the
IDoc.
v The connector’s polling process creates WebSphere business objects from the
stored event message, and sends the business objects to the integration broker.
The connector provides support for large IDoc messages that result in large
business objects.
For more efficient processing performance, the connector breaks up a large IDoc
into smaller parts, each of which is a JMS-MQ message that translates into a
smaller business object. Each of these messages contains a MultiPartMessage
property, that identifies it with the appropriate part of the larger message. For
example, assuming the original larger IDoc is partitioned into 8 JMS-MQ
messages, then the value of the MultiPartMessage property of each part is 1 of
8, 2 of 8, and so on for each message. To associate all the message parts with
one another, the connector sets the CorrelationID header property of each
message part other than the first message to the value of the JMSMessageID
property of the first part. In turn, the CorrelationID property of the first part is
always set to the value of that property in the first JMS-MQ message that
corresponds to the original large IDoc. For details about JMS-MQ message
properties, see Table 19 on page 127.
v The business integration system tracks unprocessed events to handle their
recovery in case the integration broker or the connector goes down. When the
integration broker or the connector is restored, the connector automatically
resubmits these events.
Transaction IDs
SAP uses a transaction and its corresponding ID to frame an event, guaranteeing
that each piece of data is delivered once and only once from SAP. SAP sends a
Transaction ID (TID) with the event data. To manage the TIDs centrally for event
and request processing, the connector stores each TID as a JMS-MQ message on a
WebSphere MQ queue. When processing events, it also stores the associated IDoc
data as the message body. The connector stores the TID, TID status, and the IDoc’s
processing status in the message header.
118 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
object and a data record business object. The control record business object
contains the metadata required by the connector to process the business object. The
data record business object contains the actual business object data to be processed
by the SAP application, and the metadata required for the connector to convert it
to an IDoc structure for the RFC call.
The connector includes a business object definition for the control record. The
definition file, sap_idoccontrol.xsd, is located in the \repository\SAP directory.
The TABNAM attribute in the control record business object indicates which SAP
function module the parent wrapper business object calls:
v A value of EDI_DC40 indicates the idoc_inbound_asynchronous function module,
which the connector uses only for SAP 4x.
v A value of EDI_DC indicates the inbound_idoc_process function module, which is
provided for backward compatibility with SAP 3x.
In addition, the following attributes must have values for SAP to properly process
the object in ALE. These values are based on your ALE configuration:
v Name_of_table_structure
v Client
v Name_of_basic_type
v Logical_message_type
v Partner_type_of_sender
v Partner_number_of_sender
v Partner_type_of_recipient
v Partner_number_of_recipient
The DOCNUM attribute in both business objects establishes the relationship between
the data record business object and the control record business object.
When processing service call requests, the ALE Module can handle multiple IDocs
in a single business object. Before it can do so, however, you must add another
multiple-IDoc wrapper business object around two or more parent wrapper
business objects. This top-level multiple IDoc wrapper business object contains an
attribute that represents an array of parent wrapper business objects. For more
information, see “Parent wrapper business object” on page 139.
The connector includes a business object generation tool, SAPODA. This tool uses
an IDoc definition text file to generate business object definitions for the ALE
Module. For more information on developing business objects for the ALE Module,
see Chapter 12, “Developing business objects for the ALE Module,” on page 135
and Chapter 5, “Generating business object definitions using SAPODA,” on page
43.
For more information on installing the connector, see Appendix A, “Quick Steps,”
on page 281.
Note: In this document backslashes (\) are used as the convention for directory
paths. For UNIX installations, substitute slashes (/) for backslashes (\). All
file pathnames are relative to the directory where the product is installed on
your system.
122 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Check that the logical systems are defined and assigned for the SAP system and
external system (transaction code SALE).
v Check that the distribution model has been maintained, and that the required
message types have been added to the model (transaction code BD64).
v Check that there are partner profiles for the logical system or distribution model
(transaction code WE20).
Checking MQ configuration
Verify that message queues are properly configured.
For more information, see “Updating the IDoc status in SAP” on page 129.
Configuring SAP
Configure the inbound parameters of the partner profile of the logical system to
receive the ALEAUD message type. Set the following properties to the specified
values:
Table 18. Configuring SAP to receive IDoc status
SAP Property Value
Basic Type ALEAUD01
Logical Message Type ALEAUD
Function module IDOC_INPUT_ALEAUD
Process Code AUD1
You may also set the following optional connector-specific configuration properties:
v “AleSelectiveUpdate” on page 328
v “AleStatusMsgCode” on page 328
v “AleSuccessText” on page 329
v “AleFailureText” on page 329
Because the connector supports multi-threading, when the ALE Module processes
requests from the integration broker, it uses SAP’s Java Connector (SAP JCo)
connection pool of such handles.
Important: When you use the ALE Module to process application events,
connector polling is required to properly initialize the module (to
124 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
install the RFC functions on the server), and for it to properly manage
errors. Therefore, do not set the value of the PollFrequency property to
key or to no. Do not allow the SAP application to trigger events to the
connector until you have verified that the connector’s log displays the
installation of the required RFC functions.
When business object data is returned from SAP’s Java Connector (SAP JCo) API,
the ALE Module receives values for DATS and TIMS fields in the following
formats: YYYY-MM-DD (the hyphens are included) for the DATS data element, and
HH:mm:ss (the colons are included) for the TIMS data element. The capitalized HH
denotes 24-hour time, and not 12-hour time. When processing events, the ALE
Module changes these formats to fit the 8-character and 6-character maximum size
of their corresponding business object attributes. The connector shortens the length
of the value by removing the hyphens from the date data and the colons from the
time data.
Event processing
Two RFC-enabled functions in an SAP application initiate all event processing for
the ALE Module. The ALE’s business object handler for event processing supports
the functions idoc_inbound_asynchronous and inbound_idoc_process.
When processing events, this business object handler persistently stores business
objects in a WebSphere MQ queue. The connector maintains the Transaction IDs
(TIDs) associated with the RFC call to guarantee that each piece of data is
delivered once and only once.
Important: A single RFC call can send the data for one or more IDocs. Therefore, a
WebSphere MQ queue may contain a JMS-MQ message that represents
multiple IDocs, each of which represents a business object. Each RFC
call is associated with a single TID.
Listener thread 8
1 5
Integration
broker
SAP gateway
SAP application
ALE-specific
function
Business-object event processing for the ALE Module executes in the following
manner:
1. An RFC function pushes event data to the SAP Gateway, where a listener
thread picks up events. The thread checks the TID associated with the event to
determine whether a JMS-MQ message exists for the TID:
v If the TID has not been sent previously, the connector continues to 2.
v If the TID has been sent previously, the connector’s behavior depends on the
state of the previous transaction. If TidStatus is CREATED, the connector
removes the IDoc data from the message. If the status is ROLLBACK, the
connector changes the status to CREATED, and if IDoc data exists in the
message, the connector removes the IDoc data from the message. If the status
is EXECUTED, the connector returns control to SAP.
2. The listener thread instantiates the ALE event-processing business object
handler, which retrieves the RFC-interface data from the SAP Gateway.
3. The business object handler formats each transaction into a JMS-MQ message,
which it stores persistently in the queue specified by the SAPALE_Wip_Queue
configuration property.
Each JMS-MQ message represents a single RFC call. Each RFC call can
represent one or more business objects associated with a single TID. The
connector stores the TID in the message’s CorrelationID property, sets the
TidStatus to CREATED, and sets the IDocProcessStatus to unknown. The connector
uses the message body to store IDoc data.
For a large object, the connector breaks up the object into multiple messages so
as to enable more efficient processing. For details about how to enable this
support, see “Event processing components” on page 116 and Table 19 on page
127.
4. After each transaction completes, the connector changes the value of TidStatus
and sends a confirmation back to SAP indicating that the transaction is
complete. After SAP receives the confirmation, it removes the TID and its
associated data from the SAP application.
126 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If the AleUpdateStatus configuration property evaluates to true, the connector
updates the status of the IDoc in SAP. If it retrieves a packet of IDocs, it
updates the status of all IDocs in the packet. For more information, see
“Updating the IDoc status in SAP” on page 129.
5. The connector moves the JMS-MQ message from the WIP queue to the queue
specified by the SAPALE_Event_Queue configuration property.
6. The ALE Module’s polling thread picks up the event message from the Event
queue.
7. The connector instantiates an ALE data handler that will convert the data in the
message body to business objects for posting to the integration broker.
8. The connector attempts to post each business object to the integration broker. If
the integration broker is WebSphere Interchange Server, the connector first
checks if there are subscriptions for the business object. After processing all the
business objects in the message body, the message’s IDocProcessingStatus and
BOProcessingStatus are updated and the message is moved to the queue
specified by the SAPALE_Archive_Queue property. For more information on
IDocProcessingStatus see, “Creating archive messages” and on
BOProcessingStatus see, “Structure of JMS-MQ message for event and archive
processing”.
The ALE Module uses FIFO (First In, First Out) to maintain the processing order
when reading the messages from the Event queue.
Table 20 describes the possible values for the IDocProcessStatus property after an
event is moved to the Archive queue.
Table 20. Archive queue values for the IDocProcessStatus message property
IDocProcessStatus
property value Event status Description
success Success All business objects in the message have been
posted with no errors.
partial Partial success One or more but not all business objects in the
message have been posted with an error. If the
integration broker is WebSphere Interchange
Server, one or more but not all business objects
in the message have been posted with an error
or are unsubscribed.
unsubscribed Unsubscribed If the integration broker is WebSphere
Interchange Server, all business objects in the
message are unsubscribed.
fail Fail All business objects in the message have been
posted with an error.
Creating archive messages: When the message is moved from the Event queue to
the Archive queue, the IDocProcessingStatus and BOProcessingStatus are updated.
The message body remains unchanged.
For example, assume the connector processes an event message with four IDocs,
each of which it transforms or attempts to transform into a business object, with
the results illustrated in Table 21:
128 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 21. Archive message creation
Status of IDoc or business object Resulting archive message
Successfully transforms the first IDoc, and The IDocProcessStatus is updated to success
posts the business object to the integration and the BOProcessingStatus is <CID> :: 0S
broker
Fails to transform the second IDoc into a The IDocProcessStatus is updated to partial
business object and the BOProcessingStatus is <CID> :: 0S,
1F
Successfully transforms the third IDoc, and The IDocProcessStatus is set to partial and
posts the business object to the integration the BOProcessingStatus is <CID> :: 0S, 1F,
broker 2S
Successfully transforms the fourth IDoc, but v The IDocProcessStatus is set to partial and
the business object created is not subscribed the BOProcessingStatus is <CID> :: 0S,
in the integration broker 1F, 2S, 3U
v After processing the last IDoc, moves the
message from the Event queue to the
Archive queue and gives it
IDocProcessStatus of partial and
BOProcessingStatus of <CID> :: 0S, 1F,
2S, 3U
Updating the IDoc status in SAP: To cause the connector to update a standard
SAP status code after the ALE Module has retrieved an IDoc for event processing,
you must:
v Set the AleUpdateStatus configuration property to true and set the value of the
AleSuccessCode and AleFailureCode configuration properties.
v Configure the inbound parameters of the Partner Profile of the Logical System in
SAP to receive the ALEAUD message type.
If AleUpdateStatus evaluates to true, the connector sends the ALEAUD IDoc to SAP
with status code information and descriptive text. The ALEAUD IDoc calls the
IDOC_INPUT_ALEAUD function module. The connector supports sending the following
status codes to this function module:
v IDoc has been completely posted in the business integration system.
The AleSuccessCode connector-specific configuration property can have a value
of 52 or 53. SAP converts this value to 41.
v IDoc cannot be processed in the business integration system.
The AleFailureCode connector-specific configuration property can have a value
of 68. SAP converts this value to 40.
In both of the cases above, the business integration system does not send further
status codes that would indicate further processing.
For more information about MQ messages, see the WebSphere Business Integration
Library: http://www.ibm.com/software/integration/wmq/library/.
Processing IDocs from SAP to the adapter: If the adapter detects unsubscribed or
unsupported business objects or raises any exceptions during IDoc transmission,
the adapter will fail the SAP transaction. Failed transactions can be viewed and
resubmitted from SAP transaction SM58. Before resubmitting the transaction,
address the exception:
v Unsupported: add agent support for the business object.
v Unsubscribed: restart the collaboration for the business object.
v Other exceptions: view the adapter logs to determine the exception and make
the necessary correction.
Once this step executes successfully, the transaction with SAP is complete.
When an IDoc contains malformed data or contains ’nodata’, the IDoc is moved to
the Error Queue as its own message.
130 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Installing and configuring the ALE Module Queue utility: The ALE Module
Queue utility is packaged with the SAP adapter. When installed, it has the
following directory structure:
\Connectors\SAP\BIA_AleEventUtil.jar
\Connectors\SAP\BIA_AleEventUtil.bat
\Connectors\SAP\BIA_AleEventUtil_readme.txt
Running the MQ management utility: After installing and configuring the utility,
navigate to the directory where the ALE Module Queue Management Utility is
installed. Valid commands for the utility are:
-i <inputq>
-o <outputq>
-f <outputfile>
-d <date>
-n <replication count>
Note: When there is an existing file with the same name, the archive command
will raise an exception but the dump command will overwrite the file.
To move all the messages equal to or earlier than a specified date, add the Date
parameter:
Request processing
The vision connector framework uses the value of the verb AppSpecificInfo
property of the top-level business object to instantiate the ALE request-processing
business object handler. The doVerbFor() method in the request-processing
business object handler initiates all business object requests.
The business object handler converts the business object data into two tables that
represent the IDoc format and its metadata component, the control record. Once
the data is in IDoc format, the business object handler makes an RFC call to the
appropriate SAP function module: either idoc_inbound_asynchronous or
inbound_idoc_process. Because ALE is asynchronous, the connector does not wait
for a return response.
Note: The value of the TransactionId attribute must be a unique identifier. The
value is not the equivalent of a TID in the SAP application. These values are
stored in a table within the JMS_MQ message in the queue specified by the
SAPtid_Queue configuration property.
If the TransactionId attribute does not have a value, the ALE Module sends the
request directly to SAP. If the TransactionId attribute has a value, the ALE Module
does the following:
1. The connector checks whether the JMS-MQ message in the queue specified by
the SAPtid_Queue configuration property has this value.
v If the value of the business object’s TransactionId attribute, ObjectID, does
not exist in the table of the JMS_MQ message, a new entry is created in the
table. ObjectID becomes the key to the table entry. Then the connector
retrieves a new TID from SAP and that TID is assigned to this ObjectID. The
connector also sets the TidStatus for this ObjectID to CREATED
132 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v If ObjectID does exist in the table, the connector’s behavior depends upon
the TidStatus for this OjbectID. If TidStatus is CREATED, the connector
continues to 2. If TidStatus is ROLLBACK, the connector changes the value to
CREATED, and continues to 2. If TidStatus is EXECUTED, the key is removed and
archived.
2. The connector converts the business object to RFC tables and makes an RFC
call to SAP.
v If the call posts successfully, the connector updates the key’s TidStatus to
EXECUTED.
v If the call fails to post to SAP or raises an exception, the connector updates
the key’s TidStatus to ROLLBACK.
3. After SAP acknowledges receipt of the RFC call, the connector removes the key
from the table, archives the key, and returns a success status to the integration
broker.
The adapter itself manages the deletion of these archive files using the connector
configuration property ArchiveDays. The value in the connector configuration
property, ArchiveDays, determines the amount of days these archived files will
persist in the ale\request sub-directory. Any files older than the number of days
specified in ArchiveDays will be deleted. If this property is not configured, the
default value for ArchiveDays is seven days. These archive files can also managed
manually by deleting the files yourself.
Resubmitting failed requests: For all failed requests indicated by the integration
broker, check whether an archive file has been created for the request. If the
archive file exists for the Object ID in the request then do not resubmit the request
from the integration broker. Resubmit the request if there is no archive file for that
ObjectID. Ensure the ArchiveDays connector configuration property is set to a
value that will allow for verification of resubmitted requests.
You set the appropriate message type (MESTYP) in the control record object.
Furthermore, the verb has no effect on the message type, thus you can use the
same business object type for different verbs of different message types.
Supporting multiple message types for event processing: For event processing,
you can use the following mechanisms:
v Using the same business object to represent an IDoc type, the verb ASI metadata
is configured with different combinations of MsgType / MsgCode / MsgFunction.
The combination of values specified for each verb should be different. For
example, configure the ASI as follows for the different verbs:
Verb=Create VerbASI : MsgType=ORDERS; MsgCode=MC01;MsgFunction=MF01
Verb=Update VerbASI : MsgType=ORDERS;MsgCode=MC02;MsgFunction=MF02
Verb=Delete VerbASI : MsgType=ORDERS;MsgCode=MC03;MsgFunction=MF03
Note that two different verbs cannot use the same combination of
MsgType/MsgCode/MsgFunction values.
Or, you can have a different message type for each verb:
Verb=Create VerbASI : MsgType=ORDERS;MsgCode=;MsgFunction=
Verb=Update VerbASI : MsgType=ORDCHG;MsgCode=;MsgFunction=
Verb=Delete VerbASI : MsgType=;MsgCode=;MsgFunction=
v If you need to use the same business object and verb combination for different
message types, create copies of the same IDoc type business object with different
names. For example, the business objects sap_orders_05_ORDERS and
sap_orders_05_QUOTES both refer to the same IDoc type definition and are copies
of the same business object. The ASI for each object is configured as follows:
Verb ASI for sap_orders_05_ORDERS
Verb=Create VerbASI : MsgType=ORDERS;MsgCode=;MsgFunction=
Verb ASI for sap_orders_05_QUOTES
Verb=Create VerbASI : MsgType=QUOTES;MsgCode=;MsgFunction=
134 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 12. Developing business objects for the ALE Module
This chapter describes the business objects required for the ALE Module of the
adapter for mySAP.com. It also discusses how the business object generation utility,
SAPODA, generates the definitions. The chapter assumes you are familiar with
how the connector processes business objects. For more information on the ALE
Module, see Chapter 10, “Overview of the ALE Module,” on page 115.
Use SAPODA to generate business object definitions for this module. SAPODA
uses the SAP application’s native IDoc (Intermediate Document) definitions as
templates for business object definitions for the ALE Module. After creating the
definitions, you can use Business Object Designer or a text editor to modify them.
You can use SAPODA to generate business object definitions for the ALE Module
based upon an IDoc:
v Extracted to a file
v Defined in the SAP system
IDocs must adhere to a specific format for SAP to process them correctly.
Therefore, when you develop a business object definition for the ALE Module,
ensure that the definition follows the IDoc Structure as defined in SAP.
Important: You must log on to the SAP system in English to generate business
object definitions from IDoc files. Because SAPODA uses a text field in
the IDoc’s definition to generate attribute names, and because attribute
names must be in English, it is important that you generate definitions
from English-language files.
Note: If the business object is based upon IDoc extensions, use the Extended Basic
Types grouping.
136 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Parent wrapper business object
sap_alereq01
[BusinessObjectDefinition]
Name = sap_alereq01
Version = 1.1.0
AppSpecificInfo = ALEREQ01
[Attribute]
Name = Dummy_Key
IsKey = true
[Attribute]
Name = TransactionId
[Attribute]
Name = Control_record
Type = sap_idoccontrol
Cardinality = 1
[Attrribute]
Name = Data_record
Type = sap_alereq01_cwdata
Cardinality = 1
[Verb]
Name = Create
AppSpecificInfo = sap.sapalemodule.VSapALEBOHandler,
MsgType=MATFET;MsgCode=;MsgFunction=
[End]
...
[Verb]
Name = AleOutboundVerbs
AppSpecificInfo = Create, Update
[End]
sap_idoccontrol
Name = Name_of_table_structure
AppSpecificInfo = TABNAM
Figure 52. Relationship of WebSphere business objects for SAP and an IDoc
Chapter 12. Developing business objects for the ALE Module 137
Standard naming conventions
The ALE Module requires its business objects to follow the naming conventions
described in Table 23. SAPODA, which generates all but the control record business
object, derives the business object and attribute names from the IDoc definition in
accordance with these conventions.
Table 23. IBM WebSphere SAP business object naming conventions
IBM WebSphere business object
or attribute Name Type
Parent wrapper business object BOprefix_BasicIDocType n/a
Note: The illustrations in this chapter
use SAP_ or sap_ as the business
object prefix. You can specify your
own meaningful prefix when you
create your business object
definitions.
Control Record business object Control_record sap_idoccontrol
Data Record business object Data_record BOprefix_BasicIDocType_cwdata
Data Record child business object BOprefix_BasicIDocType_ BOprefix_BasicIDocType_
IDocSegmentName IDocSegmentName
Data Record attribute IDocFieldName or IDoc Field When generating the BOs, the user has
Description the choice to either choose IDoc segment
field names or field descriptions as the
BO attribute names.
SAPODA guarantees that all attribute names in the business object definition are
unique. If an IDoc has multiple fields with the same field descriptions, then
SAPODA adds a counter suffix to the generated attribute name.
When naming an attribute, SAPODA prepends a string to the attribute name when
the changed attribute name:
v Begins with a digit—prepends A_
v Begins with the underscore character (_)—prepends A
Important: You can modify attribute names at any time after you generate the
business object. However, when you modify an attribute name, do not
modify its application-specific information. The connector uses this text
to identify the IDoc field to which the business object attribute
corresponds. For more information, see “Application-specific
information: Data record business object” on page 143.
138 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Naming conventions for IDoc extensions
When SAPODA generates a business object definition based on an IDoc extension,
it uses slightly different naming conventions than those described in “Business
object naming conventions” on page 137. In this case, it includes the extension
name as described in Table 24.
Table 24. Naming Conventions for Idoc extensions
IBM WebSphere business
object or attribute Name Type
Parent wrapper business BOprefix_BasicIDocType_ExtensionName n/a
object
Control Record business Control_record sap_idoccontrol
object
Data Record business Data_record BOprefix_BasicIDocType_cwdata
object
Data Record child business BOprefix_BasicIDocType_ BOprefix_BasicIDocType_
object ExtensionName_IDocSegmentName ExtensionName_IDocSegmentName
Data Record attribute IDocFieldText or IDocFieldName String
For the syntax of AppSpecificInfo property that specifies the extension, see “Parent
wrapper business object.”
The IDoc top-level object Dummy_key attribute is used to map key fields from the
Control and Data records to the Dummy_key in the top-level object. The connector
handles Dummy_key mapping in the following manner:
1. The attribute level ASI for the Dummy_key attribute is configured as the path of
the attribute from which the value is set. In other words, the attribute level ASI
is set to the path within the business object tree of the attribute that is being
mapped to the top-level object. The delimiter for value pairs is ; (semicolon).
The delimiter for the path to the key attribute from the child is : (colon). The
absolute path should be specified for the foreign key (FK).
For example,
DummyKey;FK=Data_record:sap_orders05_e2edk01005:IDOC_document_number"
2. If the connector detects multi-cardinality objects in this path, it uses the first
child instance from this container. This is true for all the multi-cardinality
objects wherever they occur in the business object tree.
3. If the ASI is incorrect or if the mapped attribute value is empty, the connector
fails the event and places it in the SAPALE_Error_Queue. This is also the case
Chapter 12. Developing business objects for the ALE Module 139
when the ASI is configured to set the object type value as the Dummy_key.
Note that the Dummy_key attribute can only hold values from simple type
attributes.
Syntax
The AppSpecificInfo property of the parent wrapper object has the following
syntax:
BasicIDocType [,Ext=ExtensionName
[,Pn=PartnerNumberOfRecipient [,Pt=
PartnerTypeOfRecipient[,Pf=PartnerFunctionOfRecipient
]]
Explanation of syntax
BasicIDocType
Specifies the basic IDoc type
Ext Specifies the extension type
Pn Specifies the Partner number of the recipient
Pt Specifies the Partner type of the recipient
Pf Specifies the Partner function of the recipient
Example
AppSpecificInfo = ALEREQ01,Pn=ALESYS2,Pt=LS,Pf=EL
140 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Module, and must be loaded into the business object repository. Use Business
Object Designer to load the business object into the repository.
Table 25 lists the simple attribute properties of the control record business object.
Table 25. Properties of simple attributes in the control record business object
Property name Description
Name The value of the Name property is the modified value of the
TEXT field in the IDoc definition. SAPODA replaces special
characters (such as periods, slashes, and spaces) with
underscores so that the name contains only alphanumeric
characters and the underscore character (_), as described in
“Business object naming conventions” on page 137
Type Specifies the type of data. SAPODA sets the value to String.
MaxLength SAPODA derives the value of MaxLength from the LENGTH
field in the IDoc definition.
IsKey SAPODA sets this property to true on the first attribute of a
business object.
IsForeignKey SAPODA sets the value to false.
IsRequired The IsRequired property specifies whether an attribute must
contain a value. SAPODA set this property to true only on
the Name_of_table_structure attribute in the control record
object.
AppSpecificInfo SAPODA derives the value from the NAME field in the IDoc
definition.
DefaultValue Specifies the value to assign to this attribute if there is no
run-time value. SAPODA does not set a value for this
property.
The top level of the data record business object corresponds to the basic IDoc type.
This top-level business object contains an attribute that represents a child business
object or an array of child business objects (one for each IDoc segment). The
structure and hierarchy of the child business objects match that of the IDoc
segments in the basic IDoc type.
Generating an IDoc from the system using SAPODA creates the data record object
and its child business objects by making calls into the SAP system itself. Fields
from an IDoc definition file are used in this section to help illustrate how different
properties of a business object are set. Generating an IDoc from the system uses
corresponding fields from the calls made into the SAP system.
Chapter 12. Developing business objects for the ALE Module 141
This section describes:
v “Attributes: Data record business object”
v “Application-specific information: Data record business object” on page 143
v “Illustration of the relationship between business object and IDoc” on page 144
Important: Simple attributes in the data record business object can have two
special values: CxIgnore and CxBlank. Simple attributes set to CxIgnore
or CxBlank are represented by blank spaces in the segment data string.
SAP processes these attributes by placing one space character in the
application field.
Table 27 describes the properties of each attribute in the data record business object
that represents a child or array of child business objects. SAPODA generates the
properties described below.
Table 27. Attributes that represent child business objects
Property name Description
Name SAPODA sets the value to
BOprefix_BasicIDocTypeIdocSegmentName; for example,
SAP_E2ALER1001
Type SAPODA sets the value to:
BOprefix_BasicIDocTypeIdocSegmentName
ContainedObjectVersion SAPODA sets the value to 1.0.0.
142 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 27. Attributes that represent child business objects (continued)
Property name Description
Relationship SAPODA sets the value to containment.
IsKey SAPODA sets the value to false.
IsForeignKey SAPODA sets the value to false.
IsRequired The IsRequired property specifies whether a child business
object must exist. SAPODA sets the value to false if the
value of the STATUS field for the corresponding segment in
the IDoc definition has a value of OPTIONAL. SAPODA sets
this property to true if the STATUS field in the IDoc
definition has a value of MANDATORY.
AppSpecificInfo The AppSpecificInfo property contains information on the
hierarchy level and minimum and maximum number of
allowed occurrences of a segment. For more information, see
“Application-specific information in attributes that represent
children” on page 144.
Cardinality If the value of the LOOPMAX field in the IDoc definition is 1,
SAPODA sets the value to 1. If the value of LOOPMAX is
greater than 1, SAPODA sets the value to n.
The offset value is the position of the first character of the attribute value in the
data string. The offset value is calculated by subtracting the value in the
BYTE_FIRST value of the first field in the IDoc definition from the BYTE_FIRST
Chapter 12. Developing business objects for the ALE Module 143
value of the given attribute. This value is used with the MaxLength property to
build the data string for the IDoc segment.
For example, a segment field named SIGN with an offset of 40 has the following
value for AppSpecificInfo:
40+SIGN
144 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Parent wrapper business object
sap_alereq01
Name = Data_record
Type = sap_e2alereq01_cwdata
Cardinality = 1
...
IDoc definition
Name = sap_e2aler1001
Type = sap_e2aler1001
...
Cardinality = n
...
Begin_Segment E2ALER1001
Name = sap_e2aler1001
ASI = E2ALER1001
Level 02
Begin_Fields
Name = Logical_message_type Text Logical message type
ASI = 64 +MESTYP Name MESTYP
...
Byte_First 000064
MaxLength = 6 Length 0006
...
Name = sap_e2aleq1 ...
ASI = 03,1,9999
IsRequired = true ...
Relationship = Containment
Cardinality = n End_Segment
Begin_SegmentE2ALEQ1
Name = sap_e2aleq1
ASI = E2ALEQ1 Level 03
Figure 53. Relationship Between data record business object and IDoc Definition fields
Supported verbs
Verb support for the ALE Module is limited by the verbs that SAP supports
through its ALE interface. SAPODA generates the Create, Update, Delete, and
Retrieve verbs in the business object definition. Implementation of each verb
requires knowledge of the ALE configuration within SAP.
SAPODA generates the AppSpecificInfo for the verbs and the AleOutboundVerbs
meta-verb on the parent wrapper business object. However, it populates only one
of the parameters of the AppSpecificInfo with values: it specifies the business
object handler to use for service-call request processing. For all other processing,
you must manually modify the business object definition to add or remove specific
information:
Chapter 12. Developing business objects for the ALE Module 145
v When using the business object for event processing, you must specify values
for the following the AppSpecificInfo properties:
– Parent wrapper business object’s verb—specify a value for those parameters
that uniquely identify the verb. Depending on the requirements of your ALE
configuration, specify the message type, message code, and message function.
Make these changes after you import the business object definition into your
repository.
Note: The connector matches the values in the control record with the values
specified in the verb’s AppSpecificInfo property to determine the verb.
Explanation of syntax
BOHandler Specifies the request-processing business object handler; the value
defaults to the following: sap.sapalemodule.VSapALEBOHandler
MsgType Specifies the message type configured for the IDoc in ALE
MsgCode Specifies the message code configured for the IDoc in ALE; the
146 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
connector requires a value only if MsgType does not uniquely
identify the verb; however, specify a value if required by your ALE
configuration
MsgFunction Specifies the message function configured for the IDoc in ALE; the
connector requires a value only if MsgType and MsgCode do not
uniquely identify the verb; however, specify a value if required by
your ALE configuration
Important: SAPODA generates values for the Create, Retrieve, Update, and Delete
verbs. After the definition has been generated, you must manually
delete those verbs that you do not want the connector to support.
The following example instructs the connector to support the Create and Update
verbs for processing application events:
[Verb]
Name = AleOutboundVerbs
AppSpecificInfo = Create, Update
[End]
When processing multiple IDocs, the ALE Module requires a wrapper business
object as the top-level business object. The multiple IDoc wrapper business object
contains an attribute that represents an array of IDoc parent wrapper business
objects.
For each parent wrapper business object, SAPODA generates the Create, Retrieve,
Update, and Delete verbs. For each of these verbs, it generates the following
AppSpecificInfo values:
sap.sapalemodule.VSapALEBOHandler,MsgType=;MsgCode=;MsgFunction=
Figure 54 illustrates the relationship between a top-level wrapper object and it’s
child IDoc business objects.
Chapter 12. Developing business objects for the ALE Module 147
Multiple IDoc wrapper business object
Sap_alereq01_wrapper
Name = Dummy_key
IsKey = true
AppSpecificInfo = DummyKey
Name = TransactionId
AppSpecificInfo = CrossWorlds TID
Name = sap_alereq01
Type = sap_alereq01
Cardinality = n
Name =
sap_alereq01
Name =
[Attribute]
Name = Dummy_key
Type = String
Cardinality = 1
MaxLength = 1
IsKey = true
IsForeignKey = false
IsRequired = true
AppSpecificInfo = DummyKey
DefaultValue =
[End]
[Attribute]
Name = TransactionId
Type = String
Cardinality = 1
MaxLength = 1
IsKey = false
IsForeignKey = false
IsRequired = false
AppSpecificInfo = CrossWorlds TID
DefaultValue =
[End]
[Attribute]
148 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Name = sap_alereq01
Type = sap_alereq01
ContainedObjectVersion = 1.0.0
Relationship = Containment
Cardinality = n
MaxLength = 255
IsKey = false
IsForeignKey = false
IsRequired = false
AppSpecificInfo =
DefaultValue =
[End]
[Verb]
Name = Create
AppSpecificInfo = sap.sapalemodule.VSapALEBOHandler,MsgType=;MsgCode=;MsgFunction=
[End]
[Verb]
Name = Retrieve
AppSpecificInfo = sap.sapalemodule.VSapALEBOHandler,MsgType=;MsgCode=;MsgFunction=
[End]
[Verb]
Name = Update
AppSpecificInfo = sap.sapalemodule.VSapALEBOHandler,MsgType=;MsgCode=;MsgFunction=
[End]
[Verb]
Name = Delete
AppSpecificInfo = sap.sapalemodule.VSapALEBOHandler,MsgType=;MsgCode=;MsgFunction=
[End]
Chapter 12. Developing business objects for the ALE Module 149
150 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Part 4. RFC Server Module
Figure 55 illustrates the overall architecture of the RFC Server Module. The RFC
Server Module is made up of the connector framework, the connector’s
application-specific component for RFC Server, RFC Server-specific business object
handlers, listener threads, and the SAP RFC Library.
Integration broker
SAP gateway
SAP application
RFC-enabled
function
Listener threads
Listener threads handle all of the RFC calls between the RFC Server Module and
the SAP application. When the connector starts up, it spawns a configurable
number of listener threads. Each listener thread opens a handle to the SAP
Gateway.
Because the RFC Server Module acts as a server to the SAP application, it “pushes”
or sends events from the SAP application to the integration broker. This behavior is
very different from other modules, which poll the application for events. Because
of this difference, RFC Server-specific business object handlers perform different
tasks from other business object handlers.
154 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
– When a WebSphere message broker is the integration broker, the business
object’s Server verb must contain a dummy value for the collaboration.
v Converts the returned business object data back to RFC event data.
v Returns the RFC event data back to the SAP application.
During the initialization process, the RFC Server Module registers with the SAP
Gateway using a specified Program ID. This Program ID must be set using the
RfcProgramID connector configuration property and set up as a TCP/IP port in the
SAP application. For more information on setting up a TCP/IP port, see
“Registering the RFC Server Module with the SAP gateway” on page 159.
Figure 56 illustrates business object processing for the RFC Server Module.
Listener thread
1 5
SAP gateway
SAP application
RFC-enabled
function
Business object processing for the RFC Server Module executes in the following
manner:
1. A listener thread picks up a subscribed event from the SAP Gateway and
matches the name of the corresponding RFC-enabled function with an RFC
Server-specific business object handler.
2. The listener thread instantiates the appropriate RFC Server-specific business
object handler based on data from the RFC event on the SAP Gateway, and
then creates an instance of the corresponding business object.
3. The RFC Server-specific business object handler retrieves the RFC interface data
from the SAP Gateway and populates the WebSphere business object for SAP.
4. The RFC Server-specific business object handler passes the business object to
the integration broker. In the RFC Server Module, since SAP makes the
synchronization calls, when a WebSphere message broker is the integration
broker, the RFC Server Module uses SynchronousRequestQueue and
SynchronousResponseQueue to communicate with the WebSphere message
broker.
5. The business object handler receives the returned business object from the
integration broker, converts it back to the RFC interface, and then returns it to
the SAP Gateway.
The RFC Server Module uses the SAP Gateway to maintain the processing order of
events and to maintain the status of events. Since the listener threads make
synchronous calls, an event must return to the SAP Gateway before it can be
considered successfully processed.
156 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Supporting RFC-enabled functions
The development environment includes a utility, SAPODA, that generates business
object definitions based on an RFC-enabled function. SAPODA interprets the
interface of an RFC-enabled function, maps its interface parameters to the business
object attributes, and adds the application-specific information for each attribute.
For each business object definition, you must generate an associated RFC
Server-specific business object handler, which invokes the corresponding business
object. For more information on developing business objects and RFC
Server-specific business object handlers, see Chapter 15, “Developing business
objects for the RFC Server Module,” on page 161.
Note: Some RFC-enabled functions do not have single field parameters that
correspond to simple attributes in the WebSphere business object. The
connector requires every top-level business object to have a simple attribute
that serves as the key attribute. Therefore, when generating a business object
and business object handler from a RFC-enabled function without a single
field parameter, SAPODA creates a key attribute named Dummy_key in the
top-level business object, marks it as the key attribute, and adds dummy_key
as the application-specific information of this attribute. Dummy_key
provides the connector with a key attribute so that it can process the
business object. However, the connector ignores the value of the
Dummy_key attribute when modifying application data.
Triggering an event
To trigger an event for the RFC Server Module the RFC destination must be
specified for the remote function call. The remote function call can be executed in
two ways: programmatically and using transaction SE37. Programmatically, the
variation of the CALL FUNCTION command that specifies a destination must be
used. The value to specify for the destination is the one that is created to register
the RFC Server Module. See section “Registering the RFC Server Module with the
SAP gateway” for more information. Using transaction SE37, the RFC target system
must match the RFC destination. See section “Registering the RFC Server Module
with the SAP gateway” for more information on creating and registering a RFC
destination for the RFC Server Module.
160 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 15. Developing business objects for the RFC Server
Module
This chapter describes business objects and business object handlers required for
the RFC Server Module. It provides background information and discusses how
the business object generation utility, SAPODA, generates the definitions. The
chapter assumes you are familiar with how the connector processes business
objects. For more information on business object processing in the RFC Server
Module, see Chapter 13, “Overview of the RFC Server Module,” on page 153.
Business object development for the RFC Server Module consists of creating an
application-specific business object definition and an associated RFC Server-specific
business object handler for each RFC-enabled function that you want to support.
Because SAPODA uses the SAP application’s native definitions as a template when
generating definitions for each of these, it is recommended that you use SAPODA
to generate these definitions.
Note: SAP supports many methods that can be mapped to the standard verbs
(Create, Update, Delete, and Retrieve) that the connector supports. You can
develop business objects and RFC Server-specific business object handlers to
support any method used by RFC-enabled functions.
Note: Once you have created business objects and RFC Server-specific business
object handlers, you must make sure that you register the RFC Server
Module with the SAP Gateway. For more information, see “Registering the
RFC Server Module with the SAP gateway” on page 159..
Some RFC-enabled functions may not have all of the types of parameters. For
example, an RFC-enabled function may have importing and table parameters only.
SAPODA guarantees that all attribute names in the business object definition are
unique. If an RFC-enabled function has multiple parameters with the same field
description, SAPODA adds a counter as the suffix to the generated attribute name.
Important: You can modify the attribute names at any time after you generate the
business object definition. However, when you modify an attribute
name, do not modify the application-specific information. The
connector uses this information to identify the RFC-enabled function
parameter to which the attribute corresponds. For more information on
the application-specific information, see “AppSpecificInfo for
attributes” on page 167.
Important: The RFC Server Module differs from other modules in that it does
not poll SAP for events. Instead, SAP pushes event data to the
connector. Because this module does not use standard polling
procedures, the RFC Server-specific business object handler checks
every business object that represents an event for the name of the
collaboration that will process it. When the WebSphere InterChange
Server is the integration broker, the RFC Server-specific business
object handler uses the value obtained to instantiate the appropriate
collaboration. When WebSphere MQ Integrator is the integration
broker, a dummy value must be provided for the RFC Server-specific
business object handler to process the event successfully.
v The business object handler uses the attribute application-specific information of
each business object to map between each attribute and its parameter.
162 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Each RFC Server-specific business object handler supports both single- and
multiple-cardinality relationships between business objects.
Chapter 15. Developing business objects for the RFC Server Module 163
Top-level business object SAP sales order BAPI
sap_bapi_po_create BAPI_PO_CREATE
Name = sap_po_items
Type = sap_po_items
Cardinality = n
[Verb]
Name = Server
AppSpecificInfo = sap.bapi.server.
Bapi_po_create;Collab=POCollab
sap_po_header
Name = sap_po_header
AppSpecificInfo = IPO_HEADER:
sap_po_items
Name = sap_po_items
AppSpecificInfo = IPO_ITEMS:EPO_ITEMS
Supported verbs
The RFC Server Module supports the standard verbs (Create, Update, Delete, and
Retrieve) used by the WebSphere business integration system. For each supported
verb, an RFC-enabled function can have an associated method. Most RFC-enabled
functions support one of the following operations: create, retrieve, update, and
delete.
164 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Table 33 lists and describes the attributes that represent a child or array of child
business objects.
Table 33 lists and describes the attributes that represent a child or an array of child
business objects. SAPODA generates the properties described in the table below.
Table 33. Properties of an attribute that represents a child or children
Property Name Description
Name The value is the name of the structure or table parameter
name. The format is: BOprefix_FunctionParameterName
Type The value is the type of child business object; in other words,
the type is BOprefix_FunctionParameterName
ContainedObjectVersion SAPODA sets the value to 1.0.0.
Relationship SAPODA sets the value to containment.
IsKey SAPODA sets the value to false.
IsForeignKey SAPODA sets the value to false.
IsRequired Specifies whether an attribute must contain a value. SAPODA
sets the value to false.
Chapter 15. Developing business objects for the RFC Server Module 165
Table 33. Properties of an attribute that represents a child or children (continued)
Property Name Description
AppSpecificInfo Contains the name of the RFC-enabled function parameter
that corresponds to the associated attribute. The format is:
IFieldName:EFieldName
166 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
AppSpecificInfo = bapi.server.BOHandler;Collab=CollaborationName
where BOHandler is the name of the class and CollaborationName is the name of the
destination collaboration.
Important: You must include the value server before the business object handler
name to identify that the RFC Server-specific business object handler
acts as a server.
For example if you are supporting the BAPI_PO_CREATE RFC-enabled function and
the destination collaboration is called POCollab, then the verb application-specific
information is as follows:
AppSpecificInfo =bapi.server.Bapi_po_create;Collab=POCollab
Because structure parameters can be either importing or exporting, they use either
an I or an E before the parameter value. Because table parameters can pass data to
and return data from a RFC-enabled function, they can have both I and E
parameter values.
Important: Always use a colon (:) separator when you specify parameter values
with I and E. If specifying only an importing value, the colon must
follow the value. If specifying only an exporting value, the colon must
precede the value. If specifying both values, the colon follows the
importing value and precedes the exporting value.
Chapter 15. Developing business objects for the RFC Server Module 167
Each child business object has a simple attribute that maps to a field of the
corresponding structure or table (Attribute_11 and Attribute_14, respectively). You
can find these fields by looking at the details of the BAPI.
Top_Level_BusObj
[BusinessObjectDefinition] FUNCTION BAPI_EXAMPLE.
Name = Top_Level_BusObj *"---------------------------------------------------
AppSpecificInfo = *"*"
[Attribute] *" IMPORTING
Name = Attribute_1 *" Field_1 ...
AppSpecificInfo = IField_1: *" Field_3 ...
*" EXPORTING
Name = Attribute_2 *" Field_2 ...
AppSpecificInfo = :EField_2 *" Return ...
*" TABLES
Name = Attribute_3 *" Table_7 ...
AppSpecificInfo = IField_3:
ENDFUNCTION.
Name =Child_1
Type =Child_1
Cardinality = 1
AppSpecificInfo = :EReturn
Name = Child_2
Type =Child_2
Cardinality = n
AppSpecificInfo = ITable_7:ETable_7
Child_2 (1)
Child_1
[BusinessObjectDefinition]
Name = Child_1
AppSpecificInfo = :EReturn
[Attribute]
Name = Attribute_11
AppSpecificInfo = ITable_11:ETable_11
Child_2
[BusinessObjectDefinition]
Name = Child_2
AppSpecificInfo = ITable_7:ETable_7
[Attribute]
Name = Attribute_14
AppSpecificInfo = IField_14:EField_14
168 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 35. AppSpecificInfo format for specific kinds of attributes (continued)
AppSpecificInfo format Attribute type
IStructureName:EStructureName Represents a child business object mapped to a structure
parameter
IFieldName:EFieldName Represents an attribute of a child business object mapped to a
field in a table or structure parameter
The only edit you must make is specifying the name of the destination
collaboration in the verb application-specific information of the Server verb.
v When the WebSphere InterChange Server is the integration broker, this
information is required because a collaboration cannot explicitly subscribe to an
event that is pushed to the connector. Therefore, the RFC Server-specific business
object handler must determine the appropriate destination collaboration from the
business object’s metadata, and then instantiate the collaboration.
v When WebSphere MQ Integrator is the integration broker, a dummy value is
required for the RFC Server-specific business object handler to process the event
correctly.
Important: If the RFC-enabled function that you are using does not contain a
simple field attribute, and SAPODA has created a Dummy_key
attribute as the key attribute, do not modify the values of this attribute.
After the business object definition and its corresponding RFC Server-specific
business object handler are generated, you must add the business object definition
to your WebSphere business integration system’s runtime environment.
v Use Business Object Designer to load the business object definition into your
repository.
Chapter 15. Developing business objects for the RFC Server Module 169
v sap_bapi_po_create (business object definition that includes all child business
objects)
v Bapi_po_create.java
v Bapi_po_create.class
Important: You can modify the name of the generated business object as well as
the name of its child business objects. To do so, you must edit the
definition as a text file rather than in Business Object Designer. If you
do change a business object’s name, ensure that you also modify all
references to the names that you change. Also, if you modify the
names of the generated.class file for the business object handler, you
must maintain the changes for the Server verb application-specific
information for the associated business object.
Note: For RFC-enabled ABAP functions and BAPIs that are developed in a
development namespace, SAPODA removes or replaces ″/″ characters in the
function name with ″_″ when naming the business object definition, .java,
and .class files. SAPODA removes the ″/″ character only when it is the first
character of the name. Although the definition name or file name does not
contain this character, the code still accurately calls the specified function
with its proper name containing the ″/″ characters. Also, when a function
name begins with a digit, SAPODA prepends the name with the string Rfm_.
To enable multiple business objects to contain the return business object, you must
modify the name of the return business object to be unique for each business
object.
To rename the return business object, modify the definition of each business object
definition that contains it. The definition of the child business object is contained in
the same definition file as its parent.
170 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
3. Change the child’s name to be unique. For example, append a number to the
text (sap_return_2).
4. Change all references in the definition to refer to the newly named child. For
example, change the value of the Type property for every attribute that
represents the child business object.
5. Save the changed definition file.
6. Use Business Object Designer to load the newly named child business object
into the repository.
Note: SAPODA facilitates graphically removing all optional attributes and child
business objects before definition generation. For more information, see
“Provide additional information” on page 54.
To increase performance of business object processing, you can also remove all
unneeded importing and exporting table parameter values from the
application-specific information.
After definition generation, you can use Business Object Designer to manually edit
the business object definition if you require other changes. However, be careful
that you remove only attributes that you absolutely will not be using.
Important: If you do change the name, ensure that you modify all references to
the name as well. However, do not modify the parameter names of the
generated application-specific information.
Chapter 15. Developing business objects for the RFC Server Module 171
Generated AppSpecificInfo for table parameters specify
unnecessary parameters
Table parameters can be both importing and exporting parameters. If you do not
require importing or exporting of values for a table parameter, you can remove it
from the application-specific information.
For example, for a create operation, if you do not need to return the table data
from the SAP application after the create operation has completed, you can remove
the exporting parameter value (such as Etable name).
For a retrieve operation, you do not need to specify any importing table
parameters. Therefore, you can remove the importing parameter value (such as
Itable name).
Note: You must remove the unrequired value from the AppSpecificInfo of the
attribute in the parent that represents the child as well as from the
AppSpecificInfo at the business-object level of the child business object. Do
not remove the colon (:).
For example, to remove the ETable_7 exporting parameter in Figure 58, you would
do the following:
1. In the Child_2 attribute of the Top_Level_BusObj business object, change the
attribute’s AppSpecificInfo value to:
ITable_7:
2. In the AppSpecificInfo at the business-object level of the Child_2 business
object, change the value to:
ITable_7:
3. In the AppSpecificInfo for each attribute of the child business object, using
Attribute_14 as an example, change the value to:
IField_14:
172 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Part 5. Hierarchical Dynamic Retrieve Module
WebSphere Business
Integration Broker
SAP
SAP gateway
RFC_READ_TABLE
SAP system
For information, see “Processing business objects” on page 10, and Chapter 18,
“Developing business objects for the Hierarchical Dynamic Retrieve Module,” on
page 179.
When the connector receives a request from the integration broker to perform an
application operation, it obtains processing information from the verb specified for
the top-level business object.
Note: The term hierarchical business object refers to a complete business object,
including all the child business objects that it contains at any level. The term
individual business object refers to a single business object, independent of
any child business objects it might contain or that contain it. The term
top-level business object refers to the individual business object at the top of
the hierarchy that does not itself have a parent business object.
When the integration broker sends a hierarchical business object with a Retrieve
verb, the connector attempts to return a business object to the integration broker
that exactly matches the current database representation of that business object. In
other words, the value of each simple attribute of every individual business object
that the connector returns matches the value of its corresponding field in the
database. Also, the number of individual business objects in each array of the
returned business object match the number of children in the database for that
array (unless the application-specific information limits the children to a subset).
To perform such a retrieval, the connector uses the primary key values in the
top-level business object to recursively descend through the corresponding data in
the database.
176 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 17. Configuring the Hierarchical Dynamic Retrieve
Module
This chapter describes the configuration of the Hierarchical Dynamic Retrieve
Module of the adapter for mySAP.com. The SAP connector should be installed
before performing the configuration tasks described in this chapter. For more
information on installing the connector, see Appendix A, “Quick Steps,” on page
281.
Note: In this document backslashes (\) are used as the convention for directory
paths. For UNIX installations, substitute slashes (/) for backslashes (\). All
file pathnames are relative to the directory where the product is installed on
your system.
The Hierarchical Dynamic Retrieve Module only performs service call requests, so
the business object handler is invoked through the meta-data in the business object
being sent. However, by setting the value of Modules to Bapi, you establish a
connector thread, thus allowing initialization and termination of the connector.
Then, if any issues arise during Hierchical Dynamic Retrieve Module processing,
you can easily shut down the connector by calling the terminate() method on the
running connector thread.
For a description of the Hierarchical Dynamic Retrieve Module, see Chapter 16,
“Overview of the Hierarchical Dynamic Retrieve Module,” on page 175.
Although you can use Business Object Designer or a text editor to create business
object definitions for the connector, it is recommended that you initially use
SAPODA because it uses the SAP application’s native definitions as a template.
WebSphere business objects for SAP can be flat or hierarchical. All the attributes of
a flat business object are simple and represent a single value.
A hierarchical business object has attributes that represent a single child business
object, an array of child business objects, or a combination of both. In turn, each
child business object can contain a single child business object or an array of
business objects, and so on.
180 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v In a single-cardinality relationship, the foreign key is determined by the primary
key in the child referencing a non- key attribute in the parent as its foreign key.
Each child has at least one simple attribute that references a non-primary key
attribute in its parent as a foreign key. Figure 60 provides an example.
v In a multiple-cardinality relationship, the foreign key is determined by the
primary key in the child referencing the primary key attribute in the parent.
Each child has at least one simple attribute that contains the parent’s primary
key as a foreign key. The child has as many foreign-key attributes as the parent
has primary-key attributes. Figure 62 on page 182 provides an example.
In each case, the foreign-key relationship between the parent and child business
objects is specified by the application-specific information of the key attributes of
the child business object. For more information, see “Business object attribute
properties” on page 186 and “Application-Specific information for simple
attributes” on page 188..
SAP_Customer
Retrieve
customer_id
.
customer_name
address_id SAP_Address
addr_data[1] Retrieve
.
. address_id
city
state
.
.
The following SELECT statements and their output illustrate retrieval of data from
the tables represented by the business objects above:
SELECT * FROM KNA1
In the example above, each customer (Joe’s Pizza and Larry’s Hardware) has a
single address. If the KUNNR and ADDRNUMBER columns are defined as
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 181
primary key constraints for their respective tables, the above structure ensures that
each customer can have only one associated address.
Note: For the sake of simplicity, the illustrations in this document do not display
the application-specific information used by the connector to determine the
tables and fields in the SAP application’s database.
ParentBOName
Verb
ID=ABC
.
.
ChildBOName
child[n]
. Verb OName
.
ID
. Verb
. OName
ID
. Verb
.
ID
.
.
SAP_Customer
Retrieve
customer_id
.
customer_name
.
. SAP_SalesView
sales_view_data[n]
Retrieve
.
. customer_id
sales_org
disti_channel
.
.
The following SELECT statements and their output illustrate retrieval of data from
each of these tables:
SELECT * FROM KNA1
KUNNR NAME1
----- -------------
10254 JOE’S PIZZA
182 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
10255 LARRY’S HARDWARE
In this example, Joe’s Pizza has one associated sales view record, whereas Larry’s
Hardware has three associated sales view records. The above structure allows each
customer to have zero or more associated sales view records.
In those cases that require the connector to retrieve more than 512 bytes of data
from a single database table, the additional fields must be represented in separate
single-cardinality child business objects. For example, if a business object must
represent 1500 bytes of data from a single table, the top-level business object
contains at least two single-cardinality child business objects. Neither the parent
nor either child has attributes whose total length (that is, the sum of their
maximum length) exceeds 512 bytes.
Note: If a business object represents more than one database table, the total length
of the values in the attributes that represent each table cannot exceed 512
bytes. However, this limit does not pertain to the total length of the values
of all attributes. For example, if a business object represents data from the
tables that store information about Customers and CustomerPartners, the
value of those attributes representing Customers cannot exceed 512 bytes,
and the value of those attributes representing CustomerPartners cannot
exceed 512 bytes, but the combined value of these attributes can exceed 512
bytes.
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 183
Therefore, when the Hierarchical Dynamic Retrieve Module receives a business
object request with the Retrieve verb, it creates a response business object by
recursively descending the entire object in the application and retrieving the
current database representation. To perform the retrieval, the connector uses the
specified key values in the top-level request business object. Therefore, the
response business object, which contains all the children of that top-level parent,
may have different values for simple attributes and different child business objects
from the request business object.
For example, assume the integration broker passed the following SAP_Customer
business object to the Hierarchical Dynamic Retrieve Module:
SAP_Address
SAP_Customer
Retrieve
customer_id=2345
address_id SAP_SalesView
address_data[1]
sales_view_data[n] customer_id=2345
sales_org=A
SAP_SalesView
customer_id=2345
sales_org=B
SAP_SalesView
customer_id=2345
sales_org=C
184 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
SAP_Address
SAP_Customer
Retrieve
customer_id=2345
address_id SAP_SalesView
address_data[1]
sales_view_data[n] customer_id=2345
sales_org=B
SAP_SalesView
customer_id=2345
sales_org=C
SAP_SalesView
customer_id=2345
sales_org=D
SAP_SalesView
customer_id=2345
sales_org=E
Note: If the connector reads from multiple tables when creating a particular
response business object, the business object does not match a single
database object. Instead, it matches selected fields from the specified tables.
Retrieve Operation
When retrieving a business object, the connector returns a status of either
VALCHANGE if the operation was successful (regardless of whether the operation
caused changes to the business object), or FAIL if the operation failed.
The connector performs the following steps when retrieving a hierarchical business
object:
1. Removes all child business objects from the top-level business object that it
received from the integration broker.
2. Calls the RFC_READ_TABLE function to retrieve the top-level business object
from the database.
The connector uses key values in the request business object to build the SELECT
statement’s WHERE clause. The result of the retrieval causes one of the following
actions:
v If the SELECT statement returns one record, the connector continues
processing the children and returns VALCHANGE (regardless of whether any
attribute changed value).
v If the SELECT statement returns no records, indicating that the top-level
business object does not exist in the database, the connector returns
BO_DOES_NOT_EXIST.
v If the SELECT statement returns more than one record, the connector
continues processing the children and returns VALCHANGE.
3. Recursively retrieves all child business objects (single-cardinality and
multiple-cardinality).
The connector calls the RFC_READ_TABLE function, which uses the
appropriate foreign-key values to build the SELECT statement’s WHERE clause.
The connector handles attributes marked as required in the following way:
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 185
v If the business object‘s definition specifies that the child is required, the
retrieval must return a record. If not, the connector returns FAIL.
v If the child is not required and the retrieval returns no records, indicating
that the child does not exist in the application, the connector leaves the
parent’s attribute empty.
For each record returned, the connector performs the following actions:
a. Creates a new individual business object of the correct type.
b. Sets all of the current business object’s attributes based on the values in the
returned row.
c. Recursively retrieves all of the current business object’s children.
Attention: If the retrieval of a single-cardinality child returns more than
one record, the connector returns only the first record.
d. Inserts the current business object with all of its children into the
appropriate single-cardinality attribute or array attribute of the parent.
Note: A business object can have attributes that do not correspond to any database
column, such as placeholder attributes. During retrieval, the connector does
not change such attributes in the top-level business object; they remain set to
the values received from the integration broker. The application-specific
information for these attributes must be blank.
Name property
Each business object attribute must have a unique name.
Type property
Each business object attribute must be of type String, or the type of a child
business object or an array of child business objects.
Cardinality property
Each business object attribute has the value of 1 or n in this property. All attributes
that represent a child business object or an array of child business objects also have
a ContainedObjectVersion property (which specifies the child’s version number)
and a Relationship property (which specifies the value Containment).
Key property
At least one simple attribute in each business object must be specified as the key.
To define an attribute as a key, set this property to true.
Important: The connector does not support specifying an attribute that represents
a child business object or an array of child business objects as a key
attribute.
186 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If the key property is set to true for a simple attribute, the connector adds that
attribute to the WHERE clause of the SELECT SQL statement that it generates while
processing the business object.
To retrieve a child business object or children from an array of business objects, the
connector uses foreign keys in the WHERE clause of the SELECT statement. It does not
use the Key property of attributes in child business objects. For information on
how to specify an attribute in a child business object as a foreign key, see
“Application-Specific information for simple attributes” on page 188.
Required property
The Required property specifies whether an attribute must contain a value.
v If an attribute that represents a child business object or an array of child
business objects is marked as required and the connector fails to retrieve any
child from the application, the retrieve operation fails.
v If a simple attribute is marked as required and the connector fails to retrieve the
corresponding row from the database, the retrieve operation fails. For example,
if the connector reads from multiple tables for a business object and it fails to
retrieve a row for a required simple attribute that represents a value in one of
the tables, the entire retrieve fails.
AppSpecificInfo
For information on this property, see “Application-Specific information for simple
attributes” on page 188.
When the connector retrieves data from the database and the SELECT statement
returns a blank value for an attribute, the connector sets the value of that attribute
to CxBlank by default.
Because the connector requires every business object to have at least one key
attribute, make sure that business objects passed to the connector have at least one
primary or foreign key that is not set to CxIgnore.
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 187
Business object application-specific information
Application-specific information in business object definitions provides the
connector with application-dependent instructions on how to process business
objects. This information includes:
v The class for the vDynRetBOH business object handler, which is provided in the
application-specific information for the verb of the top-level business object. This
value is identical for all business objects that this module processes.
v Database and query information, which is provided in the application-specific
information for simple attributes. The connector parses this information to
generate SELECT queries.
If you extend or modify an application-specific business object, make sure that the
application-specific information in the business object definition matches the syntax
that the connector expects.
188 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 37. Name-value parameters in attribute application-specific information (continued)
Parameter Description
FK=[..]fk_attribute Name The value of this property depends on whether the foreign-key relationship is
stored in the parent business object or the current business object:
v attributeName—specifies an attribute in the current business object; for more
information, see “Example: Current business object stores the foreign key”
v ..attributeName—specifies an attribute in the parent business object
The required parameters for each simple attribute are the table name and column
name. The operand defaults to EQ (equals). The following example illustrates the
basic format:
TN=KNA1:CN=KUNNR
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 189
SAP_Address
Retrieve
address_id
city=Burlingame
state=CA
country=USA
.
.
fk_country
fk_state
state_description
Figure 63. Example: current business object stores the foreign key
Attribute information: Table 38 documents the table name, column name, key,
and foreign-key for each attribute in the example SAP_Address:
Table 38. Description of example business object attributes
Attribute Table name Column name Key Foreign key Default
address_id ADRC ADDRNUMBER true
city ADRC CITY1 false
state ADRC REGION false
country ADRC LAND1 false
language T005U SPRAS true E
fk_country T005U LAND1 false FK=country
fk_state T005U BLAND false FK=state
state_description T005U BEZEI false
SQL Queries: The following SELECT statements illustrate the WHERE clause that the
connector builds to retrieve data from the tables represented by SAP_Address:
SELECT * FROM ADRC WHERE ADDRNUMBER = address_idValue
SELECT * FROM T005U WHERE SPRAS = ‘E‘ AND LAND1 = countryValue AND
BLAND = stateValue
190 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Note: Table definition anomalies may produce definitions that require manual
changes to fully meet your needs.
Important: Because the total number of bytes for all columns in each table
represented by a single a business object cannot exceed 512, you
must remove unnecessary attributes whose length causes the
definition to exceed this limit. For more information, see
“Handling long data rows” on page 183.
v If creating a hierarchical business object definition, specify the relationships
between parent and child business objects.
v Remove undesirable anomalies.
Chapter 18. Developing business objects for the Hierarchical Dynamic Retrieve Module 191
For example, most business objects that are a direct child of SAP_Customer
contain the Customer_KUNNR attribute. In the application-specific information
for Customer_KUNNR, specify the following:
TN=KNVI:CN=KUNNR:FK=..Customer_KUNNR
For information on specifying foreign keys, see Table 37 on page 188.
5. Locate child business object definitions whose corresponding tables do not
contain the key of the parent object. In these definitions, locate a non-key field
in the parent that matches the child’s primary key.
For example, SAP_Customer_ADRC is a second-level business object with no
key the same as its parent’s. SAPODA generates this business object definition
with the Address_number_ADDRNUMBER attribute, which is a non-key field
in SAP_Customer.
In the application-specific information for this attribute, specify the foreign-key
relationship as:
TN=ADRC:CN=ADDRNUMBER:FK=..Address_ADRNR
Note: Because SAP changed the name of the ADDNR field used in tables (such
as KNA1) created in SAP Version 3x to ADDRNUMBER in tables (such
as ADRC) created in SAP Version 4x, recognizing the relationship
between these two fields is more challenging.
192 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Part 6. ABAP Extension Module
Event
Event
archive
ABAP handlers table
table
Function module:
/CWLD/ADD_TO_QUEUE
ABAP components
The ABAP components of the connector are function modules, programs, and
database tables. These elements handle the event delivery and business object
request processes initiated by the Java component. The ABAP components are
delivered in connector transport files to be loaded into an SAP application; once
loaded, they run as ABAP repository objects.
Table 39 shows the virtual Java methods that the connector module implements
and their corresponding ABAP components. Keep in mind that this is not a
complete list of the ABAP components used by the connector.
Table 39. Java components and their corresponding ABAP components
Java components ABAP components
doVerbFor() /CWLD/RFC_DO_VERB_NEXTGEN
getVersion() No implementation required
getBOHandlerForBO No implementation required
init() /CWLD/RFC_LOGON
pollForEvents() /CWLD/RFC_EVENT_REQUEST
/CWLD/RFC_EVENT_RETURN
terminate() No implementation required
196 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Together, these ABAP function modules are the core of the ABAP Extension
Module. The following sections describe connector initialization, business object
processing, and how the connector handles event notification.
Initialization
The init() method calls the ABAP function module /CWLD/RFC_LOGON to validate
that the destination SAP application is running and that the RFC library can be
used to execute ABAP function modules. The /CWLD/RFC_LOGON function module is
also called to process all of the in-progress events. All events in the event table that
are marked with a status of event retrieved (status marked as R in the event table)
will be processed based on the InDoubtEvents Connector Property. The default
property value is Ignore. When event distribution is being used only the events
belonging to that particular connector and server with a status of ‘R’ will be
handled according to the connector property. If event distribution is not being used
then all events with a status of ‘R’ will be handled according to the connector
property. If the connector property equals reprocess, these events will be changed
to a status of queued (marked as Q in the event table). When the connector polls
for events, all events of ‘Q’ status will be processed, using /CWLD/RFC_E
VENT_REQUEST function module. If the connector property is equal to
FailOnStartUp, a fatal error is logged within the SAP log and the local log file and
the connector will shut down. An email is also sent notifying the user a fatal error
has occurred. If the connector property is equal to LogError an error is logged
within the SAP log and the local log file. The in-progress events are not processed
and the connector does not shut down. If the connector property is equal to Ignore,
the in-progress events are ignored and the connector polls as if there weren’t any
in-progress events in the event table.
If the function module does not execute successfully, the connector terminates.
doVerbFor()
Java
Function module:
/CWLD/RFC_LOGON
ABAP
Event Event
ABAP handlers table archive
table
Function module:
/CWLD/ADD_TO_QUEUE
doVerbFor()
In the Java component of the connector module, the doVerbFor() method of a
single business object handler implementation handles all of the business object
requests from the integration broker and all business object events from the
pollForEvents() method. In either case, doVerbFor() executes in the following
manner:
1. Converts an instance of a WebSphere business object for SAP to a single,
predefined flat structure that contains the business object data.
2. Calls the ABAP function module /CWLD/RFC_DO_VERB_NEXTGEN, passes the
business object data to it, and then waits for business object data to be
returned.
3. Converts the returned business object data back into a WebSphere business
object.
/CWLD/RFC_DO_VERB_NEXTGEN
In the ABAP component of the connector module, the connector’s ABAP function
module /CWLD/RFC_DO_VERB_NEXTGEN is responsible for handling all WebSphere
business object processing in the SAP application. Specifically, it routes business
198 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
object data to the appropriate ABAP handler. In this sense, function module
/CWLD/RFC_DO_VERB_NEXTGEN can be thought of as a business object router. It
executes in the following manner:
1. Receives a business object.
2. Dynamically calls an ABAP handler to process the business object data and
passes the business object data as a parameter.
3. Receives business object data from an ABAP handler and returns it to the
requesting call.
ABAP handlers
ABAP handlers are unique to the connector module in that they extend the
business object handler functionality from the Java component of the connector
module. ABAP handlers reside in the SAP application as ABAP function modules
and communicate directly with /CWLD/RFC_DO_VERB_NEXTGEN. ABAP handlers are
needed to get business object data into or out of the SAP application database.
BOHandler:
Java doVerbFor()
SAP gateway
ABAP
ABAP handler:
OBJECT
SPECIFIC IDOC
The adapter provides generic ABAP handlers. For example, function module
/CWLD/DYNAMIC_TRANSACTION supports flat business objects for Create, Update,
Delete, and Retrieve operations.
The WebSphere business integration system provides tools that facilitate the
development process. For more information on developing business objects and
ABAP handlers, see Chapter 22, “Developing business objects for the ABAP
Extension Module,” on page 231 and Chapter 5, “Generating business object
definitions using SAPODA,” on page 43.
Event notification
Event notification refers to the collection of processes that notify the connector of
SAP application object events. Notification includes, but is not limited to the type
of the event (object and verb) and the data key required for the external system to
retrieve the associated data.
Figure 67 on page 201 illustrates the event notification process, which uses the
pollForEvents() method.
200 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
pollForEvents()
SAP application
SAP gateway
Event Event
table archive
ABAP handlers table
Function module:
/CWLD/ADD_TO_QUEUE
Event polling
Event polling consists of three functions that are carried out by the
pollForEvents() method:
v “Event request”
v “Event processing” on page 203
v “Event return” on page 203
Note: The roles of these functions are distributed in the Java and ABAP
components. However, the Java component always initiates event polling.
Event request: Event request is the process of polling and retrieving events from
the event table in the SAP application. The event request mechanism of the Java
component has a counterpart function module in the SAP application,
/CWLD/RFC_EVENT_REQUEST. This function retrieves events from the connector’s
ABAP event table, /CWLD/EVT_CUR.
Every triggered event enters the event table with an initial status of prequeued
(status marked as P in the event table) and a default event priority of zero. Before
an event can be processed, its status must be changed to queued (Q in the event
table). The priority of an event must be zero before the connector retrieves the full
object that it represents. For more information on event priority, see on page 206.
Note: Every event with a prequeued or locked status is updated with every poll.
You can run into performance issues when events are triggered in batches.
You can configure the polling frequency using the PollFrequency
configuration property. For more information, see Appendix D, “Standard
configuration properties,” on page 301.
The event request mechanism performs the event selection process in two steps:
1. Selects events dedicated to the connector and the integration broker.
Events are dedicated to a specific integration broker in the event distribution
table (/CWLD/EVT_DIS). The name of the integration broker specified in this
table must match the name specified in the shortcut that starts the connector.
For example, the standard shortcut for an SAP connector running on Windows
has the format:
...\start_SAP.bat SAPconnectorName integrationBrokerName -cConfigFileName
When WebSphere MQ Integrator is the integration broker, the WebSphere
business integration system identifies the integration broker specified in the
event distribution table by getting values from the connector’s startup
command:
v The value of the integrationBrokerName parameter links the broker instance
in the startup command to the broker specified in the event distribution
table.
Note: The product’s installation program uses the integration broker name
specified at installation as the value of the integrationBrokerName
parameter in the startup command.
v The value of the ConfigFileName parameter identifies the Queue Manager
and queues configured for the specific WebSphere MQ Integrator instance.
2. If fewer than the maximum number of events have been selected, pulls the
balance from the events that are not configured for event distribution.
For example, if the connector-specific configuration property PollQuantity is
kept at 20 and there are 8 events dedicated to the specific connector and the
integration broker, the mechanism selects 12 additional events.
When WebSphere MQ Integrator is the integration broker and only one Queue
Manager has been configured, the names of the queues must be unique for
each instance of the integration broker. When WebSphere MQ Integrator is the
integration broker and a cluster has been configured, the names of the queues
must be unique for each integration broker within the cluster.
202 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If desired, you can incorporate the name of the broker (as specified in the
integrationBrokerName parameter of the startup command) or the name of the
connector into the names of the queues. For example, if two brokers are named
WMQI1 and WMQI2, their respective ADMINOUTQUEUEs might be named
ADMINOUTQUEUE_MQI1 and ADMINOUTQUEUE_MQI2, respectively.
Important: If you set up multiple connectors to poll, you must configure every
event to be processed by only one connector. Otherwise the
connector may send duplicate events, or may archive events instead
of retrieving them.
Event return: After each event is processed by event request, it is returned to the
SAP application using function module /CWLD/RFC_EVENT_RETURN. This function
module makes a copy of the processed event, adds it to the event archive table
(/CWLD/EVT_ARC), and then deletes the original entry from the event table.
Note: Events with their new status are all updated after each event is processed.
Archived events include successfully processed events, events that were processed
but terminated in an error, and unsubscribed events. Each event has a status that
can indicate one of the following conditions:
v The business object was successfully sent to the integration broker.
v The event produced an unknown Java return code from the connector.
v The event failed in attempting to retrieve data from the SAP application.
v The event timed out because the business object was locked.
v No collaboration subscribes to the event—relevant only when the WebSphere
InterChange Server is the integration broker.
Event triggering
The connector is event-driven. In order to get events out of the SAP application,
you need to implement an event triggering mechanism for each IBM
WebSphere-supported business object. Event triggering for the connector comprises
three functions:
v “Event detection”
v “Event triggering”
v “Event persistence” on page 207
Event detection: Event detection is the process of identifying that an event was
generated in the SAP application. Typically, connectors use database triggers to
detect an event. However, because the SAP application is tightly integrated with
the SAP database, SAP allows very limited access for direct modifications to its
database. Therefore, the event detection mechanisms are implemented in the
application transaction layer above the database.
The commonly uses four mechanisms to detect an event in the SAP application:
v Code enhancements
v Batch programs
v Business Workflow
v Change Pointer
All of these event detection mechanisms support real-time triggering and retrieval
of objects. In addition, code enhancements and batch programs provide
functionality to delay the retrieval of events. An event whose retrieval is delayed is
called a future event. For more information on triggering future events, see “Event
triggering.”
Note: Each event detection mechanism has advantages and disadvantages that
need to be considered when designing and developing a business object
trigger. For more information on implementing an event detection
mechanism, see Chapter 23, “Developing event detection for the ABAP
Extension Module,” on page 251.
Keep in mind that these are only a few examples of event detection mechanisms.
There are many different ways to detect events.
204 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
If the event will be triggered in real-time, then /CWLD/ADD_TO_QUEUE commits the
event to the current event table (/CWLD/EVT_CUR). Specifically, it adds a row of data
for the object name, verb, and key that represents the event.
Function module:
/CWLD/ADD_TO_QUEUE
Current
event table
Current Future
event table Batch program: event table
Retrieve
/CWLD/SUBMIT_FUTURE_EVENTS
For more information on triggering events for the future event table, see
Chapter 23, “Developing event detection for the ABAP Extension Module,” on
page 251.
All events are added to the current event table using /CWLD/ADD_TO_QUEUE. In
addition to adding a row of data to the current event table, /CWLD/ADD_TO_QUEUE
can be set up for:
v Event filtering
v Event distribution
Event filtering, event distribution, and event priority are executed as part of the
event trigger and by no other program. They result in either the event’s restriction
(filtering), or modification (event distribution and event prioritization).
Event filtering The event trigger can be used to filter out events
that you do not want added to the event table. The
adapter provides an ABAP include program
(/CWLD/TRIGGERING_RESTRICTIONS) that enables you
to restrict specific events for this purpose.
Event distribution Load balancing can be used to distribute event
processing across multiple connectors allowing you
to process multiple events at the same time. The
event trigger provides this capability through the
event distribution table (/CWLD/EVT_DIS). You can
dedicate business objects to be retrieved by a
specific connector. Also, event distribution can take
a single event and replicate it one or more times
for each subscribed combination of connector and
integration broker.
Attention: If you are using multiple connectors to poll, you must dedicate every
subscribed event to a specific connector. Failure to do so may result in duplicate
events delivered. You must guarantee that there is no dependency between objects
dedicated to different connectors, because this may result in events being delivered
out of sequence.
For example, assume you have a single integration broker named CrossWorlds1
that subscribes to two different business objects, BO_A and BO_B. The BO_A
business object is small and can be retrieved quickly whereas BO_B is large and
takes much longer to retrieve. With two connectors polling, SAP1connector and
SAP2connector, you can set up the event distribution table so that SAP1connector
retrieves BO_A and SAP2connector retrieves BO_B. SAP1connector can
continuously poll small objects of type A, while SAP2connector focuses on the
larger type B objects.
Important: If the event distribution table is not configured for a specific object,
then each event triggered for that object is available for any
combination of connector and integration broker.
Event priority You can set the event priority for each combination
of business object, connector, and integration
broker by delaying the retrieval of events. An
event’s priority indicates the number of polls that
are needed before the event is picked up for
delivery. For example, if you set the priority of an
event to 10, then the connector polls the event table
ten times before the event is retrieved. Each time
the connector polls, the priority value is reduced
by one until it reaches zero.
206 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
By default, all events are given a priority of zero.
An object’s priority is configured in the same
ABAP table as event distribution.
Figure 70 illustrates the event triggering functionality inside the SAP application.
The events E1, E2, and E3 are received by the event trigger /CWLD/ADD_TO_QUEUE. E1
represents a Customer event and E3 represents an Order event. Event distribution
is set up so that all Customer objects are handled by SAP1connector and all Order
objects are handled by SAP2connector. In this environment, both connectors use
the same integration broker. Because E1 is a Customer object, it is polled by
SAP1connector and because E3 is an Order object, it is polled by SAP2connector.
E2 is an Inventory object that is filtered out by code in the restriction program
/CWLD/TRIGGERING_RESTRICTIONS that restricts inventory objects to a specific
warehouse.
/CWLD/ADD_TO_QUEUE
Current
E1 E1 event
Event E1 table
Event Event
detection E2 filtering distribution
mechanism E3
E3 E3
SAP1connector
SAP2connector
Event persistence: Once the event trigger inserts an event into the event table, the
event is committed to the database with its event distribution and event priority
values set. At this time, only polling can modify the event. When the event polling
processes is completed, meaning the event was retrieved from the SAP application
and processed by the Java component of the connector, a copy of the processed
event is added to the event archive table (/CWLD/EVT_ARC). The original event is
then deleted from the event table.
Note: You can resubmit an event from the archive table. Keep in mind that the
event is simply moved to the event table and is not triggered again.
Specifically, it does not pass back through event filtering, event distribution,
and event priority.
Note: In this document backslashes (\) are used as the convention for directory
paths. For UNIX installations, substitute slashes (/) for backslashes (\). All
file pathnames are relative to the directory where the product is installed on
your system.
Each transport file is included in a .zip file. For example, the transport file for the
SAP version 4.x Primary transport is located in the 4_Primary.zip file.
Once the required transport files have been successfully loaded, the business
object-specific transports can be loaded in any order. See the transport note
included in each transport .zip file for detailed information about the transport
file.
Note: You must create the connector’s namespace prior to modifying one of the
connector’s ABAP objects in any SAP application version 4.x.
To ensure that all necessary tables are created before the data for those tables is
added, you must install the transports in the order listed. These files can be found
in ProductDir\connectors\SAP\dependencies, where ProductDir represents the
directory where the connector is installed.
Table 40. Connector transport files by version
Version of SAP Transport files
V.4.0, V.4.5, V.4.6 v \connectors\SAP\dependencies\transports_40_45_46\40_45_46_Primary.zip
v \connectors\SAP\dependencies\transports_40_45_46\ 40_45_46_Infrastructure.zip
V.4.7 v \connectors\SAP\dependencies\transports_47\47_Primary.zip
v \connectors\SAP\dependencies\transports_47\47_Infrastructure.zip
210 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 41. Connector transport file functionality
File Functionality
Primary This transport file contains the following elements:
v Development objects, which should be loaded only once into the system. It contains the
number range objects, the development classes, the dynamic transaction declaration
include program as well as the restriction include program, which can be used to make
customer-specific changes to the triggering logic. If you apply this transport file to a
system that already has the connector running on it, the contents of the transport file will
overwrite all objects in the existing environment.
v The four number ranges in their initial state. Reimporting the Primary transport file
initializes your existing number range intervals for the connector. This corrupts the data in
the connector’s log, current event, future event, and archive tables if those tables are not
refreshed before reusing.
Infrastructure This client-independent transport file contains the following elements:
v Objects and functionality that are shared among the request, delivery, development, and
maintenance components. For example, it contains the log and data elements.
v The functionality required to support business object request operations.
v The functionality required to support event delivery operations including event triggering
and event polling.
v The functionality required to support maintenance operations such as displaying the log
statistics and event tables.
v The functionality required to support the development of objects.
Attention: If you are reapplying transports, note that this resets your
environment. Any development done prior to reapplying the transport files will be
overwritten.
In the following instructions, SID refers to the SAP system ID, and
<TransportFileName> refers to the name of the transport file. However, the
characters that make up the transport file name appear in a different order in the
installation directory from the way the name is passed as a parameter to the
various tp commands. In the \usr\sap\trans\cofiles directory, the format of a
transport file name is K9xxxxx.SID, but when the filename is passed as a parameter
it has the format SIDK9xxxxx. For example, the file name K912345.D30 is passed as a
parameter as D30K912345 because D30 is the SID of the source system.
Chapter 20. Installing and customizing the ABAP Extension Module 211
tp connect <SID>
If this command fails, try adding the path of the tpparam file as a second
parameter:
tp connect <SID> pf = <path of tpparam>
For example, if the SID is P11 and the path of the tpparam file is
\usr\sap\trans\bin\tpparam, the command is:
tp connect P11 pf = \usr\sap\trans\bin\tpparam
If tp connect succeeds when you specify the path of the tpparam file and fails
when you do not, you should specify the optional tpparam path in the
commands described in step 3.
4. Import the transport files in one of the following two ways:
v “Use adapter-delivered commands”
v “Use an SAP transaction code”
You must install the transports in the order listed in “Connector transport file
installation” on page 209.
After the transports are installed, change the development class to follow the
migration path of your development classes. Use IBM WebSphere BI Station
(transaction /n/CWLD/HOME) to do the following:
1. Click the Tools tab, and then click the Transport Layer button.
2. Select the appropriate Transport layer entry, and then click the Save button.
Attention: Any changes you make to development objects that were in the
connector transports should be well documented outside of SAP. Changes can be
overwritten by the next release of transport files. If changes are overwritten, they
must be reapplied manually. For more information on upgrade issues, see
Chapter 25, “Upgrading the ABAP Extension Module,” on page 271.
212 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Verifying connector transport file installation
To verify that the connector transport files are installed properly, you must:
v “Verify that transport files were moved to the SAP application”
v “Verify that SAP generated the objects successfully”
This generates all of the adapter programs that include these programs.
If you get the response Programs successfully generated, you can assume that the
transport was successful.
It is recommended that you backup your current connector files (for example the
configuration and message files CN_SAP.txt and SAPConnector.txt) before starting.
Before loading the connector definition into the repository, you may want to
remove all supported object references except those you need.
Chapter 20. Installing and customizing the ABAP Extension Module 213
Attention: If you install the latest Primary and Number Range transport files,
you will overwrite your existing number range interval information. Overwriting
the number range intervals may cause existing events and objects to be out of sync
because the number range interval is reset to zero (0).
After you install the latest version of the connector, install the latest ABAP
transport files for the version of SAP you are going to use. Without these, you
cannot transport the existing components of the ABAP Extension Module.
Transport installation is described in “Connector transport file installation” on page
209. Keep in mind that installing new transport files overwrites any modifications
to adapter-delivered code.
Make sure that you use the correct transport files for your environment. For
example, if you are using an SAP version 4.6 environment, install the adapter’s 4.x
transport files. Doing so ensures that any warning or errors you get when you load
your objects are in relation to the SAP version 4.x environment and not anything
else that was brought over from SAP version 3.x. This allows you to resolve
problems that relate to differences in SAP version 4.x.
After you install the latest version of the connector and the latest ABAP transport
files for the version of SAP you are going to use., configure the new connector.
If you are upgrading from the SAP 3.x version of the connector to this version, you
need to configure the new connector-specific configuration properties “Modules”
on page 330 and “Namespace” on page 331. For more information on these
properties, see “Connector-specific configuration properties” on page 325.
Note: In a test environment, you may have multiple users testing the same
business object that is subscribed to by multiple connectors. If each user
wants only a certain event for that business object, then you can specify a
user name to differentiate between which event is passed to the combination
214 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
of which connector and which integration broker. In the User (Event Trigger)
field, enter the appropriate user name for the business objects. For
information on how the WebSphere business integration system identifies
each unique instance of a WebSphere MQ Integrator integration broker, see
“Event request” on page 201.
Note: You must have developer privileges to make changes because the code
needs to be recompiled.
To view the current size of these tablespaces, go to transaction DB02, and then
click the Current Sizes button. The volume of events captured by the WebSphere
business integration system determines the size needed for these tablespaces.
If the default sizes are too small, ask the SAP database administrator to modify
them.
Chapter 20. Installing and customizing the ABAP Extension Module 215
Verifying number ranges for transport objects
There are four objects for the WebSphere business integration system that must
have an adequate number range within the SAP application. When the transports
are installed, the following objects and their default number ranges are set:
v /CWLD/EVT
v /CWLD/IDOC
v /CWLD/LOG
v /CWLD/OBJA
Verify that the associated number ranges are set correctly. To view the number
ranges:
1. Go to transaction SNRO.
2. Populate the Object field with the object name (for example, /CWLD/EVT).
3. Click Number Ranges, and then click Intervals.
Attention: If you reinstall the transport files in an installation where events have
already been generated, new events may be created using existing event IDs. To
prevent this problem, turn off logging by going to the Configuration tab in IBM
WebSphere BI Station, and then truncate the log completely before reimporting the
connector transport file. Once the connector transport file has been successfully
loaded, turn logging back on. For more information on truncating the event log,
see “Setting up truncation of the event log” on page 266.
216 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Configuration Name—Trigger: NoEventForUser
v Counter—Any Number
v Configuration value—User Id (connector name)
Note: Keep in mind that this prevents the connector from triggering events.
Chapter 20. Installing and customizing the ABAP Extension Module 217
218 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 21. Business object processing in the ABAP
Extension Module
This chapter discusses business object processing for the ABAP Extension Module.
It provides a detailed description of how the connector processes business objects.
The chapter is set up to show the progression of a business object through the Java
and ABAP components of the connector.
Business object processing for the extension module of the adapter for mySAP.com
is the same for all business objects regardless of the specific native SAP API that is
used. For example, if you develop a business object based on a Call Transaction or
an IDoc, the business object data is processed the same way. The processing is the
same whether a business object is sent into the SAP application as a retrieve
performed as part of event notification or as a business object request. The
business object’s verb also does not change the processing.
1 4
Connector
module BOHandler
WebSphere Business
InterChange Server
Flat Flat
SAP R/3 Structure Structure
ABAP handlers
Business object processing consists of four steps. The four steps listed below
correspond to the numbers in Figure 71.
1. The connector converts an application-specific business object into a flat
structure containing business object data and passes the data to the SAP
application.
2. The connector’s function module /CWLD/RFC_DO_VERB_NEXTGEN dynamically
routes the business object data to an ABAP handler.
3. The ABAP handler processes the business object data, generates business object
response data, and returns new business object data to the connector through
/CWLD/RFC_DO_VERB_NEXTGEN.
4. The connector receives the new business object data, and uses it and the
business object definition of the application-specific business object to create a
new business object to pass to the integration broker.
220 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
When converting a business object into a flat structure, the connector creates a
structure in memory and then populates it with data from the business object. In
doing so, it passes the following data into the SAP application from the business
object:
v Business object name
v Business object application-specific information
v Business object verb
v Business object verb application-specific information
v Attribute name
v Attribute property IsKey
v Attribute property AppText
v Attribute value
Table 42 shows the generic flat structure of a business object. The connector uses
this flat structure when adding the business object data from a WebSphere business
object.
Table 42. Generic flat structure representation of a WebSphere business object for SAP
Field name Data type Length Description
ATTR_NAME CHAR 32 Attribute Name (example, CustomerId)
BLANK1 CHAR 1 Delimiter
ATTR_VALUE CHAR 200 Attribute Value (example, 00000103)
BLANK2 CHAR 1 Delimiter
ISKEY CHAR 1 1= true, 0 = false; attributes only
BLANK3 CHAR 1 Delimiter
ISNEW CHAR 1 1 = BO; 0 = verb or attribute
BLANK4 CHAR 1 Delimiter
PEERS CHAR 6 Indicates number of peers of an array of business
objects
BLANK5 CHAR 1 Delimiter
OBJ_NUMBER CHAR 6 Not used
BLANK6 CHAR 1 Delimiter
APPTEXT CHAR 120 Application-specific information of object, verb or
attribute
BLANK7 CHAR 1 Delimiter
Note: The BLANKn field names always contain a single character (CHAR) space
and should never be populated.
In order for the data conversion to work properly, the business object data in the
flat structure must strictly adhere to a set of rules. These rules are defined in this
initial data conversion step:
v Each business object attribute is placed sequentially into a flat structure, where
one row corresponds to one attribute.
v Hierarchical business objects are converted as depth and then breadth.
When the connector populates the flat structure with business object data, the
connector loops through each business object twice, beginning with the top-level
business object.
1. In the first pass, it sets all simple attributes. Each attribute equals one row in
the flat structure.
Chapter 21. Business object processing in the ABAP Extension Module 221
2. In the second pass, it recursively executes the same processing in step 1 for
each child business object.
Attributes that represent child business objects are not included in their parents.
Instead, each child that contains data is created as a complete business object. The
result is a single list of attributes ordered by depth, then breadth.
Figure 72 illustrates the data conversion of a WebSphere business object for SAP
into a flat data structure. The conversion of data always follows the rule of depth
first and then breadth. In the example, the top-level parent business object,
SAP_Order, has two children, SAP_LineItem (1) and SAP_LineItem (2), which are
considered peers. SAP_LineItem (1) has one child business object,
SAP_ScheduleLines.
SAP_Order
Order number
Customer number Flat structure
SAP_LineItem (2)
SAP_Order
Child business object Order number
Item number
222 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 43. Flat business object SAP_Material
OBJ_
ATTR_NAME ATTR_VALUE ISKEY ISNEW PEERS NUMBER APPTEXT
BoName SAP_Material 0 1 1 (blank) (blank)
BoVerb Retrieve 0 0 1 (blank) :/CWLD
/DYNAMIC_RETRIEVE
ItemID 000000000000001179 1 0 1 (blank) (blank)
ShortDesc CxIgnore 0 0 1 (blank) (blank)
ObjectEventID SAP_124 0 0 1 (blank) (blank)
The first two rows, BoName and BoVerb, are added by the connector for each
business object. BoName and BoVerb are keywords that cannot be used as business
object attributes.
Chapter 21. Business object processing in the ABAP Extension Module 223
Note: Remember that every business object retrieve and request is processed
through /CWLD/RFC_DO_VERB_NEXTGEN.
Every ABAP handler must reserve the use of verb application-specific information
for the connector. The format for the verb application-specific information is:
:function1:function2:function3
224 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Business object data and ABAP handlers
Every ABAP handler receives business object data in the same format (flat
structure). However, each ABAP handler has specific requirements for business
objects that are determined by the complexity of the WebSphere business object
definition, the native API that SAP provides, and the level of functionality that the
ABAP handler provides. For these reasons, ABAP handlers may interpret business
object data by parsing it into a structure specific to the business object. This
enables the ABAP handler to more easily manipulate the data.
Note: Parsing the data is not required. However, it simplifies the ABAP handler’s
processing of a business object.
The adapter provides several ABAP handlers, such as an IDoc handler. The IDoc
handler leverages SAP’s IDoc technology by providing an ABAP handler to
interpret business object data by reformatting it into an IDoc-based structure for
the ABAP handler to use.
Instead of directly modifying the database tables, SAP provides a flexible ABAP
API (Call Transaction) for Create, Update, and Delete operations. Call Transaction
is SAP-provided functionality for entering data into an SAP application. It
guarantees that the data adheres to SAP’s data model by using the same screens an
online user would use in a transaction. This process is commonly referred to as
screen scraping.
Retrieve processing
If the verb is Retrieve, then the connector uses ABAP SQL statements to retrieve
data from the SAP application database. The business object data provides the keys
for the where clause when pulling data. The difficulty in this methodology of
retrieving data is that the retrieved data must be represented in a format that
represents the business object structure. This is done in the ABAP Handler ABAP
code.
The connector supports the Retrieve processing only with a primary key specified.
Chapter 21. Business object processing in the ABAP Extension Module 225
The ABAP Extension Module uses three different return codes to process business
object data; return code 0, 21, and any non-zero code (other than 21). Set the return
code in the function module interface. For more information on the function
module interface, see “IBM WebSphere function module interface” on page 233.
Return code 0
Return code 0 indicates that the business object was successfully processed and
returns VALCHANGE to the connector infrastructure. If ABAP handler processing
is successful, then the connector expects new business object data that reflects the
operation performed. For example, after a successful Create, the returned business
object is an exact copy of the business object initially sent in, except that the keys
are updated. Similarly, a successful Retrieve results in a fully formed instance of
the business object. However, Create, Update, and Delete operations have different
requirements for returned business objects than do Retrieve operations.
When the IBM WebSphere InterChange Server is the integration broker, the
difference in requirements comes from how the WebSphere business integration
system handles business objects, specifically dynamic cross-referencing of object
IDs during mapping. When the connector returns a business object to IBM
WebSphere InterChange Server after a Create or Update operation, the mapping
infrastructure attempts to update the cross-reference tables with the newly
acquired object ID. This is accomplished by looking up the value of the business
object’s ObjectEventId attribute that was set when the business object was
originally sent to the connector.
To the ABAP handlers, this is significant because the ABAP handlers are
responsible for “stitching” the object IDs into the business object that is returned to
the connector. Typically, this is not an issue for Retrieve operations because there is
no corresponding dynamic cross-referencing. Retrieve operations generate an
entirely new business object that is returned to the connector. This business object
does not have any direct relationship to the structure of the business object
originally sent in.
The business object data returned by the ABAP handler must be in the same flat
structure format as when it was initially passed in to function module
/CWLD/RFC_DO_VERB_NEXTGEN. The ABAP handler needs to send out only simple
type attributes with the following information for each:
v Value
v Peer relationship
v Application-specific information
The attribute name is not required at this point, because the connector uses only
the application-specific information to create a business object from this data.
Identifiers for the beginning and ending of business objects or object type
attributes are not used and should not be added. For example, the BoName and
BoVerb rows are not used in the business object returned from the ABAP handler.
They are initially passed into the ABAP handler only to facilitate processing.
The ABAP handler must adhere to the following set of rules when populating a
flat structure with business object response data representing an WebSphere
business object:
v Send only simple attributes, not object types.
v All attributes must exist in the WebSphere business object definition.
v All attributes must be sent in the order they are listed in the WebSphere
business object definition.
226 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v No attribute of a child business object can be sent unless at least one attribute is
sent for its parent business object.
v Contained business objects must communicate the number of peers they have.
v Attribute name (field ATTR_NAME) is not required.
SAP_Material
ItemId
ShortDesc
ObjectEventId
Table 45 represents the structure of a flat business object, SAP_Material, whose key
value is ItemID. Notice that field ATTR_NAME is not required, APPTEXT is unique for
each attribute, and because this business object is flat, the PEERS field can be left
blank.
Table 45. Flat business object SAP_Material
OBJ_
ATTR_NAME ATTR_VALUE ISKEY ISNEW PEERS NUMBER APPTEXT
(blank) 000000000000001179 (blank) (blank) (blank) (blank) ItemId
(blank) Toaster 6000 (blank) (blank) (blank) (blank) ShortDesc
(blank) SAP_124 (blank) (blank) (blank) (blank) ObjectEventId
Chapter 21. Business object processing in the ABAP Extension Module 227
Parent business object
SAP_Sales order
Order umber
Customer number
SAP LineItem (2)
ObjectEventId
Return code 21
Return code 21 indicates that the business object was successfully processed and
returns SUCCESS to the connector infrastructure. This code returns only success
228 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
and does not return any business object data back to the connector. The
Object-specific IDoc handler that process the business object data returns a return
code of 21 when the business object data is successfully entered into the SAP
application. The return code is passed back to the /CWLD/RFC_DO_VERB_NEXTGEN
function module, which returns success back to the connector. The connector never
receives business object data.
This is useful when passing large objects (such as an IDoc with multiple line items)
and all you want is to know that your business object data was passed to the SAP
application successfully. Performance is greatly improved because you return only
the code and not the business object.
When WebSphere InterChange Server is the integration broker, you should use
return code 21 only when the business object does not require cross-referencing
and when you are simply passing data into the SAP application. Do not use return
code 21 for retrieve operations. Behavior of the SUCCESS return code means that
no business object is returned to the WebSphere InterChange Server for
cross-referencing or further processing.
Chapter 21. Business object processing in the ABAP Extension Module 229
connector attempts to set every attribute that is in the returned business object
data. If any attribute cannot be set, the connector returns FAIL to the connector
infrastructure.
In order for the returned data transfer to execute successfully, the connector
expects the following to be true of the returned data:
v It contains only simple attributes, where one row equals one attribute.
v Attributes must exist in the WebSphere business object definition.
v Attributes must be ordered as they are in the WebSphere business object
definition (depth and then breadth).
v An attribute’s application-specific information links its object’s
application-specific information with another value that uniquely identifies the
attribute within the business object’s definition.
v Child attributes must occur after their parent object’s attributes (never before
their parents and never after their grandparents).
v An attribute must communicate its business object’s number of peers.
When the connector rebuilds the application-specific business object, the connector
loops through the business object twice, beginning with the top-level business
object.
1. In the first pass, it sets all simple attributes.
2. In the second pass, it checks if the flat attribute exists in a child object. If it
exists the connector recursively executes the same processing for the child
object.
Once the business object is successfully rebuilt with new business object data, the
connector returns it to the integration broker.
230 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 22. Developing business objects for the ABAP
Extension Module
This chapter discusses business object development for the ABAP Extension
Module. It provides background information as well as steps for developing
business objects and ABAP handlers. You should be familiar with how the
connector processes business objects.
Background information
Business object development for the ABAP Extension Module consists of creating
an application-specific business object definition and an associated ABAP handler
for each verb that you want to support.
For each application-specific business object definition that you develop, you must
support it by using an adapter-provided ABAP handler or by developing a custom
ABAP handler. The ABAP handler is the mechanism that gets data into and out of
the SAP application database.
Note: The application-specific business object and the ABAP handler rely on each
other’s consistency to pass data into and out of the SAP application.
Therefore, if you change the business object definition, you must also change
the ABAP handler.
Note: SAP supports many verbs other than those (Create, Retrieve, Update, and
Delete) supported by the WebSphere business integration system. You can
develop an ABAP handler to support any verb.
To develop an ABAP handler, you must understand how the connector gets data
into and out of the SAP application and what form that data takes during this
process. For a high-level description of business object processing, see Chapter 19,
Note: When you develop business objects, you must make sure that the objects are
added to the connector’s table /CWLD/OBJECTS table in the SAP application. If
they are not, then you will not be able to access the objects for
customization (for example, setting up the object for event distribution).
ABAP SQL
ABAP SQL is SAP’s proprietary version of SQL. It is database- and platform-
independent, so that whatever SQL code you write, you can run it on any database
and platform combination that SAP supports. ABAP SQL is similar in syntax to
other versions of SQL and supports all of the basic database table commands such
as update, insert, modify, select, and delete. For a complete description of ABAP
SQL, its use, syntax and functionality, see your SAP documentation.
Using ABAP SQL, an ABAP handler can modify SAP database tables with business
object data for create, update, and delete operations. It can also use the business
object data in the where clause of an ABAP select statement as the keys.
Note: The WebSphere business integration system never uses ABAP SQL to
modify SAP tables, because this may corrupt the integrity of the database.
The connector uses ABAP SQL only to retrieve data and to modify
adapter-delivered database tables.
Call Transaction
Call Transaction is SAP-provided functionality for entering data into an SAP
system. Call Transaction guarantees that the data adheres to SAP’s data model by
using the same screens an online user sees in a transaction. This process is
commonly referred to as screen scraping. To use Call Transaction, specify the
following types of instructions:
v Initiation—transaction to call
v Navigation—sequence of screens to process
v Mapping—input data that should go into each field on a screen
232 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
sequence in which a transaction’s screens are processed and which fields should be
populated with data on which screens. All of the elements of an SAP transaction
that are exposed to an online user have identifications that can be used in a BDC.
The elements are as follows:
v Screens—identified by a program name and screen number
v Input fields—typically identified by the database table and field name to which
it refers
v Commands in the transaction—commands such as save, new items, details, and
exit (identified by a one- to eight-character code)
To get a screen’s BDC identity, place the cursor in any field on the screen. Press F1
for help and then F9 for technical information. The program name and screen
number are listed under Screen Data.
To get an input field’s BDC identity, place the cursor in each field on the screen in
which you want to input data. Press F1 for help and then F9 for technical
information. If there is a box named Field Description for Batch Input, then use the
information in the Screen Field field. If this box does not exist, from the Field Data
box, concatenate the Table Name and Field Name together with a hyphen.
To get a command’s BDC identity, highlight the command in the menu and press
F1 for help. Use the value in the Function field.
In the importing section of the interface, you can communicate values such as the
ABAP handler name, business object name, and business object.
The exporting section of the interface is used to communicate the results of the
ABAP handler processing. The return code RFCRC parameter is a single field used
to determine the code a connector returns. The possible values are:
RC = 0 (success, VALCHANGE)
Chapter 22. Developing business objects for the ABAP Extension Module 233
RC = 1 (failure, FAIL)
RC = 21 (success, SUCCESS)
The adapter provides a set of tools that support these APIs. For all three ABAP
handler APIs, the tools can be found in IBM WebSphere BI Station (transaction
/n/CWLD/HOME). For more information, see Appendix F, “IBM WebSphere BI Station
support levels,” on page 335. The adapter also provides SAPODA. For more
information, see Chapter 5, “Generating business object definitions using
SAPODA,” on page 43.
The following sections discuss the adapter-provided APIs and gives you steps on
how to use IBM WebSphere BI Station tools and SAPODA to develop business
objects for them.
Important: You must log on to the SAP system in English when using IBM
WebSphere BI Station tools to generate business object definitions or
ABAP handlers. The WebSphere BI Station log is available only in
English. You must also log on to the SAP system in English for the
SAPODA.
234 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 47. Business object attribute properties for the ABAP Extension Module (continued)
Property name Description
IsRequired This property specifies whether an attribute must contain a
value.
AppSpecificInfo The value of this property is different depending on which
ABAP handler supports the business object. The adapter
delivers business object generation tools that automatically
provide this value. If you modify the generated value, the
business object may fail to process properly.
DefaultValue This property specifies the value to assign to this attribute if
there is no run-time value.
Note: When the IBM WebSphere InterChange Server is the integration broker,
verify that your final business object definition file contains the version at
the top. Early versions of the WebSphere InterChange Server require version
text, which is located in the \repository\ReposVersion.txt file under the
product directory. Also verify that the definition includes all of the required
business objects and attributes (including the ObjectEventID attribute).
Important: You must log on to the SAP system in English when using IBM
WebSphere BI Station to generate business object definitions or ABAP
handlers. The WebSphere BI Station log is available only in English.
You must also log on to the SAP system in English for the SAPODA.
Inbound wizard
The Inbound Wizard tool enables you to define business objects and the metadata
required for their processing by recording your actions as you step through an SAP
transaction that supports your required functionality. You do not need to write any
ABAP code nor do you need to know the underlying database schema for the
business object.
The Inbound Wizard generates the data for the Dynamic Transaction table by
recording and interpreting user actions in an SAP transaction. It supports the
definition of flat (non-hierarchical) business objects. In other words, it does not
support business objects that contain child business objects. The Inbound Wizard
can be used as a code generator to facilitate the development of more complex
objects that require static code.
Note: You can manually develop new business objects or modify existing business
objects by adding/modifying entries to the Dynamic Transaction table.
For more information on developing business objects for business object requests,
see “Developing business objects using dynamic transaction” on page 236.
Chapter 22. Developing business objects for the ABAP Extension Module 235
Developing business object definitions using SAPODA
SAPODA enables you to build a WebSphere business object definition based on an
IDoc, or the tables used by Dynamic Retrieve and Dynamic Transaction. For more
information on developing business objects using SAPODA, see Chapter 5,
“Generating business object definitions using SAPODA,” on page 43.
Tips
v Data entered on an initial screen may default for all line items and reduce
required line item input.
v Line item overview screens may provide enough input rather than drilling down
to a details screen, which may require additional input.
v Confirmation messages usually do not need to be answered in BDC; for
example, Are you sure you want to save?
v The counter renumbers in increments of 10, for each object and verb
combination, every time you enter and exit the table maintenance in change
mode.
v During execution, the Call Transaction uses the user’s settings for date
formatting. Be sure the connector’s user is set up to use a variation of
YYYY-MM-DD date format, because this is the standard date format used by the
WebSphere business integration system. Similarly, change your own user settings
if you want to reprocess the business objects by stepping through the
transaction.
236 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
on some screens, but not on others. The challenge is to find the sequence that does
what you need with the least amount of effort. A simple BDC session is more
stable than a complex BDC session.
An SAP transaction may behave differently when accessed using the Call
Transaction method in a background process instead of executing online. For
example, different or additional screens may appear or input fields may reside on
screens different from those your online investigation revealed. The discrepancy
occurs because the transaction’s controlling code may dictate different behavior
when executed in the background from that executed online. As a result, your
online test may work when reprocessing a failed object event as you step through
the transaction; however, the connector consistently fails when processing the same
object. If this occurs, modify the BDC so that it processes in the background. If you
modify the BDC, you may encounter cases where the BDC processes in the
background, but fails when processed online.
The BDC you define in the Dynamic Transaction table is static. It cannot react
during the transaction if certain input data causes other screens to pop up or other
fields become mandatory during runtime. Proper investigation of a transaction’s
configuration is important to be able to predict consistent behavior. Experiment
several times with the transaction; repeated behavior can become your guideline.
Once you have determined the screen flow, follow the steps below and document
the information you gather in a spreadsheet.
1. Go to the transaction that supports your object and identify the transaction
code.
2. Identify the BDC elements for the screen and input fields you require.
3. Identify the menu command you need to continue processing to the next
screen.
4. Repeat steps 2 and 3 for each screen required.
5. Conclude by noting the command to save the transaction.
Table 48 describes the column names for Dynamic Transaction table /CWLD/WIZ_IN.
Table 48. /CWLD/WIZ_IN table entries for dynamic retrieve
Field name Description When used Technical name
Object name IBM WebSphere business Always OBJ_NAME
object name
Verb Verb (Create, Update, Always OBJ_VERB
Delete, or Retrieve)
Counter Counter Always POSNR
Program Program associated with BDC screen identification PROG_NAME
a screen
Screen number Screen number associated BDC screen identification DYNPRO
with a screen
Start Specifies a new screen BDC screen identification DYNBEGIN
Screen description Free text description of User discretion SCR_DESCR
screen, field, or command
BDC field name BDC input field name BDC input fields FNAM
Field name in business Attribute in the IBM BDC input fields SOURCEFLD
object WebSphere business
object to supply the input
value
Chapter 22. Developing business objects for the ABAP Extension Module 237
Table 48. /CWLD/WIZ_IN table entries for dynamic retrieve (continued)
Field name Description When used Technical name
Default value A static default value to A value might not always DEFLT_VAL
use if no entry is be passed in and it is
provided in the IBM mandatory for the
WebSphere business transaction
object or if using
BDC_OKCODE, because
it is the command value
SY Field name A dynamic system field to A value is not passed in SYFIELD
be used as a default value or should be determined
(for example: DATUM) by SAP system fields
Return A number between 1 and A business object key RETURNFLD
4, that identifies which attribute that should
system message field receive the key value
returns the key value at
transaction completion
(SY-MSGV#)
Length Character length from the Relevant only when using LENGTH
zero position of the an attribute that contains
attribute value that a composite value
should be used for input
Important: You must log on to the SAP system in English when using IBM
WebSphere BI Station to generate business object definitions or
ABAP handlers. The WebSphere BI Station log is available only in
English.
2. Click the Development tab.
3. Click the Modify BO Metadata button in the Transaction based - Inbound
section.
Defining the metadata for the business object is simple. For each screen, the first
entry identifies the screen, subsequent entries identify the input fields, and the last
entry must be a command. This grouping repeats for each screen.
Using the Counter column as a line number for discussion, step through the
SAP4_CustomerMaster example.
100 Begin with screen number 100 of program SAPMF02D. This is a new
screen, the first, so it is flagged in the Start column.
110 On screen 110, use the value from the Customer_account_group
attribute in the business object, and add it to the BDC field name
column (the value is RF02D-KT0KD). Specify the default value as
0001. If the Customer_account_group attribute contains CxIgnore,
then the BDC field name column receives the default value 0001
120 The Customer_Account_Number attribute is the key value, so it is
not set during the Call Transaction. SAP assigns the key value
internally and makes it available only after the transaction is
successfully posted. For this reason, leave the BDC field name
column blank, but include an entry in the table because the
238 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Customer_Account_Number attribute must be set with this key
value when it is returned at the conclusion of the Call Transaction.
Also enter the word RETURN in the Program column for
CustomerNumber.
Depending on the transaction, SAP returns the key value in one of
four possible fields: SY-MSGV1, SY-MSGV2, SY-MSGV3 or SY-MSGV4. To
specify that you want the return value set in a particular attribute,
enter a number, 1-4, in the Return column. This number
corresponds to the SY-MSGV# field containing the key value.
130 You are finished entering the necessary values for the first screen,
so enter a command, /00, in the Default Value column to simulate
pressing the Enter key. This takes you to the next transaction
screen. Commands are entered in the screen input field,
BDC_OKCODE, which is where you enter in a transaction code.
140 At this point, you are at the next transaction screen. Enter the
address information. Since it is a new screen, flag it in the Start
column. In this example, the second screen is associated with the
same program as the initial screen, and only the screen number
changed from 100 to 110. This is not always the case.
150 -210 Use the values from the Name_1, Sort_field, City,
P_0_Box_postal_code, Country_key, Language_keys, and
Post_office_box attributes in the business object, and add
corresponding values to the BDC field name column.
220 Similar to line 130, processing for this screen is complete. However,
rather than simply simulating the Enter key, enter the command
value UPDA to save the transaction. This takes you to the next
transaction screen.
230 At this point, you are at the third transaction screen, so flag it in
the Start column. Because your business object does not require
data from this screen, you will complete processing for this screen
in the next line.
240 Similar to line 130, processing for this screen is complete. Enter the
command value /00 to simulate pressing the Enter key. This takes
you to the final transaction screen.
250 At this point, you are at the final transaction screen. Flag it in the
Start column.
260 Similar to lines 150-210. Use the value from the business object
attribute,
Transport_zone_to_which_or_from_which_the_goods_are_delivered, and
add its corresponding value (KNA1-LZONE) to the BDC field name
column.
270 Similar to line 220, processing for this screen is complete and the
transaction is complete, so enter the command value to save, UPDA.
This is the last action the Call Transaction API receives.
280 The final entry for any business object is always the specification of
the transaction code. The keyword TCODE goes in the Program
column and the transaction code goes in the BDC field name
column.
Chapter 22. Developing business objects for the ABAP Extension Module 239
This completes the definition of the BDC Session for the SAP4_CustomerMaster
business object.
If a call transaction returns an error message when it fails, you could have one of
the common errors described below.
v The SAP application has called a screen that the BDC did not expect, so the SAP
application returns the message, No input available for program XX and
screen YY. If this occurs, add the appropriate entries to the Dynamic Transaction
table to handle the input screen for program XX and screen YY.
v The SAP application is instructed by the BDC to set a field that does not exist.
Most likely, the SAP application executed its own instruction that you did not
explicitly set. As a result, you are on a different screen than you intended. If this
occurs, repeat the instruction and add only the piece that sends you to the
appropriate screen.
Important: You must log on to the SAP system in English when using IBM
WebSphere BI Station to generate business object definitions or
ABAP handlers. The WebSphere BI Station log is available only in
English.
2. On the Development tab, click the Inbound Wizard Button.
3. Enter the following information:
v Business Object Name—Name of the business object type as well as the
name of every instance of the object. If you are creating a new business
object, then enter a new name. It is recommended that you use a simple
name that defines the business object. If you are using an existing business
object, then select it from the drop-down list.
v Verb—Verb supported by the business object.
v Transaction Code—Transaction code for the screen that supports the
necessary functionality performed by the business object. To get the
transaction code for a screen, Click Status from the System menu. The code is
listed in the Transaction field under SAP data.
4. Click Record.
5. Step through the transaction that supports your business object functionality.
Use all necessary fields and screens. When you are finished, save your
transaction.
6. Choose the components that you want to include as metadata in your business
object. Place your cursor on the component, and then click the Select/Deselect
sub-tree button (F9). By default, all components are selected.
7. Generate a new dynamic object or source code.
240 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v To generate and insert the metadata for the Dynamic Transaction table, click
the Generate Meta data button (F6). You can generate a WebSphere business
object definition from this data.
v To generate a text file with BDC data and field descriptions, click the
Generate Code in Text File button (F5). You cannot generate a WebSphere
business object definition from this data.
IDoc handler consists of two function modules. Other ABAP handlers such as
Dynamic Retrieve and Dynamic Transaction consist of only a single function
module.
IDoc handler:
/CWLD/IDOC_HANDLER
IDoc handler:
Object-Specific
function module
To use the adapter-provided IDoc handler, you must have an IDoc defined in the
SAP application. Either SAP-delivered or customer-built IDocs can be used.
Because an IDoc definition must mirror the definition of the WebSphere business
object for SAP, the adapter provides SAPODA to generate the WebSphere business
object definition based on an IDoc.
Chapter 22. Developing business objects for the ABAP Extension Module 241
Using SAPODA to generate a business object definition
You can use SAPODA to generate business object definitions for the ABAP
Extension Module based upon an IDoc:
v Extracted as a file
v Defined in the SAP System
Important: You must log on to the SAP system in English to use SAPODA.
When you use SAPODA to generate a business object definition, you can use
Business Object Designer to view and modify the definition. For more information
on using SAPODA, see Chapter 5, “Generating business object definitions using
SAPODA,” on page 43.
After defining the IDoc, create a function module for each verb the business object
must support. Each function should have the following interface to ensure that
/CWLD/IDOC_HANDLER can call it:
*" IMPORTING
*" VALUE(OBJECT_KEY_IN) LIKE /CWLD/LOG_HEADER-OBJ_KEY OPTIONAL
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR- NPUTMETHD OPTIONAL
*" VALUE(LOG_NUMBER) LIKE /CWLD/LOG_HEADER-LOG_NR OPTIONAL
*" EXPORTING
*" VALUE(OBJECT_KEY_OUT) LIKE /CWLD/LOG_HEADER-OBJ_KEY
*" VALUE(RETURN_CODE) LIKE /CWLD/RFCRC_STRU-RFCRC
*" VALUE(RETURN_TEXT) LIKE /CWLD/LOG_HEADER-OBJ_KEY
*" TABLES
*" IDOC_DATA STRUCTURE EDID4
242 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
The following sample code supports SAP Sales Quote Create:
*- Initialize working variables and internal tables
PERFORM INITIALIZE_IN.
RETURN_CODE = 2.
RETURN_TEXT = TEXT-E01.
EXIT.
ENDIF.
*- Call Transaction
PERFORM LOG_UPDATE(/CWLD/SAPLLOG) USING C_INFORMATION_LOG TEXT-I02
’VA21’ C_BLANK C_BLANK.
ENDFUNCTION.
case idoc_data-segnam.
when ’ZSQVBAK’. " Header Data
move idoc_data-sdata to zsqvbak.
Chapter 22. Developing business objects for the ABAP Extension Module 243
when ’ZSQVBP0’. " Partner Header Level
move idoc_data-sdata to zsqvbp0.
endcase.
endloop.
To pass business object data into SAP, you can generate some of the ABAP code by
using the Inbound Wizard in IBM WebSphere BI Station (transaction
/n/CWLD/HOME), using the SAP BDC recorder, or developing it manually.
The Inbound Wizard records the activity for your create transaction and creates a
text file with the BDC logic. For the Sales Quote example, transaction VA21 is
recorded.
Important: You must log on to the SAP system in English when using IBM
WebSphere BI Station to generate business object definitions or
ABAP handlers. The WebSphere BI Station log is available only in
English.
2. On the Development tab, click the Inbound Wizard button.
3. Enter the following information:
v Business object name—Name of the business object type as well as the name
of every instance of the object. If you are creating a new business object, then
enter a new name. It is recommended that you use a simple name that
defines the business object. If you are using an existing business object, then
select it from the drop-down list.
v Verb—Verb supported by the business object.
244 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Transaction code—Transaction code for the screen that supports the
necessary functionality performed by the business object. To get the
transaction code for a screen, Click Status from the System menu. The code is
listed in the Transaction field under SAP data.
4. Click Record.
5. Step through the transaction that supports your business object functionality.
Use all necessary fields and screens. When you are finished, save your
transaction.
6. Choose the components that you want to include as metadata in your business
object. Place your cursor on the component, and then click the Select/Deselect
sub-tree button (F9). By default, all components are selected.
7. Generate a new dynamic object or source code.
v To generate and insert the metadata for the Dynamic Transaction table, click
the Generate Meta data button (F6). You can generate a WebSphere business
object definition from this data.
v To generate a text file with BDC data and field descriptions, click the
Generate Code in Text File button (F5). You cannot generate a WebSphere
business object definition from this data.
The following sample code is an excerpt from the first few lines of the generated
BDC session:
* Sales doc. Initial screen Create
perform dynpro_new using ’SAPMV45A’ ’0101’ .
* Distribution channel
perform dynpro_set using ’VBAK-VTWEG’ ’sourcefield’ .
* Division
perform dynpro_set using ’VBAK-SPART’ ’sourcefield’ .
* Function Command
perform dynpro_set using ’BDC_OKCODE’ ’=ENT2’ .
* Sold-to party
perform dynpro_set using ’KUAGV-KUNNR’ ’238’ .
* Ship-to party
perform dynpro_set using ’KUWEV-KUNNR’ ’238’ .
* Function Command
perform dynpro_set using ’BDC_OKCODE’ ’=KKAU’ .
You can also use SAP’s BDC recorder (transaction SHDB). The following sample
code was generated using the BDC recorder:
start-of-selection.
Chapter 22. Developing business objects for the ABAP Extension Module 245
perform bdc_dynpro using ’SAPMV45A’ ’0101’.
perform bdc_field using ’BDC_CURSOR’
’VBAK-AUART’.
perform bdc_field using ’BDC_OKCODE’
’=ENT2’.
perform bdc_dynpro using ’SAPMV45A’ ’4001’.
perform bdc_field using ’BDC_OKCODE’
’=KKAU’.
perform bdc_field using ’BDC_CURSOR’
’KUWEV-KUNNR’.
perform bdc_field using ’KUAGV-KUNNR’
record-KUNNR_001.
perform bdc_field using ’KUWEV-KUNNR’
The output from this method does not have the business object comments from the
first method and is less preferable. The advantage using SAP’s BDC recorder is
that it produces an independent method to verify your recording of BDC.
Another method is to generate the BDC manually. This is not an advised approach
for the entire create functionality but rather as a supplement to the previous
methods. It is useful when you need to add logic for additional screens or pop up
boxes that may occur if the input data causes the SAP transaction to produce them.
Note: In cases where the key is composed of multiple fields, the event detection
mechanism (or, when the WebSphere InterChange Server is the integration
broker, the map) concatenates the values of these fields into the first key
attribute of the top-level business object. /CWLD/IDOC_HANDLER takes this
concatenated key and loads it into its OBJECT_KEY_IN parameter. The
object-specific IDoc handler must parse the value of the OBJECT_KEY_IN
parameter into the multiple key fields. To maintain this functionality, it is
important that you do not specify name-value pairs for the key when using
/CWLD/IDOC_HANDLER.
The code fragment below illustrates an object-specific IDoc handler for retrieval of
a Sales Quote. The Sales Quote business object retrieves data from tables VBAK,
VBUK, VBPO, VBAP, VBUP, VBKD, KNOV, and VBPA. The tables follow the hierarchy and
cardinality of IDoc type ZSLSQUOT. The code does the following:
1. Initializes global data.
2. Returns business object data from the SAP application database.
3. Builds an IDoc from the returned data and returns that data to
/CWLD/IDOC_HANDLER.
The code fragment for an object-specific IDoc handler for IDoc type ZSLSQUOT is:
*- Clear the interface structures.
clear: g_text, object_key_out, return_code, return_text, idoc_data.
refresh: idoc_data.
246 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
* If no key value is specified, log it as an error and exit.
if object_key_in is initial or
object_key_in = c_cxignore_const.
perform log_update(/cwld/sapllog) using c_error_log text-e02
space space space.
return_code = 1.
return_text = text-e02.
exit.
endif.
perform initialize_global_structures.
perform fill_internal_tables.
if not return_code is initial.
exit.
endif.
return_code = 0.
return_text = text-s01.
The two most important parameters are OBJECT_KEY_IN for the inbound key and
IDOC_DATA for the outbound data. Note that OBJECT_KEY_IN may be a concatenated
string that represents a multiple key (depending on the conventions you have
defined). The object-specific IDoc handler parses the concatenated value and loads
its parts into the appropriate key fields. To maintain this functionality, it is
important that you do not specify name-value pairs for the key when using
/CWLD/IDOC_HANDLER.
The VBAK table drives the selection criteria for the child tables, so each table is
loaded into working tables. Using the VBAK table, you can retrieve the child tables
with additional keys. So, for the Sales Quote example, the code is as follows:
form fill_internal_tables.
if sy-subrc <> 0.
perform log_update(/cwld/sapllog) using c_error_log text-e01
object_key_out c_blank c_blank.
return_code = ’1’.
g_text = text-e01.
replace ’&’ with order_number into g_text.
return_text = g_text.
exit.
endif.
Chapter 22. Developing business objects for the ABAP Extension Module 247
The following code is used to copy the requested data from the application
database into internal tables and working variables. Then it creates segments that
directly correspond to the WebSphere business object definition and puts them into
the SAP segment structure.
In some cases for close matches on fields between the IDoc type and the working
structure, you can do an ABAP move-corresponding command. In other cases, it is
preferable to manually move fields from the working table to the IDoc type table
because of the relatively few fields to move in comparison to the overall number of
fields in the structure. Simply, it is used to transfer data from the working data
structures into the IDoc structures and then into the flat data field.
clear idoc_data.
clear zsqvbak.
idoc_data-segnam = ’ZSQVBAK’.
clear idoc_data.
clear zsqvbuk.
idoc_data-segnam = ’ZSQVBUK’.
*-- fill the Sales Quote Line and the Line Child segments
form fill_zsqvbap.
loop at t_vbap.
clear idoc_data.
clear zsqvbap.
idoc_data-segnam = ’ZSQVBAP’.
perform fill_zsqvba2.
perform fill_zsqvbup.
perform fill_zsqvbkd.
perform fill_zsqkonv.
perform fill_zsqvbpa.
248 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
endloop.
endform.
Note: You must uses a comma delimiter between the connector module
(classname) and ABAP handler.
For more information on business object processing for the ABAP Extension
Module, see “Business object processing” on page 197.
Chapter 22. Developing business objects for the ABAP Extension Module 249
250 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 23. Developing event detection for the ABAP
Extension Module
Event detection is part of the event triggering process in the ABAP component of
the ABAP Extension Module. Every event detection mechanism must call an event
trigger, which takes the detected event and adds it to an event table. For more
information on triggering events, see “Event triggering” on page 204.
At this point, you should have an idea of the event detection mechanisms that you
need to consider. Use Table 49 as a general guideline in determining which
mechanism can be used for each business process you need to support.
Table 49. Event detection mechanism decision table
Code Business
enhancement Batch program workflow Change pointer
Availability High High Low Low
Real-time integration Yes No Yes Yes
Reliability High High Low Medium
Flexibility High Medium Low Medium
Upgrade dependency Low Low Medium Medium
Difficulty Medium Low Medium High
Future Events Yes Yes No No
252 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Using code enhancement is the recommended approach for event detection
because it is reliable, highly flexible, synchronous, and has high availability. In
contrast, business workflow and change pointer mechanisms are not generally
available for all business processes. Batch program is typically used when real-time
integration is not desired.
Each event detection mechanism has advantages and disadvantages for detecting
an event in a business process. The following sections give more detail about each
of the event detection mechanisms, including the main advantages and
disadvantages of each.
All of the event detection mechanisms support real-time triggering and retrieval of
events. However, only code enhancement and batch program provides the
additional functionality of delayed retrieval. An event specified to be retrieved at a
later date is called a future event.
Code enhancement
Code enhancement is implemented at specific points in the code of an SAP
transaction. By making use of user exits, you can insert event detection code at the
most logical point in a transaction. The event detection code allows for evaluation
of criteria to determine whether an event is generated.
The general strategy of this mechanism is to insert your event detection code when
the data for a transaction is about to be committed to the database.
Advantages
v Has access to SAP transactional information for the event detection process
v Allows the insertion of event detection code at an appropriate point of a
transaction
v Provides synchronous event detection
v Limits the reliance on SAP functionality, so maintenance and enhancements are
easier
v Supports future events
Disadvantages
v User exits may not always be in the appropriate location in the transaction
v SAP modification features may be necessary
Batch program
Batch program is useful when a large number of events of the same type (such as
customer orders) need to be triggered, or a business process requires a large
amount of processing time. This mechanism does not require any modifications to
SAP-delivered code; however, you need to use (write) an ABAP program that
evaluates criteria for detecting events.
Advantages
v Can be implemented for most business processes
v Accurately detects events
v Is easy to implement
v Can be scheduled to run at a specific time if runtime resources are an issue
v Supports future events
Chapter 23. Developing event detection for the ABAP Extension Module 253
Disadvantages
v It does not provide synchronous event detection
v SAP transactional information is not available
v State (Create, Update, or Delete) or status changes cannot be detected or may
not be easily detected
v If a background job is created to automate a batch program, an additional task
needs to be maintained and monitored
Business workflow
Business workflow is a cross-application tool within the SAP application that
enables you to integrate business tasks between applications. This tool
supplements the existing business functions of the SAP application. The standard
functions of SAP can be adapted using business workflow to meet the specific
requirements of the desired business function. business workflow uses the Business
Object Repository (BOR), which stores the definitions for each SAP object in the
application.
Advantages
v Provides synchronous event detection
v Makes use of SAP’s object-oriented business object capability to link the
detection of events to ABAP function modules
v Is easy to implement
Disadvantages
v An SAP object does not exist in the SAP BOR for every business process
v The SAP event (such as Created or Deleted) may not exist for the SAP object
v It may not detect all changes in a business process
v It does not always provide the flexibility for detecting events at the proper time
v It depends on SAP-provided functionality, which may change between versions
of SAP
Change pointer
Change pointer is a related feature of business workflow that uses change
documents to detect events. Change documents are created for some business
processes so that all changes for that business process are captured.
Advantages
v Provides synchronous event detection
v Needs only one SAP modification for an adapter function module to handle all
business processes
v Generally available for the Logistics module
v Has access to SAP change pointer information for the event detection process
v If change documents are already used for a business process, it needs only a
minimal amount of work to detect an event
Disadvantages
v It is somewhat flexible, but the event detection placement cannot be changed
since it is done by SAP
v It requires a solid understanding of change documents and the business
workflow environment
254 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v You must do an SAP modification to turn on the change document flag for an
SAP data element
v Change pointer information in SAP may not be sufficient for the event detection
process
The following sections describe the implementation process for the four event
detection mechanisms implemented by the connector. Whenever applicable, an
example is provided along with sample code.
Code enhancement
Code enhancement requires encapsulating a portion of ABAP code in a custom
function module. The event detection code is written as a function module to
ensure that the processing remains separate from the transaction. Any tables or
variables used from the transaction need to be passed to the function module by
value and not by reference.
To minimize the effects of locking a business object when retrieving an event, the
function module typically executes in an update-task mode. To avoid
inconsistencies, do not use update task if the function module is already being
called within a process that is in an update -task mode.
To minimize the impact in the transaction, place the function module within
another include program. Using an include program allows you to make changes
to custom code rather than to SAP code.
The event detection code contains logic that identifies the object for the event. For
example, the sales order transaction handles many types of orders, but only one
order type is required. This logic is in the event detection code. The general
strategy for placing this event detection code is to insert it just before the data is
committed to the database. The function module containing the event detection
code is typically created as a part of the function group for the business object.
Chapter 23. Developing event detection for the ABAP Extension Module 255
v Check that an SAP-provided user exit in the transaction has all of the
information needed to detect an event. For example, a user exit may not be able
to implement a Delete verb because the business object is removed from the
database prior to that point.
v If a user exit cannot be used, determine the appropriate location for the event
detection code, and then add the event detection code using an SAP
modification. Select a location that has access to the business object key and
other variables used to make the decision.
If you are implementing the future events capability, in addition to adding the
event detection code for future events, contact your Basis administrator to
schedule the adapter-delivered batch program /CWLD/SUBMIT_IN_FUTURE to run
once every day.
v Research a business process by looking for a “commit work statement” in the
code executed by the transaction for the business process. You can use the ABAP
debugger to investigate the value of different attributes at that point.
v Determine the criteria for detecting an event.
v Create the function module containing the event detection code.
v Create the include program and then add it to the transaction’s code. Test all of
the scenarios designed to detect an event.
The following steps describe the process of creating an example SAP sales quote
using the code enhancement event detection mechanism. The code that follows it is
a result of this process.
1. Upon investigation of the SAP sales quote transaction, transaction VA21 is
found to support the desired sales quote creation business process.
2. The sales quote number is determined to be the unique key. The Sales quote
number is stored in table/field VBAK-VBELN.
Note: Because this event uses a single unique key, the code example uses the
OBJKEY parameter to pass the key’s value. For an example of coding an
event that uses a composite key, see “Coding composite keys as
name-value pairs” on page 257.
3. Transaction VA21 has a user exit in the transaction flow as part of the
document save process (Form Userexit_save_document). At this point in the
transaction, the quote number is available when the user exit is executed.
4. The user exit belongs to other business processes, so additional coding is
needed to differentiate a sales quote from other categories of documents.
VBAK-VBTYP is available to determine the document category. A sales quote is
saved in the SAP database with a document category of B.
5. An include statement is added to the user exit that points to the include
program.
6. At this time, the include program and a function module need to be created.
256 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
OBJKEY = TMP_OBJKEY
EVENT = TMP_EVENT
GENERIC_RECTYPE = ’’
IMPORTING
RECTYPE = TMP_RECTYPE
TABLES
EVENT_CONTAINER = TMP_EVENT_CONTAINER
EXCEPTIONS
OTHERS = 1.
Endif.
DATE_IN_FUTURE = VBAK-VDATU.
If VBAK-VBTYP = ‘B’.
C_OBJ_ORDER = ‘SAP4_SalesQuote’.
TMP_OBJKEY = XVBAK-VBELN.
TMP_EVENT = ‘Create’.
Endif.
If you specify more than one name-value pair, the connector sets the value of
multiple attributes in the business object it creates to retrieve the full object from
the application. If you specify a single name-value pair, the connector sets the
value of the specified attribute rather than the first attribute that is marked IsKey.
Because IDoc handlers do not use name-value pairs, it is important that you not
specify name-value pairs when using /CWLD/IDOC_HANDLER. For more information,
see “IDoc handlers and the retrieve verbs” on page 246.
The following steps describe the process of creating an example SAP sales quote
that uses three fields in its composite key. The code that follows it is a result of this
process.
1. Create a local name_value_pairs internal table based on the structure
(/CWLD/NAME_VALUE_PAIRS) delivered with the adapter. This structure has two
columns: ATTR_NAME and ATTR_VALUE.
Chapter 23. Developing event detection for the ABAP Extension Module 257
2. Before calling the function module /CWLD/ADD_TO_QUEUE or
/CWLD/ADD_TO_QUEUE_IN_FUTURE, write code that adds the names of the key
attributes and their values to your internal table.
3. Change the function module /CWLD/ADD_TO_QUEUE or
/CWLD/ADD_TO_QUEUE_IN_FUTURE:
v Because you will not be using the OBJKEY parameter to pass the key’s value,
comment out the line for this parameter.
v Because you will be using the NAME_VALUE_PAIRS table to pass the composite
key’s value, add a line for this table.
4. The triggering function automatically formats each event key. The format uses
the following syntax:
attribute1=value1|Cx|attribute2=value2|Cx|[attributeN=valueN|Cx|]
where:
attribute The name of the key attribute (not case-sensitive)
value The value of the key attribute (case-sensitive)
|Cx| Terminator for each name-value pair (used even if only one
name-value pair is specified)
The order in which you specify name-value pairs in your code need not match the
order of the attributes in the business object. However, the event fails if you
specify an attribute that does not exist in the business object.
The following code fragment specifies, at the time of triggering, the customer
number, sales organization, and distribution channel in table KNVV as name-value
pairs. Two lines are highlighted in the code for the function module
/CWLD/ADD_TO_QUEUE:
v The line that passes a value to the OBJKEY parameter (commented out)
v The line that specifies the NAME_VALUE_PAIRS table
DATA: name_value_pairs LIKE /cwld/name_value_pairs OCCURS 5 with header line.
258 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
EXCEPTIONS
OTHERS = 1.
Endif.
Batch program
To implement batch program as an event detection mechanism, you must write an
ABAP program that evaluates database information. If the criteria in the ABAP
program is fulfilled when the program executes, then an event is triggered.
The following steps describe the process of creating a batch program that detects
events for all sales quotes created on today’s date. The code that follows it is a
result of this process.
1. Create is determined to be the supported verb.
2. The quote number is determined to be the unique key used to retrieve the
events.
3. The creation date (VBAK-ERDAT) and the document category (VBAK-VBTYP) need to
be checked.
The following sample code supports the SAP sales quote as a batch program:
REPORT ZSALESORDERBATCH.
tables: vbak.
tmp_key = vbak-vbeln.
Chapter 23. Developing event detection for the ABAP Extension Module 259
CALL FUNCTION ’/CWLD/ADD_TO_QUEUE’
EXPORTING
OBJ_NAME = ’SAP4_SalesQuote’
OBJKEY = tmp_key
EVENT = ’Create’
GENERIC_RECTYPE = ’’
IMPORTING
RECTYPE = r_rectype
TABLES
EVENT_CONTAINER = tmp_event_container.
write: / vbak-vbeln.
endselect.
Business workflow
Business workflow is a set or sequence of logically related business operations. The
processing logic within a workflow detects events. The business workflow event
detection mechanism relies on the SAP Business Object Repository (BOR), which
contains the directory of objects along with their related attributes, methods, and
events.
The following example of SAP sales quote can be used to implement an event
trigger using business workflow:
1. Search the BOR for the appropriate sales quote business object. A search can be
done using the short description field and the string ’*quot*’. BUS2031
(Customer Quotes) is one of the business objects returned.
2. Upon further investigation of BUS2031, it is determined that the key field is
CustomerQuotation.SalesDocument (VBAK-VBELN).
3. A subtype for BUS2031 is created using the following entries:
Object type—ZMYQUOTE
Event—SAP4_SalesQuote
Name—SAP4 Sales Quote
Description—Example of an SAP 4 Sales Quote Subtype
Program—ZMYSALESQUOTE
Application—V
4. The event detection mechanism is activated by adding an entry to the Event
Linkage table (transaction SWE3). The create event is activated using the
following entries:
Object type—ZMYQUOTE
Event—SAP4_SalesQuote
Receiver FM—/CWLD/ADD_TO_QUEUE_DUMMY
Receiver type FM—/CWLD/ADD_TO_QUEUE_WF
260 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Note: The Receiver and Receiver type function modules (FM) point to
/CWLD/ADD_TO_QUEUE. The DUMMY function module is used only because
sometimes the SAP application requires that both fields be populated. The
WF function module translates the SAP standard interface to the one used by
/CWLD/ADD_TO_QUEUE.
The business workflow event detection mechanism is created and active. It is set
up to detect all SAP Customer Quotes that are created.
Change pointer
Change pointer uses change documents and is one of the more challenging event
detection mechanisms to implement. SAP’s Business Object Repository (BOR) is
used as well as Application Link Enabled (ALE) technology. A change document
always refers to a business document object having at least one database table
assigned to it. If the data element in a table is marked as requiring a change
document and the table is assigned to a business document object, then a change
in value of the field defined by the data element generates a change document.
The changes are captured in tables CDHDR and CDPOS and are used for event
detection.
The following example of an SAP sales quote can be used to implement an event
trigger using change pointer:
1. Update is determined to be the supported verb. Investigating the sales quote
create transaction shows that the Create verb is not detected through this
mechanism.
2. When performing the checks of the business for sales quote:
Chapter 23. Developing event detection for the ABAP Extension Module 261
v The Change function is available from the Environment menu in transaction
VA22.
v Making a change to a sales quote results in a new entry in table CDHDR.
v Looking at table VBAP, the field ZMENG has the Change Document flag set.
3. No evaluation of data elements was done for this example.
4. The sales quote number is determined to be the unique key in CDHDR-OBJECTID.
5. CDHDR-OBJECTCLAS has a value of VERKBELEG, which is the main differentiator.
Only sales quotes should be picked up. The code checks the TCODE field in the
header table, but a proper lookup should be done in the VBAK table.
262 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 24. Managing the ABAP Extension Module
The IBM WebSphere BI Station tool (transaction /n/CWLD/HOME) enables you to
maintain the adapter for mySAP.com for event processing. You can also use this
tool to maintain the connection to the SAP application. You can view the connector
log file and the SAP Gateway Service connections. Also, you can reprocess
archived objects from the connector log, view events waiting to be processed,
schedule specific events to be processed at a later time, and resubmit and delete
events from the archive table.
Log entries display the date, time, and event. Entries are color-coded:
red—indicates an error
If the amount of data displayed is more than you currently need, narrow the
information displayed. For example, you can view business objects by user, name,
date, or log entry number.
1. Click the Filter Data button.
2. Populate the appropriate fields to filter the log file.
3. Click Filter.
In the Configuration tab, you can set user settings for the number of log entries to
display at one time and the default logging display level.
Dynamic Transaction and IDoc objects use call transactions; therefore you can view
the screen processing for these objects. You have the option of viewing:
v All screens
v Only the screens with errors
v None of the screens
264 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Configuring an object to be archived
By default, ABAP Extension Module business objects that have no archive option
(A, X, or N) specified in their verb’s application-specific information are archived in
case of failures. In other words, when processing yields return codes other than 0
or 21, the business objects are archived in the /cwld/obj_arc_h and
/cwld/obj_arc_i tables.
Important: Because these archive tables grow, they must have their contents
deleted or archived periodically to prevent impacting overall database
performance.
Altering the archiving behavior is accomplished at the business object’s verb level;
that is, for each business object, the archiving activity can vary by verb. To specify
how an object is archived, use the following syntax in the verb’s
application-specific information:
AppSpecificInfo = connectormodule.class, ArchiveParameter: ABAPhandler
where ArchiveParameter:
A Archives the object when it first enters the SAP application.
N Suppresses object archiving. Even in the case of failure, the object is not
archived.
X Archives the object immediately. The log is updated with a warning
message stating that processing ended. A success code is returned to the
connector, so that the requesting integration broker processes successfully.
You can specify more than one parameter at a time. The A and X archive
parameters add an entry in the log table with a link to the reprocessing tool in
IBM WebSphere BI Station. The status of the archived object is entered in the line
below the entry for the archived business object.
The following example archives a Dynamic Transaction object and adds a entry in
the log table.
AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler,
A:/CWLD/DYNAMIC_RETRIEVE
The following example archives an IDoc object, SAP4_Order Create, when it enters
the SAP application, and then stops the processing of the object.
AppSpecificInfo = sap.sapextensionmodule.VSapBOHandler,
X:/CWLD/ORDER:ORDER_C1
Note: In your production environments, use only the N parameter for business
objects and all their verbs. When WebSphere InterChange Server is the
integration broker, you should only use System Manager to reprocess and
resubmit business objects; you should not use the IBM WebSphere BI Station
reprocessing tools in your SAP application. When a WebSphere MQ message
broker is the integration broker, events that fail in the Connector Framework
are moved to the FaultQueue, where they should be handled by the MQ
message flow.
To manually access the Reprocessing Tool in IBM WebSphere BI Station, from the
Tools tab click Reprocess Object. Enter the appropriate values in the fields
provided.
266 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
To truncate the log manually:
1. Go to IBM WebSphere BI Station (transaction /n/CWLD/HOME).
2. Click the Maintenance tab.
3. In the Online section, click Delete Log.
4. Populate the applicable fields.
5. Click the Execute button (F8).
To schedule the automatic truncation of the event log, set up the truncation
options, and contact your Basis administrator to schedule report /CWLD/DELETE_LOG.
To limit the number of event entries that are displayed, populate the applicable
fields in the Current Event Selection section. For example, to limit the displayed
entries for a particular business object, enter a business object name in the Object
Name field. If you do not know the exact syntax for the business object name, click
the Object Name field, click the arrow button (F4), and then select the appropriate
business object name.
To see more information about an event, double-click an event field. Under normal
conditions, events are picked up every few seconds. If an event is displayed, it has
not been processed by the connector. This may indicate that the connector is not
running.
The following is a list of the possible event status values for the event queue:
P — Prequeued When an event is triggered, the status is initially set to prequeue (P),
since it has not yet been determined whether the business object is
locked.
L — Locked When a user creates or updates a business object in SAP, a lock is
placed against that business object. Once the business object has been
committed to the database, SAP removes the lock. If an event is
triggered while a business object is locked, the event remains in the
event queue with status locked (L) until the lock has been removed.
Q — Queued When the business object is no longer locked, the status changes to
queued (Q), and the event is ready to be picked up by the connector.
The event remains in this status until a confirmation of a retrieval is
received.
R — Retrieved When the business object is retrieved it is marked with an R in the
event queue. The event remains in the queue until the event has been
processed.
To limit the number of archive entries that are displayed, populate the applicable
fields in the Archived Event Selection section. For example, to limit the displayed
entries for a particular business object, enter a business object name in the Object
268 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Name field. If you do not know the exact syntax for the business object name, click
the Object Name field, click the arrow button, and then select the appropriate
business object name.
To see more information about an event, double-click an event field. The following
is a list of the possible event status values for the archive table:
0 — Success The connector successfully processed the event and sent the
business object to the integration broker.
1 — Error in SAP The connector encountered an error while retrieving the
business object within SAP for this event.
2— Not Subscribed No integration broker was subscribed to the combination of the
business object and verb for this event.
3— Error in Java The connector encountered an error during one of the following:
v Receiving the business object from SAP
v Converting the SAP business object to a WebSphere business
object for SAP
v Inserting the business object into the message queue
4 — Max requeued The event was requeued more than the maximum times
specified by the requeued constant, c_maximum_requeue (usually
100). An event is requeued if its business object is locked.
5 — Multiple Event Some business objects have single events in the event table that
cause multiple events to be created at the time of retrieval. The
original single event does not create a business object and is
therefore archived using this event status.
6— Event Deleted A user manually deleted the event from the event table.
A status message displays. You can display the connector log to view the event
and its new status.
270 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Chapter 25. Upgrading the ABAP Extension Module
This chapter describes the upgrade process for the ABAP Extension Module. It
assumes that you are not modifying the repository definitions for the connector or
any objects unless explicitly stated to do so. This chapter focuses on the ABAP
components of the connector.
When upgrading, you must have the latest ABAP Extension Module components
for your version of SAP. The goal of the upgrade process is to get your ABAP
handler development to work with the latest ABAP Extension Module components.
Upgrading the ABAP Extension Module can be described in two distinct scenarios:
v Upgrading an SAP system that contains adapter-provided ABAP handlers
For example, you may be running an SAP version 4.0 system that you want to
upgrade to SAP version 4.6. After you upgrade the SAP system, you must
upgrade the adapter environment. For details on upgrading the adapter
environment in a new version of SAP, see “Upgrading within a new version of
SAP R/3.”
v Implementing an adapter-provided ABAP handler for an object that supports an
older version of SAP
For example, you may be using the connector that supports the SAP version 4.6
application and want to use the Material object that supports SAP version 4.0 or
4.5. To use this Material object, you need to upgrade it to your SAP version 4.6
system. For details on how to upgrade an object to a newer version of SAP, see
“Upgrading ABAP handlers” on page 272.
This section details the processes of the first step, such as packaging the business
object’s ABAP handler and providing guidelines for possible compilation conflict
points. The second step is not addressed in this section. See Chapter 22,
“Developing business objects for the ABAP Extension Module,” on page 231 for
more information on extending the functionality of your objects.
Essentially the upgrade procedure is the same. The only difference is that
upgrading a previously implemented business object requires you to package the
business object into a transport file as the second step.
Note: If you have business objects in SAP R/3 version 4.6 that do not take
advantage of the IBM product namespace, you need to upgrade those
business objects to the namespace.
272 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
To upgrade an adapter-provided ABAP handler from one SAP R/3 version to
another:
1. Verify that the latest version of the ABAP Extension Module transport files for
your version of SAP R/3 are installed.
2. Package existing business objects into transport files. Note that if you are
upgrading a business object that has not been modified for your
implementation, skip to step 3, because you should be able to use the original
transport that was loaded.
Use the adapter-delivered transport files as templates for what should be
included for each business object. This may include function groups, IDoc
definitions, and Dynamic Retrieve and Dynamic Transaction data.
v Include any additional programs and custom work.
Custom work done in the ABAP component of the connector needs to be
manually applied to the new SAP R/3 ABAP component of the connector.
For example, you need to manually apply any changes to adapter-delivered
ABAP handlers such as IDoc Handler or Dynamic Transaction.
v Check to see if changes were made to program
/CWLD/TRIGGERING_RESTRICTIONS. This program is intended for customer
modification.
If changes were made, you can avoid conflicts by downloading the custom
work as text files, not as transport files, for use as a reference.
v Release the transports and note the transport numbers. The Basis
administrator needs this information to load the objects in the new SAP R/3
system.
3. For IDocs in an SAP R/3 version 3.x system only, capture the structure and
segment definitions of the IDocs and then manually re-create them in the new
system.
If you do not have an SAP R/3 version 3.x environment and IDocs, then skip
this step.
4. Install the business object transport files. You should have your local Basis
administrator install the transports for the business objects you packaged in
step 1.
The Basis administrator should use all of the override codes available for the
transport. This forces the business objects into the environment even if there are
compilation errors. Before importing the business objects, the Basis
administrator should know that you may encounter inconsistencies during the
import process.
v If you packaged existing business objects in step 2, then install these
transport files.
v If you are using non-implemented business objects, then simply install the
latest transport file for the business object that you want to use. You must
install the correct version-specific transport files.
5. Compile all programs and resolve syntax errors associated with the ABAP
development.
The easiest way to find syntax errors is to generate each function group
associated with each business object and fix the errors one at time. Repeat this
process until all function groups compile successfully. Be sure to generate any
other programs, such as triggering programs, that are not associated with a
function group. Be aware that minor updates may need to be made to your
ABAP triggering programs after applying the required new transports to
upgrade the adapter.
Upgrade considerations
The following sections provide reference information for the upgrade scenarios.
This reference information is provided to help with the upgrade process for the
connector for SAP R/3 version 4.6 and IDocs.
Table 50 on page 275 shows the changes for the /CWLD/ namespace naming
convention. The parameter lists do not require changes.
274 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 50. Namespace object name changes
Old name New name
Interface parameters of the function modules
YXR_EVENT-OBJ_KEY /CWLD/LOG_HEADER-OBJ_KEY (in three places)
YXR_LOG_H-LOG_NR /CWLD/LOG_HEADER-LOG_NR
YXR_RFCRC-YXR_RFCRC /CWLD/RFCRC_STRU-RFCRC
Changes normally in the TOP include of the business object function group
YXR_CNST /CWLD/CONSTANTS
YXRIFRM0 /CWLD/INBIDOC_FRMS0
Data elements
YXR_VERB /CWLD/OBJ_VERB
Table structures
YXR_CONFIG /CWLD/CONF_VAL
YXR_EVENTS /CWLD/EVT_CUR
YXR_LOG_I /CWLD/LOG_ITEM
YXR_RFC_S /CWLD/OBJ_STRU
Program referenced in the LOG_UPDATE perform statement
SAPLYXR1 /CWLD/SAPLLOG
Triggering function modules (the parameter lists do not require changes)
Y_XR_COMMIT_IDOC_RAISE_DELETE /CWLD/ COMMIT_IDOC_RAISE_DELETE
Y_XR_/ADD_TO_QUEUE /CWLD/ADD_TO_QUEUE
Give special consideration to production sites that already have events in the
existing SAP R/3 version 4.x event tables. The transfer of these events from the
existing event table to the new event table should be coordinated with IBM
technical support.
Because you cannot transport IDoc objects from SAP R/3 version 3.x, you must
manually re-create them in the new SAP R/3 system. To do this, you need to:
v Capture the IDoc structure and segment definitions
v Manually re-create the IDocs
If you have access to the old and new systems, you can simply copy and paste the
business objects between the systems. However, if both systems are not available,
To download the most useful representations of the IDocs and the segment
definitions, first download the overall structure of the IDoc, and then download
the IDoc segment definitions.
Downloading the overall IDoc structure: To download the overall IDoc structure:
1. Go to the Develop IDocs Type screen (transaction WE30).
2. Enter an IDoc object name, and then click Display (F7).
3. Expand the IDoc structure so that all segments are visible.
a. Download a text version of the structure.
b. From the System menu, click List, click Save, and then click Local File.
c. Accept the default option unconverted, and then click Enter.
The file is downloaded as a text file and can be viewed in any text editor.
d. Specify the location to download the file, and then click Transfer.
Downloading the segment definitions: You can download only one segment
definition at a time. Repeat the following steps for each segment. To download a
segment definition:
1. Go to transaction SE11 and enter the segment name.
2. From the Dictionary Object menu, click Print.
Make sure the Table Structure box is checked.
3. Deselect the Print immediately checkbox, check the new spool request check
box, and then click Continue.
4. Go to the Spool Request Selection screen (transaction SP01) to view the print
request.
5. Click Execute, select the checkbox next to the request, and then click Display
comments.
6. Convert the data to a downloadable format.
a. From the Goto menu, click List Display.
b. Download a text version of the segment. From the System menu, point to
List, point to Save, and then click Local File.
c. Accept the default option unconverted, and click Enter.
The file is downloaded as a text file and can be viewed in any text editor.
d. Specify the location to download the file, and then click Transfer.
Once you have represented the object using text files, you can import them into a
spreadsheet application to set up the object hierarchy. This facilitates the creation of
IDoc segments, because you can cut and paste the fields directly into the segment
editor in the SAP application.
276 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v Re-create the IDoc type and assign all of the segments to it.
If a data element does not exist in the new form, find a new form in the SAP R/3
version 4.x system. The data element must have the same type and length as the
original in SAP R/3 version 3.x system. The description does not affect processing
and is visible only in the log.
Attention: Do not rename the IDoc, segments, or segment fields because there is
a direct relationship between the IDoc definition and the IBM WebSphere business
object repository. In addition, the ABAP functions used to process the IDoc also
rely on these names.
Note: The quick steps presented here are intended for the adapter running
standalone with one of the WebSphere message brokers or WebSphere
Application Server as the integration broker.
As you follow these quick steps, you can create your own business objects or use
the sample business objects provided. The samples are available in the
ProductDir\connectors\SAP\samples directory, where ProductDir represents the
directory where the connector is installed.
282 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 76. Business Object Wizard—Select Agent
7. Choose Next.
8. Set Verb to Retrieve, and Server Support to No. Choose OK.
9. In Agent SAPODA Notification, choose No.
10. Open the business object in a separate window. Save the generated business
object specification to the location you specified in the Repository Directory
standard property value.
284 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Figure 78. Test Connector
4. Select Browse.
a. Locate portconnector.cfg. Choose Open.
b. For Connector Name, enter PortConnector.
c. For Broker Type, enter WMQI.
d. Choose OK.
5. Highlight PortConnector. Choose OK.
6. Choose File > Connect.
286 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
2. Copy the generated BOHandler .class file from the definition specified in the
ODA configuration properties to %CROSSWORLD%\connectors\SAP\rfc\client.
Field Example
Customer Number 0000000001
PI_SALESORG 0001
PI_DISTR_CHAN 01
PI_DIVISION 01
288 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
a. Enter the host address for the machine where Discovery is running.
b. Choose Add Host.
c. Choose OK.
5. In Step 3 of the wizard, expand IDoc Types.
a. Expand Generate From System.
b. Expand Basic IDoc Types.
c. Right-click Select by Name...
d. Select Search for Items...
e. Type orders03. Choose OK.
6. Highlight ORDERS03. Choose Next.
7. Choose Next.
8. Choose OK. The business object generates.
9. Select ″Save a copy of business object definitions to a separate file″ and select
″Open new business object definition to a separate window″. Choose Finish.
290 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Quick steps for the HDR Module
Before configuring the HDR Module, configure the following connector-specific
property:
292 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Appendix B. Common event infrastructure
WebSphere Business Integration Server Foundation includes the Common Event
Infrastructure Server Application, which is required for Common Event
Infrastructure to operate. The WebSphere Application Server Foundation can be
installed on any system (it does not have to be the same machine on which the
adapter is installed.)
Required software
In addition to the software prerequisites required for the adapter, you must have
the following installed for Common Event Infrastructure to operate:
v WebSphere Business Integration Server Foundation 5.1.1
v WebSphere Application Server Application Client 5.0.2, 5.1, or 5.1.1.
(WebSphere Application Server Application Client 5.1.1 is provided with
WebSphere Business Integration Server Foundation 5.1.1. )
http://publib.boulder.ibm.com/infocenter/ws51help
For sample XML metadata showing the adapter-generated event descriptors and
properties a consumer application should search for, refer to“Common Event
Infrastructure event catalog definitions.”
For WebSphere Business Integration adapters, the extended data elements that
need to be defined in the event catalog are the keys of the business object. Each
business object key requires an event definition. So for any given adapter, various
events such as start adapter, stop adapter, timeout adapter, and any doVerbFor
event (create, update, or delete, for example) must have a corresponding event
definition in the event catalog.
The following sections contain examples of the XML metadata for start adapter,
stop adapter, and event request or delivery.
294 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
<property name="sourceComponentId"
path="sourceComponentId"
required="true"/>
<property name="application" //Comment: The name#version of the
source application generating the event. Example is "SampleConnector#3.0.0"
path="sourceComponentId/application" required="false"/>
<property name="component" //Comment: This will be the name#version
of the source component.
path="sourceComponentId/component"
required="true"
defaultValue="ConnectorFrameWorkVersion#4.2.2"/>
<property name="componentIdType" //Comment: specifies the format
and meaning of the component
path="sourceComponentId/componentIdType"
required="true"
defaultValue="Application"/>
<property name="executionEnvironment"
//Comment: Identifies the environment the application is running
in...example is "Windows 2000#5.0"
path="sourceComponentId/executionEnvironment"
required="false" />
<property name="location" //Comment: The value of this is the
server name...example is "WQMI"
path="sourceComponentId/location"
required="true"/>
<property name="locationType" //Comment specifies the format and
meaning of the location
path="sourceComponentId/locationType"
required="true"
defaultValue="Hostname"/>
<property name="subComponent" //Comment:further distinction
of the logical component
path="sourceComponentId/subComponent"
required="true"
defaultValue="AppSide_Connector.AgentBusinessObjectManager"/>
<property name="componentType" //Comment: well-defined name
used to characterize all instances of this component
path="sourceComponentId/componentType"
required="true"
defaultValue="ADAPTER"/>
<property name="situation" //Comment: Defines the type of
situation that caused the event to be reported
path="situation"
required="true"/>
<property name="categoryName=" //Comment: Specifies the type
of situation for the event
path="situation/categoryName"
required="true"
defaultValue="StartSituation"/>
<property name="situationType" //Comment: Specifies the type
of situation and disposition of the event
path="situation/situationType"
required="true"
<property name="reasoningScope" //Comment: Specifies the scope
of the impact of the event
path="situation/situationType/reasoningScope"
required="true"
permittedValue="INTERNAL"
permittedValue="EXTERNAL"/>
<property name="successDisposition" //Comment: Specifies the
success of event
path="situation/situationType/successDisposition"
required="true"
permittedValue="SUCCESSFUL"
permittedValue="UNSUCCESSFUL" />
<property name="situationQualifier" //Comment: Specifies the
situation qualifiers for this event
296 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
XML format for ″request″ or ″delivery″ metadata
At the end of this XML format are the extended data elements. The extended data
elements for adapter request and delivery events represent data from the business
object being processed. This data includes the name of the business object, the key
(foreign or local) for the business object, and business objects that are children of
parent business objects. The children business objects are then broken down into
the same data as the parent (name, key, and any children business objects). This
data is represented in an extended data element of the event definition. This data
will change depending on which business object, which keys, and which child
business objects are being processed. The extended data in this event definition is
just an example and represents a business object named Employee with a key
EmployeeId and a child business object EmployeeAddress with a key EmployeeId.
This pattern could continue for as much data as exists for the particular business
object.
<eventDefinition name="createEmployee" //Comment: This
extension name is always the business object verb followed by the business
object name
parent="event">
<property name ="creationTime" //Comment: example value would be
"2004-05-13T17:00:16.319Z"
required="true" />
<property name="globalInstanceId" //Comment: Automatically generated
by Common Event Infrastructure
required="true"/>
<property name="localInstanceId" //Comment: Value is business
object verb+business object name+#+app name+ business object identifier
required="false"/>
<property name="sequenceNumber" //Comment: Source defined number
for messages to be sent/sorted logically
required="false"/>
<property name="version" //Comment: Version of the event...value is
set to 1.0.1
required="false"
defaultValue="1.0.1"/>
<property name="sourceComponentId"
path="sourceComponentId"
required="true"/>
<property name="application" //Comment: The name#version of the
source application generating the event...example is
"SampleConnector#3.0.0"
path="sourceComponentId/application"
required="false"/>
<property name="component" //Comment: This will be the name#version
of the source component.
path="sourceComponentId/component"
required="true"
defaultValue="ConnectorFrameWorkVersion#4.2.2"/>
<property name="componentIdType" //Comment: specifies the format
and meaning of the component
path="sourceComponentId/componentIdType"
required="true"
defaultValue="Application"/>
<property name="executionEnvironment" //Comment: Identifies the
environment#version the app is running in...example is "Windows 2000#5.0"
path="sourceComponentId/executionEnvironment"
required="false" />
<property name="instanceId" //Comment: Value is business object
verb+business object name+#+app name+ business object identifier
path="sourceComponentId/instanceId"
required="false"
<property name="location" //Comment: The value of this is the
server name...example is "WQMI"
path="sourceComponentId/location"
298 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Appendix C. Application response measurement
This adapter is compatible with the Application Response Measurement
application programming interface (API), an API that allows applications to be
managed for availability, service level agreements, and capacity planning. An
ARM-instrumented application can participate in IBM Tivoli Monitoring for
Transaction Performance, allowing collection and review of data concerning
transaction metrics.
Required software
In addition to the software prerequisites required for the adapter, you must have
the following installed for ARM to operate:
v WebSphere Application Server 5.0.1 (contains the IBM Tivoli Monitoring for
Transaction Performance server). This does not have to be installed on the same
system as the adapter.
v IBM Tivoli Monitoring for Transaction Performance v. 5.2 Fixpack 1. This must
be installed on the same system on which the adapter is installed and
configured to point to the system on which the IBM Tivoli Monitoring for
Transaction Performance server resides.
Application Response Measurement support is available using any integration
broker supported with this release.
Transaction monitoring
When ARM is enabled, the transactions that are monitored are service events and
event deliveries. The transaction is measured from the start of a service request or
event delivery to the end of the service request or event delivery. The name of the
transaction displayed on the Tivoli Monitoring for Transaction Performance console
will start with either SERVICE REQUEST or EVENT DELIVERY. The next part of the
name will be the business object verb (such as CREATE, RETRIEVE, UPDATE or DELETE).
The final part of the name will be the business object name such as “EMPLOYEE.”
The following metrics are collected by default for each type of service request or
event delivery:
v Minimum transaction time
v Maximum transaction time
v Average transaction time
v Total transaction runs
You (or the system administrator of the WebSphere Application Server) can select
which of these metrics to display, for which adapter events, by configuring
Discovery Policies and Listener Policies for particular transactions from within the
Tivoli Monitoring for Transaction Performance console. (Refer to “For more
information.”)
300 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Appendix D. Standard configuration properties
This appendix describes the standard configuration properties for the connector
component of WebSphere Business Integration adapters. The information covers
connectors running with the following integration brokers:
v WebSphere InterChange Server (ICS)
v WebSphere MQ Integrator, WebSphere MQ Integrator Broker, and WebSphere
Business Integration Message Broker, collectively referred to as the WebSphere
Message Brokers (and shown as WMQI in the Connector Configurator).
v Information Integrator (II)
v WebSphere Application Server (WAS)
If your adapter supports DB2 Information Integrator, use the WMQI options and
the DB2 II standard properties (see the Notes column in Table 53 on page 303.)
The properties you set for the adapter depend on which integration broker you
use. You choose the integration broker using Connector Configurator. After you
choose the broker, Connector Configurator lists the standard properties you must
configure for the adapter.
For information about properties specific to this connector, see the relevant section
in this guide.
New properties
These standard properties have been added in this release:
v AdapterHelpName
v BiDi.Application
v BiDi.Broker
v BiDi.Metadata
v BiDi.Transformation
v CommonEventInfrastructure
v CommonEventInfrastructureContextURL
v ControllerEventSequencing
v jms.ListenerConcurrency
v jms.TransportOptimized
v ResultsSetEnabled
v ResultsSetSize
v TivoliTransactionMonitorPerformance
Connector Configurator and System Manager run only on the Windows system. If
you are running the connector on a UNIX system, you must have a Windows
machine with these tools installed.
To set connector properties for a connector that runs on UNIX, you must start up
System Manager on the Windows machine, connect to the UNIX integration broker,
and bring up Connector Configurator for the connector.
The default length of a property field is 255 characters. There is no limit on the
length of a STRING property type. The length of an INTEGER type is determined
by the server on which the adapter is running.
A connector obtains its configuration values at startup. If you change the value of
one or more connector properties during a run-time session, the property’s update
method determines how the change takes effect.
The update characteristics of a property, that is, how and when a change to the
connector properties takes effect, depend on the nature of the property.
302 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v System restart
The new value takes effect only after you stop and restart the connector agent
and the server.
There are three locations in which a standard property can reside. Some properties
can reside in more than one location.
v ReposController
The property resides in the connector controller and is effective only there. If
you change the value on the agent side, it does not affect the controller.
v ReposAgent
The property resides in the agent and is effective only there. A local
configuration can override this value, depending on the property.
v LocalConfig
The property resides in the configuration file for the connector and can act only
through the configuration file. The controller cannot change the value of the
property, and is not aware of changes made to the configuration file unless the
system is redeployed to update the controller explicitly.
See the section following the table for a description of each property.
Note: In the Notes column in Table 53, the phrase “RepositoryDirectory is set to
<REMOTE>” indicates that the broker is InterChange Server. When the
broker is WMQI or WAS, the repository directory is set to
<ProductDir>\repository
Table 53. Summary of standard configuration properties
Update
Property name Possible values Default value method Notes
AdapterHelpName One of the valid Template name, if valid, Component Supported regional
subdirectories in or blank field restart settings.
<ProductDir>\bin\Data Include chs_chn,
\App\Help\ that cht_twn, deu_deu,
contains a valid esn_esp, fra_fra,
<RegionalSetting> ita_ita, jpn_jpn,
directory kor_kor, ptb_bra,
and enu_usa (default).
AdminInQueue Valid JMS queue name <CONNECTORNAME> Component This property is valid
/ADMININQUEUE restart only when the value
of DeliveryTransport
is JMS
AdminOutQueue Valid JMS queue name <CONNECTORNAME> Component This property is valid
/ADMINOUTQUEUE restart only when the value
of DeliveryTransport
is JMS
304 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 53. Summary of standard configuration properties (continued)
Update
Property name Possible values Default value method Notes
CommonEventInfrastruc true or false false Component
ture restart
CommonEventInfrastruc A URL string, for No default value. Component This property is valid
tureURL example, restart only if the value of
corbaloc:iiop: CommonEvent
host:2809. Infrastructure is true.
ConcurrentEventTrig 1 through 32,767 1 Component This property is valid
geredFlows restart only if the value of
RepositoryDirectory
is set to <REMOTE>
and the value of
BrokerType is ICS.
ContainerManagedEvents Blank or JMS Blank Component This property is valid
restart only when the value
of Delivery Transport
is JMS.
ControllerEventSequenc true or false true Dynamic This property is valid
ing only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
ControllerStoreAndFor true or false true Dynamic This property is valid
wardMode only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
ControllerTraceLevel 0 through 5 0 Dynamic This property is valid
only if the value of
RepositoryDirectory
is set to <REMOTE>
and the value of
BrokerType is ICS.
DeliveryQueue Any valid JMS <CONNECTORNAME> Component This property is valid
queue name /DELIVERYQUEUE restart only when the value
of Delivery Transport
is JMS.
DeliveryTransport MQ, IDL, or JMS IDL when the value of Component If the value of
RepositoryDirectory is restart RepositoryDirectory is
<REMOTE>, otherwise not <REMOTE>,
JMS the only valid value for
this property is JMS.
DuplicateEventElimina true or false false Component This property is valid
tion restart only if the value of
DeliveryTransport is JMS.
EnableOidForFlowMoni true or false false Component This property is valid
toring restart only if the value of
BrokerType is ICS.
FaultQueue Any valid queue name. <CONNECTORNAME> Component This property is
/FAULTQUEUE restart valid only if the value
of DeliveryTransport
is JMS.
jms.FactoryClassName CxCommon.Messaging.jms CxCommon.Messaging. Component This property is
.IBMMQSeriesFactory, jms.IBMMQSeriesFactory restart valid only if the value
CxCommon.Messaging of DeliveryTransport
.jms.SonicMQFactory, is JMS.
or any Java class name
306 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 53. Summary of standard configuration properties (continued)
Update
Property name Possible values Default value method Notes
LogAtInterchangeEnd true or false false Component This property is valid
restart only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
MaxEventCapacity 1 through 2147483647 2147483647 Dynamic This property is valid
only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
MessageFileName Valid file name InterchangeSystem.txt Component
restart
MonitorQueue Any valid queue name <CONNECTORNAME> Component This property is valid
/MONITORQUEUE restart only if the value of
DuplicateEventElimination
is true and
ContainerManagedEvents
has no value.
OADAutoRestartAgent true or false false Dynamic This property is valid
only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
OADMaxNumRetry A positive integer 1000 Dynamic This property is valid
only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
OADRetryTimeInterval A positive integer 10 Dynamic This property is valid
in minutes only if the value of
Repository Directory
is set to <REMOTE>
and the value of
BrokerType is ICS.
PollEndTime HH = 0 through 23 HH:MM Component
MM = 0 through 59 restart
PollFrequency A positive integer 10000 Dynamic
(in milliseconds) if broker is
ICS;
otherwise
Component
restart
PollQuantity 1 through 500 1 Agent restart This property is valid
only if the value of
ContainerManagedEvents
is JMS.
PollStartTime HH = 0 through 23 HH:MM Component
MM = 0 through 59 restart
RepositoryDirectory <REMOTE> if the broker For ICS, the value is set Agent restart
is ICS; otherwise any to <REMOTE>
valid local directory.
For WMQI and WAS,
the value is
<ProductDir
\repository
308 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 53. Summary of standard configuration properties (continued)
Update
Property name Possible values Default value method Notes
WireFormat CwXML or CwBO CwXML Agent restart The value of this
property must be CwXML
if the value
of RepositoryDirectory
is not set to <REMOTE>.
The value must
be CwBO if the value of
RepositoryDirectory is set
to <REMOTE>.
WsifSynchronousRequest 0 to any number 0 Component This property is valid
Timeout (milliseconds) restart only if the value of
BrokerType is WAS.
XMLNameSpaceFormat short or long short Agent restart This property is valid
only if the value of
BrokerType is
WMQI or WAS
Standard properties
This section describes the standard connector configuration properties.
AdapterHelpName
The AdapterHelpName property is the name of a directory in which
connector-specific extended help files are located. The directory must be located in
<ProductDir>\bin\Data\App\Help and must contain at least the language
directory enu_usa. It may contain other directories according to locale.
AdminInQueue
The AdminInQueue property specifies the queue that is used by the integration
broker to send administrative messages to the connector.
AdminOutQueue
The AdminOutQueue property specifies the queue that is used by the connector to
send administrative messages to the integration broker.
AgentConnections
The AgentConnections property controls the number of ORB (Object Request
Broker) connections opened when the ORB initializes.
It is valid only if the value of the RepositoryDirectory is set to <REMOTE> and the
value of the DeliveryTransport property is MQ or IDL.
ApplicationName
The ApplicationName property uniquely identifies the name of the connector
application. This name is used by the system administrator to monitor the
integration environment. This property must have a value before you can run the
connector.
BiDi.Application
The BiDi.Application property specifies the bidirectional format for data coming
from an external application into the adapter in the form of any business object
supported by this adapter. The property defines the bidirectional attributes of the
application data. These attributes are:
v Type of text: implicit or visual (I or V)
v Text direction: left-to-right or right-to-left (L or R)
v Symmetric swapping: on or off (Y or N)
v Shaping (Arabic): on or off (S or N)
v Numerical shaping (Arabic): Hindi, contextual, or nominal (H, C, or N)
This property is valid only if the BiDi.Transformation property value is set to true.
BiDi.Broker
The BiDi.Broker property specifies the bidirectional format for data sent from the
adapter to the integration broker in the form of any supported business object. It
defines the bidirectional attributes of the data, which are as listed under
BiDi.Application above.
This property is valid only if the BiDi.Transformation property value is set to true.
If the BrokerType property is ICS, the property value is read-only.
BiDi.Metadata
The BiDi.Metadata property defines the bidirectional format or attributes for the
metadata, which is used by the connector to establish and maintain a link to the
external application. The attribute settings are specific to each adapter using the
bidirectional capabilities. If your adapter supports bidirectional processing, refer to
section on adapter-specific properties for more information.
This property is valid only if the BiDi.Transformation property value is set to true.
310 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
BiDi.Transformation
The BiDi.Transformation property defines whether the system performs a
bidirectional transformation at run time.
BrokerType
The BrokerType property identifies the integration broker type that you are using.
The possible values are ICS, WMQI (for WMQI, WMQIB or WBIMB), or WAS.
CharacterEncoding
The CharacterEncoding property specifies the character code set used to map from
a character (such as a letter of the alphabet, a numeric representation, or a
punctuation mark) to a numeric value.
Note: Java-based connectors do not use this property. C++ connectors use the
value ascii7 for this property.
CommonEventInfrastructure
The Common Event Infrastructure (CEI) is a simple event management function
handling generated events. The CommonEventInfrastructure property specifies
whether the CEI should be invoked at run time.
CommonEventInfrastructureContextURL
The CommonEventInfrastructureContextURL is used to gain access to the WAS
server that executes the Common Event Infrastructure (CEI) server application.
This property specifies the URL to be used.
ConcurrentEventTriggeredFlows
The ConcurrentEventTriggeredFlows property determines how many business
objects can be concurrently processed by the connector for event delivery. You set
the value of this attribute to the number of business objects that are mapped and
delivered concurrently. For example, if you set the value of this property to 5, five
business objects are processed concurrently.
Setting this property to a value greater than 1 allows a connector for a source
application to map multiple event business objects at the same time and deliver
This property is valid only if the value of the RepositoryDirectory property is set
to <REMOTE>.
ContainerManagedEvents
The ContainerManagedEvents property allows a JMS-enabled connector with a
JMS event store to provide guaranteed event delivery, in which an event is
removed from the source queue and placed on the destination queue as one JMS
transaction.
When this property is set to JMS, the following properties must also be set to
enable guaranteed event delivery:
v PollQuantity = 1 to 500
v SourceQueue = /SOURCEQUEUE
You must also configure a data handler with the MimeType and DHClass (data
handler class) properties. You can also add DataHandlerConfigMOName (the
meta-object name, which is optional). To set those values, use the Data Handler
tab in Connector Configurator.
Although these properties are adapter-specific, here are some example values:
v MimeType = text\xml
v DHClass = com.crossworlds.DataHandlers.text.xml
v DataHandlerConfigMOName = MO_DataHandler_Default
The fields for these values in the Data Handler tab are displayed only if you have
set the ContainerManagedEvents property to the value JMS.
Note: When ContainerManagedEvents is set to JMS, the connector does not call its
pollForEvents() method, thereby disabling that method’s functionality.
312 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
There is no default value.
ControllerEventSequencing
The ControllerEventSequencing property enables event sequencing in the connector
controller.
This property is valid only if the value of the RepositoryDirectory property is set
to set to <REMOTE> (BrokerType is ICS).
ControllerStoreAndForwardMode
The ControllerStoreAndForwardMode property sets the behavior of the connector
controller after it detects that the destination application-specific component is
unavailable.
If this property is set to false, the connector controller begins failing all service
call requests as soon as it detects that the destination application-specific
component is unavailable.
This property is valid only if the value of the RepositoryDirectory property is set
to <REMOTE> (the value of the BrokerType property is ICS).
ControllerTraceLevel
The ControllerTraceLevel property sets the level of trace messages for the
connector controller.
This property is valid only if the value of the RepositoryDirectory property is set
to set to <REMOTE>.
DeliveryQueue
The DeliveryQueue property defines the queue that is used by the connector to
send business objects to the integration broker.
This property is valid only if the value of the DeliveryTransport property is set to
JMS.
JMS
The JMS transport mechanism enables communication between the connector and
client connector framework using Java Messaging Service (JMS).
If you select JMS as the delivery transport, additional JMS properties such as
jms.MessageBrokerName, jms.FactoryClassName, jms.Password, and jms.UserName
are listed in Connector Configurator. The properties jms.MessageBrokerName and
jms.FactoryClassName are required for this transport.
There may be a memory limitation if you use the JMS transport mechanism for a
connector in the following environment:
v AIX 5.0
v WebSphere MQ 5.3.0.1
v ICS is the integration broker
In this environment, you may experience difficulty starting both the connector
controller (on the server side) and the connector (on the client side) due to memory
use within the WebSphere MQ client. If your installation uses less than 768MB of
process heap size, set the following variable and property:
v Set the LDR_CNTRL environment variable in the CWSharedEnv.sh script.
314 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
This script is located in the \bin directory below the product directory
(<ProductDir>). Using a text editor, add the following line as the first line in the
CWSharedEnv.sh script:
export LDR_CNTRL=MAXDATA=0x30000000
This line restricts heap memory usage to a maximum of 768 MB (3 segments *
256 MB). If the process memory grows larger than this limit, page swapping can
occur, which can adversely affect the performance of your system.
v Set the value of the IPCCBaseAddress property to 11 or 12. For more
information on this property, see the System Installation Guide for UNIX.
DuplicateEventElimination
When the value of this property is true, a JMS-enabled connector can ensure that
duplicate events are not delivered to the delivery queue. To use this feature, during
connector development, the connector must have a unique event identifier set as
the business object ObjectEventId attribute in the application-specific code.
Note: When the value of this property is true, the MonitorQueue property must
be enabled to provide guaranteed event delivery.
EnableOidForFlowMonitoring
When the value of this property is true, the adapter runtime will mark the
incoming ObjectEventID as a foreign key for flow monitoring.
FaultQueue
If the connector experiences an error while processing a message, it moves the
message (and a status indicator and description of the problem) to the queue
specified in the FaultQueue property.
jms.FactoryClassName
The jms.FactoryClassName property specifies the class name to instantiate for a
JMS provider. This property must be set if the value of the DeliveryTransport
property is JMS.
jms.ListenerConcurrency
The jms.ListenerConcurrency property specifies the number of concurrent listeners
for the JMS controller. It specifies the number of threads that fetch and process
messages concurrently within a controller.
When you connect to a remote message broker, this property requires the following
values:
QueueMgrName:Channel:HostName:PortNumber
where:
QueueMgrName is the name of the queue manager.
Channel is the channel used by the client.
HostName is the name of the machine where the queue manager is to reside.
PortNumberis the port number used by the queue manager for listening
For example:
jms.MessageBrokerName = WBIMB.Queue.Manager:CHANNEL1:RemoteMachine:1456
jms.NumConcurrentRequests
The jms.NumConcurrentRequests property specifies the maximum number of
concurrent service call requests that can be sent to a connector at the same time.
Once that maximum is reached, new service calls are blocked and must wait for
another request to complete before proceeding.
jms.Password
The jms.Password property specifies the password for the JMS provider. A value
for this property is optional.
jms.TransportOptimized
The jms.TransportOptimized property determines if the WIP (work in progress) is
optimized. You must have a WebSphere MQ provider to optimize the WIP. For
optimized WIP to operate, the messaging provider must be able to:
1. Read a message without taking it off the queue
2. Delete a message with a specific ID without transferring the entire message to
the receiver’s memory space
3. Read a message by using a specific ID (needed for recovery purposes)
4. Track the point at which events that have not been read appear.
The JMS APIs cannot be used for optimized WIP because they do not meet
conditions 2 and 4 above, but the MQ Java APIs meet all four conditions, and
hence are required for optimized WIP.
This property is valid only if the value of DeliveryTransport is JMS and the value of
BrokerType is ICS.
316 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
jms.UserName
the jms.UserName property specifies the user name for the JMS provider. A value
for this property is optional.
JvmMaxHeapSize
The JvmMaxHeapSize property specifies the maximum heap size for the agent (in
megabytes).
This property is valid only if the value for the RepositoryDirectory property is set
to <REMOTE>.
JvmMaxNativeStackSize
The JvmMaxNativeStackSize property specifies the maximum native stack size for
the agent (in kilobytes).
This property is valid only if the value for the RepositoryDirectory property is set
to <REMOTE>.
JvmMinHeapSize
The JvmMinHeapSize property specifies the minimum heap size for the agent (in
megabytes).
This property is valid only if the value for the RepositoryDirectory property is set
to <REMOTE>.
ListenerConcurrency
The ListenerConcurrency property supports multithreading in WebSphere MQ
Listener when ICS is the integration broker. It enables batch writing of multiple
events to the database, thereby improving system performance.
This property valid only with connectors that use MQ transport. The value of the
DeliveryTransport property must be MQ.
Locale
The Locale property specifies the language code, country or territory, and,
optionally, the associated character code set. The value of this property determines
cultural conventions such as collation and sort order of data, date and time
formats, and the symbols used in monetary specifications.
By default, only a subset of supported locales are listed. To add other supported
values to the list, you modify the \Data\Std\stdConnProps.xml file in the
<ProductDir>\bin directory. For more information, refer to the Connector
Configurator appendix in this guide.
If the connector has not been internationalized, the only valid value for this
property is en_US. To determine whether a specific connector has been globalized,
refer to the user guide for that adapter.
LogAtInterchangeEnd
The LogAtInterchangeEnd property specifies whether to log errors to the log
destination of the integration broker.
Logging to the log destination also turns on e-mail notification, which generates
e-mail messages for the recipient specified as the value of MESSAGE_RECIPIENT
in the InterchangeSystem.cfg file when errors or fatal errors occur. For example,
when a connector loses its connection to the application, if the value of
LogAtInterChangeEnd is true, an e-mail message is sent to the specified message
recipient.
This property is valid only if the value of the RespositoryDirectory property is set
to <REMOTE> (the value of BrokerType is ICS).
MaxEventCapacity
The MaxEventCapacity property specifies maximum number of events in the
controller buffer. This property is used by the flow control feature.
This property is valid only if the value of the RespositoryDirectory property is set
to <REMOTE> (the value of BrokerType is ICS).
MessageFileName
The MessageFileName property specifies the name of the connector message file.
The standard location for the message file is \connectors\messages in the product
directory. Specify the message file name in an absolute path if the message file is
not located in the standard location.
318 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Note: To determine whether a connector has its own message file, see the
individual adapter user guide.
MonitorQueue
The MonitorQueue property specifies the logical queue that the connector uses to
monitor duplicate events.
It is valid only if the value of the DeliveryTransport property is JMS and the value
of the DuplicateEventElimination is true.
OADAutoRestartAgent
the OADAutoRestartAgent property specifies whether the connector uses the
automatic and remote restart feature. This feature uses the WebSphere
MQ-triggered Object Activation Daemon (OAD) to restart the connector after an
abnormal shutdown, or to start a remote connector from System Monitor.
This property must be set to true to enable the automatic and remote restart
feature. For information on how to configure the WebSphere MQ-triggered OAD
feature. see the Installation Guide for Windows or for UNIX.
This property is valid only if the value of the RespositoryDirectory property is set
to <REMOTE> (the value of BrokerType is ICS).
OADMaxNumRetry
The OADMaxNumRetry property specifies the maximum number of times that the
WebSphere MQ-triggered Object Activation Daemon (OAD) automatically attempts
to restart the connector after an abnormal shutdown. The OADAutoRestartAgent
property must be set to true for this property to take effect.
This property is valid only if the value of the RespositoryDirectory property is set
to <REMOTE> (the value of BrokerType is ICS).
OADRetryTimeInterval
The OADRetryTimeInterval property specifies the number of minutes in the
retry-time interval for the WebSphere MQ-triggered Object Activation Daemon
(OAD). If the connector agent does not restart within this retry-time interval, the
connector controller asks the OAD to restart the connector agent again. The OAD
repeats this retry process as many times as specified by the OADMaxNumRetry
property. The OADAutoRestartAgent property must be set to true for this
property to take effect.
This property is valid only if the value of the RespositoryDirectory property is set
to <REMOTE> (the value of BrokerType is ICS).
You must provide a valid value for this property. The default value is HH:MM
without a value, and it must be changed.
PollFrequency
The PollFrequency property specifies the amount of time (in milliseconds) between
the end of one polling action and the start of the next polling action. This is not
the interval between polling actions. Rather, the logic is as follows:
v Poll to obtain the number of objects specified by the value of the PollQuantity
property.
v Process these objects. For some connectors, this may be partly done on separate
threads, which execute asynchronously to the next polling action.
v Delay for the interval specified by the PollFrequency property.
v Repeat the cycle.
Important: Some connectors have restrictions on the use of this property. Where
they exist, these restrictions are documented in the chapter on
installing and configuring the adapter.
PollQuantity
The PollQuantity property designates the number of items from the application
that the connector polls for. If the adapter has a connector-specific property for
setting the poll quantity, the value set in the connector-specific property overrides
the standard property value.
This property is valid only if the value of the DeliveryTransport property is JMS,
and the ContainerManagedEvents property has a value.
320 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
v The connector processes the first BO attachment. The data handler is available
for this MIME type, so it sends the business object to Visual Test Connector.
v When it is polled for the second time, the connector processes the second BO
attachment. The data handler is available for this MIME type, so it sends the
business object to Visual Test Connector.
v Once it is accepted, the third BO attachment should be transmitted.
PollStartTime
The PollStartTime property specifies the time to start polling the event queue. The
format is HH:MM, where HH is 0 through 23 hours, and MM represents 0 through 59
minutes.
You must provide a valid value for this property. The default value is HH:MM
without a value, and it must be changed.
RepositoryDirectory
The RepositoryDirectory property is the location of the repository from which the
connector reads the XML schema documents that store the metadata for business
object definitions.
If the integration broker is ICS, this value must be set to set to <REMOTE>
because the connector obtains this information from the InterChange Server
repository.
When the integration broker is a WebSphere message broker or WAS, this value is
set to <ProductDir>\repository by default. However, it may be set to any valid
directory name.
RequestQueue
The RequestQueue property specifies the queue that is used by the integration
broker to send business objects to the connector.
This property is valid only if the value of the DeliveryTransport property is JMS.
ResponseQueue
The ResponseQueue property specifies the JMS response queue, which delivers a
response message from the connector framework to the integration broker. When
the integration broker is ICS, the server sends the request and waits for a response
message in the JMS response queue.
This property is valid only if the value of the DeliveryTransport property is JMS.
RestartRetryInterval
The RestartRetryInterval property specifies the interval in minutes at which the
connector attempts to restart itself. When this property is used for a connector that
is linked in parallel, it specifies the interval at which the master connector
application-specific component attempts to restart the client connector
application-specific component.
ResultsSetEnabled
The ResultsSetEnabled property enables or disables results set support when
Information Integrator is active. This property can be used only if the adapter
supports DB2 Information Integrator.
This property is valid only if the value of the DeliveryTransport property is JMS,
and the value of BrokerType is WMQI.
ResultsSetSize
The ResultsSetSize property defines the maximum number of business objects that
can be returned to Information Integrator. This property can be used only if the
adapter supports DB2 Information Integrator.
This property is valid only if the value of the ResultsSetEnabled property is true.
The default value is 0. This means that the size of the results set is unlimited.
RHF2MessageDomain
The RHF2MessageDomain property allows you to configure the value of the field
domain name in the JMS header. When data is sent to a WebSphere message
broker over JMS transport, the adapter framework writes JMS header information,
with a domain name and a fixed value of mrm. A configurable domain name lets
you track how the WebSphere message broker processes the message data.
This property is valid only if the value of BrokerType is WMQI or WAS. Also, it is
valid only if the value of the DeliveryTransport property is JMS, and the value of
the WireFormat property is CwXML.
322 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Possible values are mrm and xml. The default value is mrm.
SourceQueue
The SourceQueue property designates the JMS source queue for the connector
framework in support of guaranteed event delivery for JMS-enabled connectors
that use a JMS event store. For further information, see “ContainerManagedEvents”
on page 312.
This property is valid only if the value of DeliveryTransport is JMS, and a value for
ContainerManagedEvents is specified.
SynchronousRequestQueue
The SynchronousRequestQueue property delivers request messages that require a
synchronous response from the connector framework to the broker. This queue is
necessary only if the connector uses synchronous execution. With synchronous
execution, the connector framework sends a message to the synchronous request
queue and waits for a response from the broker on the synchronous response
queue. The response message sent to the connector has a correlation ID that
matches the ID of the original message.
SynchronousRequestTimeout
The SynchronousRequestTimeout property specifies the time in milliseconds that
the connector waits for a response to a synchronous request. If the response is not
received within the specified time, the connector moves the original synchronous
request message (and error message) to the fault queue.
SynchronousResponseQueue
The SynchronousResponseQueue property delivers response messages in reply to a
synchronous request from the broker to the connector framework. This queue is
necessary only if the connector uses synchronous execution.
TivoliMonitorTransactionPerformance
The TivoliMonitorTransactionPerformance property specifies whether IBM Tivoli
Monitoring for Transaction Performance (ITMTP) is invoked at run time.
WireFormat
The WireFormat property specifies the message format on the transport:
WsifSynchronousRequestTimeout
The WsifSynchronousRequestTimeout property specifies the time in milliseconds
that the connector waits for a response to a synchronous request. If the response is
not received within the specified time, the connector moves the original
synchronous request message (and an error message) to the fault queue.
XMLNameSpaceFormat
The XMLNameSpaceFormat property specifies short or long namespaces in the
XML format of business object definitions.
This property is valid only if the value of BrokerType is set to WMQI or WAS.
324 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Appendix E. Connector-specific configuration properties
Connectors have two kinds of configuration properties: Connector-specific
configuration properties, and standard configuration properties. This appendix
describes the properties that are specific to the connector for mySAP.com. For
information about using Connector Configurator, see Chapter 3, “Configuring the
connector,” on page 21.
Standard configuration properties provide information that all connectors use. See
Appendix D, “Standard configuration properties,” on page 301 for documentation
of these properties. Note that several of the standard configuration properties have
unique issues for the connector for SAP, as described in Table 54.
Table 54. Property information specific to this connector
Property Note
CharacterEncoding The connector does not use this property.
Locale Because this connector has been internationalized, you can
change the value of this property. See release notes for the
adapter to determine currently supported locales.
PollFrequency If using the RFC Server Module or the ALE Module for event
processing, do not set this property’s value to key or to no.
Setting the value to key or no prevents the connector from
instantiating these modules at startup.
You must provide a value for the ApplicationName configuration property before
running the connector.
ALE
PollQuantity any positive integer 20 ABAP Extension,
ALE
RefreshLogonCycle true true All
RfcProgramId program ID CWLDSERVER RFC Server,
ALE
RfcTraceOn true or false false All
SAPALE_Archive_Queue any valid WebSphere MQ ALE
queue name
SAPALE_Event_Queue any valid WebSphere MQ ALE
queue name
SAPALE_Wip_Queue any valid WebSphere MQ ALE
queue name
SAPALE_Error_Queue
SAPALE_Unsubscribed_Queue
SAPSystemID logical name of the SAP System All
SAPtid_MQChannel any valid MQ channel ALE
SAPtid_MQPort any valid MQ port ALE
SAPtid_Queue any valid MQ queue name ALE (request
processing only)
SAPtid_QueueManager any valid MQ queue manager ALE
name
SAPtid_QueueManagerHost any valid MQ queue manager ALE
host name
SAPtid_QueueManagerLogin any valid MQ queue manager ALE
login name
SAPtid_QueueManagerPassword any valid MQ queue manager ALE
password
Sysnr system-number 00 All
DateTimeFormat nothing or legacy All
TransIdCollabName No longer supported
UpdateIDocStatus true or false True ALE
IDocSuccessCode 12 ALE
IDocFailureCode 11 ALE
IDocSuccessText Dispatched Okay ALE
326 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 55. Quick reference for connector-specific configuration properties (continued)
Name Possible values Default value Modules
IDocFailureText Dispatch failed ALE
UseDefaults true or false false ABAP Extension
ALE
BAPI
ABAPDebug
Specifies whether the connector invokes the ABAP Debugger for the appropriate
function module when the connector begins processing a business object. When
this property is set to true, the connector opens the ABAP Debugger for the
following connector modules:
v ABAP Extension—when processing events out of SAP and service call requests
into SAP
v BAPI—only when processing service call requests into SAP
v Hierarchical Dynamic Retrieve—when processing service call requests into SAP
Note: You can add breakpoints only after the debugger opens.
AleEventDir
Specifies the location of the root directory (\ale) for the event directory used by
the ALE Module to log and recover events. When the connector starts for the first
time, if it does not find the root directory in the directory from which the
connector is started, it creates it and the event subdirectory:
v If the path is specified in this property, it uses that path to create the directory.
v If no path is specified, it creates the root directory in the directory from which
the connector is started.
UNIX
If you are not in the connector’s directory when you start the connector for
the first time, the connector creates the root directory in the directory from
which you start the connector regardless of the value of this property.
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
UNIX
$<ProductNameDir>/connectors/SAP/ale
Windows
%ProductNameDir%\connectors\SAP\ale
AleUpdateStatus
Specifies whether an audit trail is required for all message types. This property
must be set to true to cause the connector to update a standard SAP status code
after the ALE Module has retrieved an IDoc object for event processing.
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
AleSelectiveUpdate
Specifies which IDocType and MessageType combinations are to be updated when
the connector is configured to update a standard SAP status code. You can define
values for this property only if AleUpdateStatus has been set to true.
where a colon (:) delimiter separates each IDocType and MessageType, and a
comma (,) delimiter separates entries in a set. The example below illustrates two
sets. In the example, MATMAS03 and DEBMAS03 are the IDocs, and MATMAS and DEBMAS
are the message types:
MATMAS03:MATMAS,DEBMAS03:DEBMAS
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
AleStatusMsgCode
If required, specifies the message code to use when the connector posts the ALEAUD
Message IDoc (ALEAUD01). Configure this message code in the receiving Partner
Profile. You can set a value for this property only if AleUpdateStatus has been set
to true.
For more information, see “Configuring SAP to update IDoc status” on page 123.
AleSuccessCode
Specifies the success status code for Application Document Posted. You must
specify a value for this property (52 or 53) to cause the connector to update the
SAP success status code after the ALE Module has retrieved an IDoc object for
event processing. SAP converts this value to status 41 (Application Document
Created in Receiving System).
328 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
AleFailureCode
Specifies the status code for dispatch failure. You must specify a value for this
property (68 or 58) to cause the connector to update the SAP failure status code
after the ALE Module has retrieved an IDoc object for event processing. SAP
converts this value to 40.
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
AleSuccessText
Specifies the descriptive text for successful Application Document Posted.
Specifying a value for this property is optional, even when you set
AleUpdateStatus to true.
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
AleFailureText
Specifies the descriptive text for dispatch failure. Specifying a value for this
property is optional, even when you set AleUpdateStatus to true.
For more information, see Chapter 10, “Overview of the ALE Module,” on page
115.
ApplicationPassword
Password for the connector’s user account on the SAP application. The default is
SOFTWARE.
ApplicationUserName
Name of the connector’s user account on the SAP application. The default is
CROSSWORLDS.
ArchiveDays
The ArchiveDays connector configuration property determines the number of days
after which TIDManagement files should be deleted from the request directory. The
default value maintained internally is seven days. You can also specify partial day
values, for example 1.234.
Client
Client number under which the connector logs in, often 100.
Group
When configuring the connector for load balancing, specifies the name of the logon
group that represents a group of application servers. For more information, see
“Taking advantage of load balancing” on page 40.
Hostname
When configuring the connector for load balancing, specifies the name of the
message server. When configuring the connector to run without load balancing,
specifies the IP address or the name of the application server that the connector
logs in to. In both cases, the connector assumes that the name of the gateway host
is the same as the value specified for this property.
InDoubtEvents
InDoubtEvents describes how to handle in-progress events in the events table.
Reprocess reprocesses the in-progress events in the events table. FailOnStartup
will shut down the connector and log a fatal error when in-progress events are
found. LogError logs an error notifying that in-progress events are in the event
table. Ignore, ignore the in-progress events.
Language
Language in which the connector logs in. The default is E, for English.
MaxNumberOfConnections
The maximum number of concurrent interactions possible between the connector
and the SAP application. These interactions include polling for events and
handling service call requests. Only the ABAP Extension, BAPI, and ALE Modules
use this property. The ALE Module uses this property only for service call requests.
Because each interaction uses a dialog process on the SAP application server, the
number of connections cannot exceed the number of dialog processes available. For
more information, see “Processing multiple concurrent interactions” on page 11.
If no value is specified for this property, the connector uses the default value of 2.
Modules
Identifies the module used by the connector to carry out the init(),
pollForEvents(), and Terminate() requests. Specifically, it specifies the connector
module used by the Vision Connector framework. Specify multiple connector
modules by separating each value with a comma. Do not add spaces.
The supported connector modules and the syntax to specify them is as follows:
ALE Module—ALE
BAPI Module—Bapi
330 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Namespace
Specifies whether or not the connector uses the ABAP components defined in the
connector’s namespace /CWLD/. The value must be set to true in order for the
connector to use the ABAP components defined in the namespace. The default is
true.
NumberOfListeners
Specifies the number of listener threads that are created when the connector is
initialized. A listener thread can handle one request at a time. Each listener thread
handles a single event at a time; therefore, if you have multiple listener threads,
the connector can handle multiple events concurrently. The default is 1.
It is recommended that you have no more listener threads than the available work
processes in SAP.
PollQuantity
Defines the maximum number of events picked up for a single poll. The default is
20.
RefreshLogonCycle
Specifies whether all resources are to be freed for an SAP client connection. The
default is false.
RfcProgramId
Identification that the connector registers in the SAP Gateway so that the listener
threads can process events from RFC-enabled functions. This value must match the
Program ID registered in the SAP application (transaction SM59). The default is
CWLDSERVER.
For more information on configuring the Program ID in the SAP application, see
“Registering the RFC Server Module with the SAP gateway” on page 159.
RfcTraceOn
Specifies whether or not to generate a text file detailing the RFC activity for each
listener thread. You can specify a value of true or false. A value of true activates
tracing, which generates a text file. It is recommended that you use these text files
in a development environment only, because the files can grow rapidly. The default
is false.
SAPALE_Archive_Queue
Specifies the WebSphere MQ queue that archives TIDs and IDoc data after the ALE
Module has finished processing events. For more information, see Chapter 10,
“Overview of the ALE Module,” on page 115.
SAPALE_Event_Queue
Specifies the WebSphere MQ queue that stores TIDs and IDoc data during the ALE
Module’s processing of events. For more information, see Chapter 10, “Overview of
the ALE Module,” on page 115.
SAPALE_Error_Queue
Defines a queue to handle MQ messages that fail between the WIP Queue and the
Event Queue. For more information, see Chapter 10, “Overview of the ALE
Module,” on page 115.
SAPALE_Unsubscribed_Queue
Defines a queue to collect unsubscribed IDoc objects. Unsubscribed IDoc objects
previously were placed in the Archive queue. These messages can be resubmitted
using the event management utility. The connector now checks for subscriptions
when processing the data from SAP to the connector, resulting in transactions
remaining in SAP until the collaboration is started. For more information, see
Chapter 10, “Overview of the ALE Module,” on page 115.
SAPSystemID
When configuring the connector for load balancing, specifies the logical name of
the SAP system, which is also known as R3name. For more information, see “Taking
advantage of load balancing” on page 40.
SAPtid_MQChannel
Specifies the Client channel for the WebSphere MQ queue manager. For more
information, see Chapter 10, “Overview of the ALE Module,” on page 115.
SAPtid_MQPort
Specifies the port used to communicate with the WebSphere MQ queue manager
that handles the queues for the ALE Module. For more information, see
Chapter 10, “Overview of the ALE Module,” on page 115.
SAPtid_Queue
Specifies the WebSphere MQ queue on which messages containing the TID and
TID status reside. This property is used by the ALE Module only when processing
requests. For more information, see Chapter 10, “Overview of the ALE Module,”
on page 115.
332 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
SAPtid_QueueManager
Name of the WebSphere MQ queue manager for the queues that store TIDs and
IDoc data. This property is used by the ALE Module to process events and
requests. For more information, see Chapter 10, “Overview of the ALE Module,”
on page 115.
SAPtid_QueueManagerHost
Name of the host where the WebSphere MQ queue manager resides. This property
is used by the ALE Module to process events and requests. For more information,
see Chapter 10, “Overview of the ALE Module,” on page 115.
SAPtid_QueueManagerLogin
User name to log into the WebSphere MQ queue manager. This property is used
by the ALE Module to process events and requests. For more information, see
Chapter 10, “Overview of the ALE Module,” on page 115.
SAPtid_QueueManagerPassword
Password for the user who logs into the WebSphere MQ queue manager. This
property is used by the ALE Module to process events and requests. For more
information, see Chapter 10, “Overview of the ALE Module,” on page 115.
Sysnr
System number of the application server. The value is a two-digit number, often 00.
The default is 00.
DateTimeFormat
Preserves the delimiters provided with DATE and TIME field values. If set to Legacy,
the connector will preserve the delimiters for DATE and TIME fields. Otherwise, the
delimiters will be removed and the value’s length will conform to the attribute
defined length.
TransIdCollabName
Important: The connector no longer supports this property.
UpdateIDocStatus
States whether or not an audit trail is required for all message types.
IDocSuccessCode
The standard IDoc status code for dispatched okay.
IDocFailureCode
The standard IDoc status code for dispatched failure.
IDocFailureText
The IDoc status message text associated with the IDocFailureCode for dispatched
failure.
UseDefaults
On a Create or Update operation, if UseDefaults is set to true, the adapter
framework for the integration broker, checks whether a valid value or a default
value is provided for each business object attribute marked as required. If a value
is provided, the Create or Update operation succeeds. If the parameter is set to
false, the connector checks only for a valid value and causes the Create or Update
operation to fail if it is not provided. The default is false.
334 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Appendix F. IBM WebSphere BI Station support levels
This appendix lists all of the IBM WebSphere BI Station tools and identifies the
environment in which they are supported. The tools are supported in either a
development environment only or in both a production and development
environment.
Important: The output of these tools is the responsibility of the user.IBM does not
support the use of Development tools in a production environment.
Development tab
The Development tab contains tools for development only. Table 56 lists the
available tools.
Table 56. Development tabs
Development and
Section Button Development only production
Transaction Based -Inbound
Inbound Wizard X
Modify BO Meta Data X
Transaction Based - Outbound—Flat
Modify BO Meta Data X
Modify Long Text X
Tools tab
The Tools tab contains tools for development only. Table 57 lists the available tools.
Table 57. Tools tab
Development and
Section Button Development only production
Tools
Config objects X
Configuration values X
Transport layer X
Log object links X
Delete object X
Object metadata X
Management tab
The Management tab contains tools for development and production. Table 58 lists
the available tools.
Table 58. Management tab
Development and
Section Button Development only production
Activity
Log X
Gateway X
Event queues
Current events X
Future events X
Archived events X
Online
Delete Event queue X
Delete Event archive X
Delete log X
Del Obj archive X
Configuration tab
The Management tab contains tools for development only as well as development
and production. Table 59 lists the available tools.
Table 59. Configuration tab
Development and
Section Button Development only production
Global Settings
Configuration values X
Event Distribution X
Event restriction X
Logging level X
User Settings X
Troubleshooting tab
The Troubleshooting tab contains tools for development and production. Table 60
lists the available tools.
Table 60. Troubleshooting tab
Development and
Section Button Development only production
Local Tools
Short dump X
Customer Support
336 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Table 60. Troubleshooting tab (continued)
Development and
Section Button Development only production
Log X
Short dump X
Event restriction X
CrossWorlds config X
Object metadata X
340 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
G N
Gateway service. Naming conventions
See SAP Gateway service See Business object naming conventions
Naming conventions.
See Business object naming conventions
H Number ranges, verifying 216
Hierarchical Dynamic Retrieve Module
configuration properties 177
developing business objects 179 O
overview 175 odk_dd.xml file
quick steps 291 See Deployment desciptor file
troubleshooting 83 Outbound Wizard
vDynRetBOH business object handler 179 overview 235
Overview
ABAP Extension Module 195
I ABAP Extension Module business object development 231
BAPI Module 89
IBM Tivoli Monitoring for Transaction Performance 6, 299
BAPI Module business object development 97, 161
IBM WebSphere BI Station
Hierarchical Dynamic Retrieve Module business object
support levels 335
development 179
IDoc Handlers
RFC Server Module 153
and create processing 242
and delete processing 242
and retrieve processing 246
and update processing 242 P
architecture 241 Ping-pong, preventing 216
object-specific 246 Properties
translating data structures 243 business object 186
IDocs properties,
creating definition file 135 See Connector properties
creating inbound logic 244
developing business objects 241
multiple IDoc wrapper 148, 149
processing multiple IDocs 147
R
Reprocessing, archived objects 264
Inbound Wizard
Resubmission
for Dynamic Transaction 240
events from archive table 269
overview 235
ResultSet business objects 63
Information Integrator support 63
Retrieve processing
Initializing the ABAP Extension Module 197
ABAP handlers 225
Initializing the BAPI Module 90
and IDoc Handlers 246
Initializing the RFC Server Module 155
Return code
Installing
non-zero 229
connector transport files 209
return code 0 226
Java Connector (JCo) 5, 16, 19
return code 21 228
Java Connector (JCO) 44
RFC Server Module 155
multiple connectors 16
components 153
SAPODA 43
configuration 159
files 159
how it works 155
J initialization 155
Java Connector (JCo) 5, 16, 19, 44 listener threads 154
JMS-MQ message structure 127 quick steps 286
supported verbs 164
troubleshooting 79
L
Log file.
See Connector log file S
Log, increasing tablespace size 215 SAP gateway service connections 267
SAP Gateway service, monitoring connections 267
SAP JCo
M See Java Connector
SAP Native APIs
monitoring, of transactions 6, 299
ABAP SQL 232
Multiple connections 14
Batch Data Communication (BDC) 232
Multiple IDoc wrapper 148, 149
Call Transaction 232
CrossWorlds implemented 232
Index 341
SAP Native APIs, and business object data 225 WebSphere MQ 3
SAPODA
Business Object Designer 46
Configure Agent Properties window 47
configuring agent properties 48
error and trace message files 45
installing 43
starting the ODA 44
troubleshooting 85
using 44
Script
connector manager 18
Search results
caching 51
Single BAPI calls 57
T
TechNotes 86
Tivoli Monitoring for Transaction Performance 6, 299
Trace message files 45
Trace messages 84
transaction monitoring 6, 299
Transport files.
See Connector transport files
Troubleshooting 73
ABAP Extension Module 75
ALE Module 80
BAPI Module 78
event handing 76
Hierarchical Dynamic Retrieve Module 83
RFC Server Module 79
SAPODA 85
startup problems 75
WBI memory management 74
WBI performance tuning 74
Truncating, event log 266
U
Unicode support 5
Unprocessed events, checking the event queue 268
Update processing
ABAP handlers 225
and IDoc Handlers 242
Upgrading
ABAP Extension Module 271
V
Verb application-specific text
ABAP Extension Module 249
ABAP handlers 224
BAPI Module 103, 166
Verbs
ALEI Module support 145
BAPI Module support 100
Retrieve 176
RFC Server support 164
Vision Connector Framework 8
W
WebSphere Application Server 3
WebSphere InterChange Server 3
342 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service. IBM may have patents or
pending patent applications covering subject matter described in this document.
The furnishing of this document does not grant you any license to these patents.
You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law: INTERNATIONAL
BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION ″AS IS″
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you. This
information could include technical inaccuracies or typographical errors. Changes
are periodically made to the information herein; these changes will be incorporated
in new editions of the publication. IBM may make improvements and/or changes
in the product(s) and/or the program(s) described in this publication at any time
without notice. Any references in this information to non-IBM Web sites are
provided for convenience only and do not in any manner serve as an endorsement
of those Web sites. The materials at those Web sites are not part of the materials for
this IBM product and use of those Web sites is at your own risk. IBM may use or
distribute any of the information you supply in any way it believes appropriate
without incurring any obligation to you. Licensees of this program who wish to
have information about it for the purpose of enabling: (i) the exchange of
information between independently created programs and other programs
(including this one) and (ii) the mutual use of the information which has been
exchanged, should contact:
344 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Trademarks and service marks
The following terms are trademarks or registered trademarks of International
Business Machines Corporation in the United States or other countries, or both:
i5/OS
IBM
the IBM logo
AIX
CICS
CrossWorlds
DB2
DB2 Universal Database
Domino
IMS
Informix
iSeries
Lotus
Lotus Notes
MQIntegrator
MQSeries
MVS
OS/400
Passport Advantage
SupportPac
WebSphere
z/OS
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both. MMX,
Pentium, and ProShare are trademarks or registered trademarks of Intel
Corporation in the United States, other countries, or both. Java and all Java-based
trademarks are trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both. Linux is a trademark of Linus Torvalds in the United States,
other countries, or both. Other company, product or service names may be
trademarks or service marks of others.
Notices 345
346 Adapter for mySAP.com User Guide (for BASIS 4.0–4.6, SAP Web AS 6.20)
Printed in USA