Conn Sap
Conn Sap
Conn Sap
SAP R/3
Version 7.8
March 2005
Proprietary Information
Siebel Systems, Inc. considers information included in this
documentation and in Siebel Business Applications Online Help to be
Confidential Information. Your access to and use of this Confidential
Information are subject to the terms and conditions of: (1) the
applicable Siebel Systems software license agreement, which has
been executed and with which you agree to comply; and (2) the
proprietary and restricted rights notices included in this
documentation.
Contents
11
11
16
16
17
21
22
24
25
28
Component Configuration
36
37
38
39
Contents
MQSeries
40
Checking Connectivity
41
42
43
48
45
48
49
53
56
Installing Siebel Connector for SAP R/3 on Windows for a UNIX-Based Siebel
Enterprise 57
59
Product/Material Integration
Sales Order Integration
62
62
73
63
Contents
74
74
83
91
91
92
107
107
111
113
114
127
Contents
133
145
146
151
153
158
AddMessage 159
DeleteMessage 160
GetMessage 161
GetStatus 162
UpdateStatus 163
165
165
167
167
169
170
Contents
171
177
183
183
185
186
187
188
195
196
197
Index
Contents
Table 1.
New Product Features in Siebel Connector for SAP R/3, Version 7.8
Topic
Description
10
The Siebel Connector for SAP R/3 provides integration between Siebel applications and SAP R/3. This
integration offers capabilities designed to meet your sales, marketing, and customer service
requirements. The Siebel Connector for SAP R/3 extends Siebel applications to integrate with back
office data and processes.
This chapter contains the following topics:
About the Siebel Connector for SAP R/3 on page 11
Siebel Connector for SAP R/3 Features and Capabilities on page 11
About the Siebel EAI Architecture on page 16
You can learn how to use the standard integrations, as is, from this guide. You can also find guidance
on modifying these Standard Integrations. Some information on creating customized integrations is
included, but you also need to consult the Overview: Siebel Enterprise Application Integration guide.
11
About SAP R/3 Siebel Connector for SAP R/3 Features and Capabilities
BAPI-based Integration, which uses the SAP Business API to integrate Siebel applications with
SAP R/3.
For example, using BAPI-based integration, you can check an accounts sales order history and
you can submit sales orders in real time to SAP. You can submit and query sales orders
individually or in batches by way of the Siebel Server.
IDOC-based integration, which uses Siebel applications to integrate Siebel data with SAP R/3
data. IDOC Integration has been implemented using SAP's Application Link Enabling (ALE)
interface.
For example, using IDOC-based integration, you can create Siebel Accounts from SAP Customers
and Siebel Products from SAP Materials.
Table 2.
SAP Term
Account
Customer
Contact
Contact
Sales Order
Sales Order
Product
Material
This guide uses many abbreviations and specialized terms. Table 3 provides a list of many of these
terms.
Table 3.
Term
Meaning
ABAP
ALE
Application Link Enabling. This is SAPs technology for transmitting IDOC data
containers to and from external applications using Transactional RFC.
BAPI
12
About SAP R/3 Siebel Connector for SAP R/3 Features and Capabilities
Table 3.
Term
Meaning
Dialog Process
An SAP process that handles immediate user activity and ABAP execution.
EAI
IDOC
RFC
Remote Function Call. This is the technology used by SAP to allow external
applications to call ABAP functions defined in SAP and allow SAP to call functions
defined in external applications. The terms RFC and BAPI are very similar and are
often used in place of one another.
Synchronous
RFC
tRFC
Transactional RFC. This is a one-way RFC call into or out of SAP with guaranteed
delivery.
Table 4 contains a list of Siebel Connector for SAP R/3 business services and their common names in
this document.
Table 4.
Name in Document
BAPI Adapter
IDOC Adapter
13
About SAP R/3 Siebel Connector for SAP R/3 Features and Capabilities
Table 5.
Data Class
Objects Integrated
Master Data
Accounts
Contacts
Products
Transaction Data
Sales Orders
Quotes
The Business Service data maps provide preconfigured mappings between equivalent entities in both
applications. Preconfigured mappings simplify configuration and consist of the most commonly
required data, and take into account the complicated entity relationships contained in both
applications. These mappings provide a foundation for any desired customization work and are
modifiable.
Table 6.
Integration
Data
Account to
Customer
14
Description
The Account to Customer Standard Integration uses synchronous BAPI
communication as well as SAPs ALE communication services to create and
update SAP customer information from Siebel Accounts. Using Siebel views you
can enter SAP customer information directly into the Siebel application, including
customer sales area specific data.
About SAP R/3 Siebel Connector for SAP R/3 Features and Capabilities
Table 6.
Integration
Data
Description
Customer to
Account
Material to
Product
The Material to Product Standard Integration uses ALE to accept Material IDOCs
from SAP R/3 and transform them into Siebel Products. Also transformed are
product division and organizational information. The Material to Product standard
integration can provide an initial load of data from SAP to the Siebel application,
as well as support periodic high volume synchronization of data.
Table 7.
Integration
Name
Description
Account Order
History
Use this to view and import sales orders for a given account or organization from
SAP into a Siebel application in real time. Imported sales orders are also updated
automatically with the latest SAP data.
Siebel Sales
Order to SAP
Sales Order
Use this to create sales orders within Siebel applications and submit those sales
orders to SAP. A real-time synchronous BAPI interface provides an immediate
response from SAP upon the submission of the sales order. SAP checks both credit
and product availability. Pricing may be done by either SAP or Siebel applications.
The status of these sales orders may be obtained in real time or in the background
after they are created.
Sales Order
Updates
The Sales Order Updates standard integration automatically updates the Sales
Order in the Siebel database when it changes in SAP. This integration uses SAP's
ALE interface, which allow SAP to trigger the status update by sending a sales
order change IDOC message to the Siebel applications.
Quote to Sales
Order
Use this process to create Siebel and SAP orders from a single quote. Siebel
quotes are first converted to a Siebel order. The Siebel order can then be
submitted to SAP. A real-time synchronous BAPI interface provides an immediate
response from SAP upon the submission of the sales order. SAP checks both credit
and product availability. Pricing may be done by either SAP or Siebel applications.
15
16
Figure 1.
As Figure 1 shows there are two types of Business Data Flows possible, Outbound to SAP (Send) and
Inbound from SAP (Receive). The processing flow for each is largely contained within a Siebel
Workflow.
Outbound Business Data Flows generally contain a call to the EAI Siebel Adapter to first extract data
from the Siebel database corresponding to a Siebel Business Object. This data is then used to
populate a corresponding Siebel Integration Object. The Siebel Integration Object is passed to a
Business Service whose job is to transform the Siebel Integration Object structure into an SAP
Integration Object structure. The data transformation within the Business Service Data Map can be
written using Siebel eScript or can be done through the use of Siebel Data Mapper. SAP integration
objects can represent either an IDOC structure in SAP or a BAPI function interface. The IDOC Adapter
converts the IDOC data into a special format and then passes that data to the BAPI Adapter. The
BAPI Adapter then interfaces to the SAP Application Server directly. All data passing into SAP passes
through the BAPI Adapter.
17
Inbound Business Data Flows must start with the tRFC BAPI Receiver Component. The tRFC BAPI
Receiver runs in the background continuously waiting for data from SAP. This data can be in the form
of an IDOC or RFC function call. When the tRFC BAPI Receiver receives an IDOC, it calls the IDOC
Workflow Processor to convert the raw SAP IDOC data into an IDOC Integration Object. The IDOC
Workflow Processor then invokes a workflow to process the data further. When the tRFC BAPI
Receiver receives an RFC call, it creates a BAPI Integration Object that it sends to a workflow for
processing. The workflow typically contains a Business Service Data Map to transform the data into
a Siebel Integration Object. The Siebel Integration Object is then passed to the EAI Siebel Adapter
where it can be processed as a business object into the Siebel database.
18
19
20
This chapter covers the installation and configuration of the Siebel Connector for SAP R/3. It consists
of the following topics:
Process of Installing the Siebel Connector for SAP R/3 on page 21
Modifying SAP Configuration Files on page 22
Modifying Siebel Configuration Files for Customized Integrations on page 25
Configuring ALE/IDOC Connectivity on page 28
Component Configuration on page 36
SAP Code Page Configuration on page 38
Checking Connectivity on page 41
Configuring the SAP Connector for Use with IBM MQSeries on page 43
SAP Configuration for Standard Integrations on page 48
Siebel Configuration for Standard Integrations on page 49
Activating Workflows in the Standard Integrations on page 56
Installing Siebel Connector for SAP R/3 on Windows for a UNIX-Based Siebel Enterprise on page 57
Modify the SAP configuration file (see Modifying SAP Configuration Files on page 22).
Modify Siebel configuration files such as siebel.cfg, uagent.cfg, and tools.cfg (see Modifying
Siebel Configuration Files for Customized Integrations on page 25).
21
Configure components. Enable component groups and components, and set parameters (see
Component Configuration on page 36).
Configure for MQSeries (if you desire to use MQSeries) (see Configuring the SAP Connector for
Use with IBM MQSeries on page 43).
Configure SAP for standard integrations (see SAP Configuration for Standard Integrations on
page 48).
Configure the Siebel application for standard integrations (see Siebel Configuration for Standard
Integrations on page 49).
Activate workflows (see Activating Workflows in the Standard Integrations on page 56).
22
There are two types of entries in the file that are important for connection to SAP. The first is
indicated by a TYPE=A entry in the saprfc.ini file destination entry. This type of destination entry
indicates that the external application (Siebel Business) connects as a client to the SAP R/3
Application Server. The BAPI adapter uses this type of entry. The second destination type is indicated
by a TYPE=R entry in the saprfc.ini file destination entry. This type of destination entry indicates that
the external application (Siebel Business) connects as a server to the SAP R/3 Application Server.
The tRFC BAPI Receiver uses this type of entry.
Search for the text TYPE=A to find the sample TYPE=A entry.
This entry has the following required lines:
DEST=DEST_NAME
TYPE=A
AHOST=HOST_NAME
SYSNR=XX
Edit ASHOST= to replace HOST_NAME with your SAP application server host name.
Be sure to set the RFC_INI environment variable to point to the saprfc.ini file.
See your SAP documentation for more information on this type of entry.
23
Search for the text TYPE=R to find the sample TYPE=R entry.
This entry has the following required lines:
DEST=DEST_NAME
TYPE=R
PROGID=PROGRAM_ID
GWHOST=HOST_NAME
GWSERV=sapgwXX
Edit the DEST= line to replace the DEST_NAME with your own destination name.
Any name can be used, but do not use spaces. You use this name as the value of the
SAPRfcDestEntry component parameter for the tRFC BAPI Receiver component.
Edit the PROGID= line to replace PROGRAM_ID with the your program ID.
This can be any name you decide upon, but it must be defined within SAP as part of the RFC
Destination defined in SAP transaction sm59; see Creating RFC Destinations in SAP on page 30.
Edit the GWHOST= line to replace HOST_NAME with the SAP gateway server host name.
Edit the GWSERV= line to replace the sapgwXX with your SAP gateway server name.
Usually it is in this form: sapgw followed by the two-digit system number. For example, your
entry might now look something like this:
DEST=DEV_Inbound
TYPE=R
PROGID=myprogramid
GWHOST=devserver
GWSERV=sapgw00
RFC_TRACE=0
For debugging purposes you may want to set the values of RFC_TRACE or ABAP_DEBUG. For
more information, see Troubleshooting SAP Connection Problems on page 187.
Click the Windows Start button, and then choose Settings > Control Panel > System.
The System Properties window opens.
24
b
3
In Windows 2000, click the Advanced tab, and then click Environment Variables.
Click Set.
Click OK.
Restart Windows.
25
= CHANGE_ME
= CHANGE_ME
= DEST=CHANGE_ME CLIENT=CHANGE_ME LANG=CHANGE_ME
= CHANGE_ME
Replace CHANGE_ME after SAPRfcPassword = with the password for the user name entered.
Replace CHANGE_ME after DEST= with a destination name as defined in a TYPE=A entry of the
saprfc.ini file being used.
Replace CHANGE_ME after LANG= with the login language character (E for English).
Be sure that there are no spaces on either side of the equals signs for DEST=, CLIENT= and
LANG= and use at least one space after each entered value.
Replace CHANGE_ME after SAPCodepage = with the Siebel code page value for your SAP
implementation. You can find this value in Table 10 on page 39.
For example, your entry might look something like this:
[SAPSubsys]
SAPRfcUserName = auser
SAPRfcPassword = apassword
SAPRfcConnectString = DEST=DEV_Outbound CLIENT=555 LANG=E
SAPCodepage
= CP1252
To test new or modified workflows using the Business Service Simulator or the Workflow Simulator
in a Siebel client, modify your Siebel client configuration file.
Your SAP system administrator must create a CPIC user for your connection to SAP. The same user
name used for your Siebel Tools configuration can be used here also.
NOTE: The Siebel Client configuration file is used only by the Siebel Mobile Web Client running in
disconnected mode. As such the following procedure applies only to the use of this client in this
mode.
26
Open the appropriate configuration file for your Siebel client application.
The name depends upon the application you use. For example, the sales application uses
siebel.cfg and the call center application uses uagent.cfg.
=
=
=
=
CHANGE_ME
CHANGE_ME
DEST=CHANGE_ME CLIENT=CHANGE_ME LANG=CHANGE_ME
CHANGE_ME
Replace CHANGE_ME after SAPRfcPassword = with the password for the user name entered.
Replace CHANGE_ME after DEST= with a destination name as defined in a TYPE=A entry of the
saprfc.ini file being used.
Replace CHANGE_ME after LANG= with the login language character (E for English).
Be sure that there are no spaces on either side of the equals signs for DEST=, CLIENT= and
LANG= and use at least one space after each entered value.
Replace CHANGE_ME after SAPRfcDestEntry = with the destination name of a TYPE=R entry in the
saprfc.ini file.
For example, your entry might look something like this:
[SAPSubsys]
SAPRfcUserName
SAPRfcPassword
SAPRfcConnectString
SAPRfcDestEntry
=
=
=
=
auser
apassword
DEST=DEV_Outbound CLIENT=555 LANG=E
DEV_Inbound
If you intend to work with IDOCs in the Workflow Simulator, then add the following line to the
end of the [SAPSubsys] section:
SAPSenderPrtnrNum = Logical system name
where the logical system name is the name of your external system as configured in SAP for ALE.
Define this logical system name in SAP. For more information, see Configuring ALE/IDOC
Connectivity on page 28.
27
Siebel-to-SAP integration uses the Siebel Server Request Broker to make requests to the Business
Integration Manager. For this reason, you may need to add Server Request Broker information to
your configuration file. For more information, see the Overview: Siebel Enterprise Application
Integration guide.
Figure 2.
28
You build logical systems from the bottom up. After you create a name for the logical system, then
create an RFC Destination as shown in Figure 2. The most important part of the RFC Destination is
the Program ID, as this value must exist in the TYPE=R destination entry of the saprfc.ini file. SAP
uses the program ID to identify an external server and associate it with the logical system name.
After you have defined the RFC Destination, create a port definition and a Partner Profile definition.
These are part of the logical system definition. These can be created manually or can be
automatically generated by SAP if an SAP Distribution Model is created. The Distribution Model
defines the list of Message Types that can be passed between any two logical systems. This
information is used to create Partner Profiles in SAP. These Partner Profiles contain information for
communication with an external system where data is transported outbound from SAP (Outbound
Parameters) as well as information for communication with an external system where data is
transported inbound to SAP (Inbound Parameters).
Table 8 describes the Outbound Parameters.
Table 8.
Outbound Parameters
Parameter
Description
Message Type
Idoc Type
Seg.release in
IDoc type
Packetsize
Processing Type
Immediate or collect
Port
Table 9.
Inbound Parameters
Parameter
Description
Message Type
Processing Code
Together with the Message Type is used to determine how the IDOC is
processed.
Type of Processing
To interface to SAP using ALE, you must create a logical system in SAP with all of its associated
information. The process in this document can be used to create a logical system and to perform the
minimum amount of configuration necessary to work with the Siebel ALE Interfaces. Depending upon
your own configuration requirements you may need to modify these steps accordingly.
29
The SALE transaction handles all ALE configuration. This transaction takes you to the portion of the
SAP Implementation Guide (IMG) that is relevant for ALE. The following procedures start with the
SALE transaction. These procedures apply to SAP R/3 4.6C. Other versions of SAP differ slightly, but
the SALE transaction still exists and the basic functions are available.
Starting from the SALE transaction, select Sending and Receiving Systems > Logical Systems >
Define Logical System.
An SAP alert box warns you the table is client-independent.
Click the New Entries button and complete the following fields:
Click Save.
The Enter Change Request window opens.
Click Save.
Click the left arrow button until you return to the Distribution ALE view.
NOTE: Another logical system must also be created and associated with the SAP Client. This may
already exist in your implementation. Its name generally includes the client number. If it does not
exist, create one using the preceding steps. After obtaining the client number, select Sending and
Receiving Systems > Logical Systems > Assign Client to Logical System from SALE to assign it to the
appropriate SAP Client. This logical system is referred to as the SAP Client Logical System, while the
logical system you create to represent the Siebel applications is referred to as the External Logical
System.
30
From SALE, select Sending and Receiving Systems > Systems In Network > Define Target
Systems for RFC Calls (SAP transaction SM59).
Click the folder icon for the TCP/IP connections RFC Destination to expand it.
Click Create.
The RFC Destination window opens.
RFC Destination. Add an RFC destination name (suggestion: use the external system logical
system name). If the names match, you can generate Partner Profiles for the logical system.
If the names do not match you must manually create Ports and Outbound Parameters in your
partner profile.
Click Save.
The RFC Destination CONNECTION_NAME window opens.
Click Registration.
Type the Program ID for the name of the external program to which you want SAP to connect.
This is the same Program ID which you entered in the saprfc.ini file under the TYPE=R destination
entry. See the SAP Online Help for more information about Program ID.
If your external program is running and successfully registered to the SAP gateway, clicking the
Test connection button returns ping times between the R/3 system and your program.
If your program has not connected successfully to the SAP gateway, then you get an error
message.
NOTE: The program name is case sensitive, and if not defined correctly, IDOCs may not reach
their destination. Also, after these parameters have been set, clicking other buttons may erase
the settings. Use caution when in change mode in this window.
Click Save.
31
From SALE, select Modeling and Implementing Business Processes > Maintain Distribution Model
and Distribute Views.
The Display Distribution Model window opens.
Click the Switch between Display and Edit Mode button to go into edit mode.
The Change Distribution Model window opens.
If you have not previously created a model that you can add to, click Create Model View. If you
already have a model created that you wish to add to, skip to Step 6.
The Create Model View window opens.
Technical Name. Enter a name for this model view, such as SIEBMODEL.
Highlight the model view created and click Add Message Type.
The Add Message Type window opens.
Description
Sender
Enter the logical system that is sending IDOCs. If the IDOC Message Type
may be sent from the SAP system, this would be the SAP Client logical
system name. If the IDOC Message Type may be sent from the Siebel
application, this is the external logical system you created earlier.
Receiver
Enter the logical system that is receiving IDOCs. If the IDOC Message
Type may be received by SAP, this would be the SAP Client logical system
name. If the IDOC Message Type may be received by the Siebel
application, this is the external logical system you created earlier.
Message Type
Sender
Receiver
DEBMAS
SAP Client LS
External LS
DEBMAS
External LS
SAP Client LS
MATMAS
SAP Client LS
External LS
ORDCHG
SAP Client LS
External LS
32
Click Add Message Type again as necessary to set all message types used.
Repeat Step 6 through Step 8 for each message type and sender/receiver pair.
10 Click Save.
11 Click the left arrow button to exit.
From SALE, select Modeling and Implementing Business Processes > Partner Profiles and Time
of Processing > Generate Partner Profiles.
Enter Model Name in the Model View field and External Logical system name in the Partner
System field.
Outbound Parameters Packetsize. Set to 1 initially, this may be changed later for performance
reasons.
Outbound Parameters Output Mode. Set to Transfer immediately, this may be changed later
for performance reasons.
Inbound Parameters Processing. Set to trigger immediately, this may be changed later for
performance reasons.
If you are using the Standard Integrations, after generating partner profiles check that the
Outbound Parameters for the generated partner profiles use the correct IDOC Types.
From SALE, choose Modeling and Implementing Business Processes > Partner Profiles and Time
of Processing > Maintain Partner Profiles Manually.
The Partner profiles window opens.
Select the LS category and find the logical system name for which you generated a partner
profile.
Select this logical system name.
33
Select each outbound parameter and edit it making sure that the following IDOC Types are used
for each corresponding message type:
MATMAS = MATMAS03
DEBMAS = DEBMAS05
ORDCHG= ORDERS05
NOTE: If your SAP System version is not 4.6C, change the Seg. Release in IDoc Type field to the
value 46C so that IDOCs sent from the SAP system match the integration objects created in
Siebel.
To create ports
1
From SALE, select Sending and Receiving Systems > Systems in Network > Asynchronous
Processing > Assigning Ports > Define Port.
The Ports in IDOC processing view opens.
Click the check mark button through any informational pop-up message boxes.
The Creating a tRFC port view opens.
Version. You may select either version. For the Siebel Connector for SAP R/3, V7.x, the
default is 4x. The Siebel Connector for SAP R/3 V6.x adapter supports only the 3.x version.
RFC Destination. The name of the logical destination (TCP/IP connection) created earlier
(from SM59). Click the possible entries button to view the list of values for the logical system.
Click Save.
After you have created a port, you can create partner profiles.
34
From SALE, choose Modeling and Implementing Business Processes > Partner Profiles and Time
of Processing > Maintain Partner Profiles.
The Partner profiles window opens.
Partn.number. The receiving logical system name created earlier in the configuration.
In the Post processing: permitted agent tab, complete the following fields:
Click Save.
Message type. Enter MATMAS for Material master records, DEBMAS for Customer master
records, or ORDCHG for Order Update master records.
Receiver port. Enter the name of the previously created port for your logical system.
Packet size. Enter the number of IDOCs per package, for example 20.
NOTE: This field does not appear until after you have saved.
Output mode. Choose to either transfer IDOCs immediately or collect them and send them
all at once.
NOTE: Entering a value into the Packet Size field is necessary only when all IDOCs are being
sent at once. If you choose to transfer an IDOC immediately, only one IDOC will be sent,
regardless of the value in the Packet Size field.
IDOC type/Basic type. Enter the IDOC that is associated with the following message types:
MATMAS = MATMAS03
DEBMAS = DEBMAS05
ORDCHG = ORDERS05
35
Seg.release in IDoc type. If your SAP system version is not 4.6C, then enter the value 46C
here to make sure that the IDOCs sent from SAP to Siebel match the integration objects in
Siebel.
10 In the Post processing: permitted agent tab, complete the following fields:
11 Click Save.
12 Click the left arrow to return to the Partner Profiles window.
13 Repeat Step 7 through Step 12 to add the DEBMAS and ORDCHG IDOC message types.
14 Click Create Inbound Parameters.
The Partner Profiles: Inbound Parameters window opens.
15 Partner Profiles: In the Inbound Parameters window, complete the following fields:
Process code. The SAP code behind the processing of this message type: DEBMAS = DEBM
16 In the Post processing: permitted agent tab, complete the following fields:
17 Click Save.
Component Configuration
The following objects must be configured:
Server components
The component groups are enabled by default. Check to make sure that the following component
groups have been enabled:
SAP Connector
36
If these component groups are not enabled, do so using the server manager line mode information
(for example, Enable compgrp EAI and Enable compgrp SAP). By doing this, both the EAI and SAP
Connector component groups are enabled.
Also make sure that the following two components within the SAP Connector component group are
enabled and online:
If these components of the SAP Connector component group are not enabled by default, then enable
them using the server manager line mode information (for example, Enable comp BusIntMgr or
Enable comp BAPIRcvr).
For information on enabling component groups, see the Siebel System Administration Guide. You
may enable component groups at server installation. Check the EAI and SAP component groups when
prompted during Siebel server installation. For more information on enabling the server component
groups in the installation, see the Deployment Planning Guide.
Set the SAPRfcUserName parameter for the Business Integration Manager component. You can
use either of two methods:
Method 1. Within the Siebel client, navigate to the Component Parameters form and set the
value of the parameter to the user name your administrator has created.
Method 2. Using the Server Manager line mode interface, use the change param command
to set the value of the parameter to your SAP user name. For example: change param
SAPRfcUserName=auser for comp BusIntMgr.
More information on how to set component parameters can be found in the Siebel System
Administration Guide.
Set the SAPRfcPassword parameter for the Business Integration Manager component to the SAP
password for the user created.
Set the SAPRfcConnectString parameter for the Business Integration Manager component.
37
Set the SAPSenderPrtnrNum parameter for the Business Integration Manager component to the
SAP logical system name that defines your external system to SAP.
This name was entered into SAP during ALE configuration, see Configuring ALE/IDOC
Connectivity on page 28.
Set the SAPRfcDestEntry component parameter for the SAP tRFC BAPI Receiver component value
to the destination name of a TYPE=R entry in the saprfc.ini file.
Within the Siebel Client navigate to the Component Parameters form and set the value of the
parameter.
38
Occasionally, the ISO code page will not match the Microsoft code page. The behavior of the SAP
Connector in such cases is described in Appendix C, SAP Code Page Mappings.
Table 10.
Siebel Value
Description
CP1252
1100
ISO-8859-2
1402
ISO-8859-5
1500
CP1254
1610
CP1253
1700
CP1255
1800
CP932
8000
SAP Shift-JIS
CP950
8300
SAP Taiwanese
CP936
8400
SAP Chinese
CP949
8500
SAP Korean
CP874
8600
SAP Thai
39
When interfacing to an SAP implementation based on a single code page, all data that is transported
to and from SAP is transported in a single code page. When data is sent from the Siebel database to
SAP through the BAPI Adapter, the adapter retrieves the code page from SAP automatically after
connecting. It then looks up the SAP code page value in the SAP Code Page EAI Value Map and uses
the corresponding Siebel code page value to translate all data passing between the Siebel application
and SAP.
When data is sent from SAP to the Siebel application through the BAPI Receiver, the receiver
retrieves the code page value from SAP each time a packet of data is sent from SAP. It then looks
up the SAP code page value in the SAP Code Page EAI Value Map and uses the corresponding Siebel
code page value to translate all data it receives from SAP from the SAP code page to Unicode.
The interface to a Multi-Display Multi-Processing SAP implementation is similar. The difference is that
the code page that is automatically retrieved is dependent upon the login language of the user in the
SAP implementation. When using the BAPI adapter, the login language defined in the parameter
SAPConnectString is used to determine the code page. When using the BAPI Receiver, the login
language of the user responsible for the send of the data to the receiver is used. This means that
the BAPI Receiver may receive packets of data in different codepages depending upon who sent the
data.
Although not necessary, you can override the automatic retrieval of the SAP code page from SAP by
setting the SAPCodepage parameter to a Siebel Value as defined in Table 10 on page 39. For the BAPI
Adapter, set this parameter on the BusIntMgr component just as you would set the parameters
SAPUserName, SAPConnectString, and SAPPassword. For the BAPI Receiver set this parameter on
the BAPIRcvr component just as you would set the SAPRfcDestEntry parameter for this component.
Because the codepages are retrieved automatically, the BAPI Adapter can interface to multiple SAP
implementations that use different codepages. Starting with Siebel v7.5, the BAPI Adapter can
dynamically change its connection and its code page. To switch the connection from one to another,
the parameters SAPUserName, SAPConnectString and SAPPassword must be set as input arguments
to the BAPI Adapter business service call made from the workflow. The BAPI Adapter then uses these
parameters instead of those set at the BusIntMgr component level. When a call is then made to the
BAPI Adapter that is for a different SAP implementation (or different user or language in the same
SAP implementation) than the previous call, the old connection to SAP ends and a new connection is
made. When the new connection is made, the code page is retrieved from the new connection and
data is processed using the new code page.
You can customize the handling of errors that occur during code page conversion by using the
SAPIgnoreCharSetConvErrors parameter. When this parameter is set to True, errors in code page
conversion are handled by substituting a question mark (?) for characters that cannot be converted.
This parameter can be set on the BusIntMgr component and also on the BAPIRcvr for BAPI Adapter
and BAPI Receiver usage respectively.
Siebel Tools
When using Siebel Tools the code page must be set in the tools.cfg file. This is because the EAI Value
Map information is not available in the Siebel Tools environment. To set the value, follow the
instructions for modifying the tools.cfg file in Modifying SAP Configuration Files on page 22.
40
MQSeries
For MQ Series, the code page must be explicitly set, therefore only single code page SAP
implementations are supported. For transport of IDOCs from the Siebel application to SAP, set the
SAPCodepage parameter on the BusIntMgr component to a Siebel code page value. For transport of
IDOCs from SAP to the Siebel application, set the SAPCodepage parameter on the
SAPIdocAMIMqRcvr component.
Checking Connectivity
When you have completed the installation and configuration, you can do some simple tests to see if
your basic connection information is correct. These tests do not exercise all possible functionality,
but they can tell you if your connection information for SAP is correctly defined. These tests are:
SAPRfcConnectString
SAPRfcUserName
SAPRfcPassword
In the Value field, enter their values as they would have been configured in the Siebel
Configuration file or as set for the BusIntMgr component.
NOTE: In the Standard Integration workflows these parameters are set on the BusIntMgr server
component, not within the workflow itself. They need to be set within the workflow because they
are running within the workflow simulator. If you are using the Siebel Mobile Web Client the
values can also be set in the Siebel Configuration file for the client.
Execute the workflow using the workflow simulator. For more information on running the
workflow simulator, see the Siebel Business Process Designer Administration Guide.
If no errors are displayed, the connection information is correct.
41
Make sure that you have a project checked out that you can add the new integration object into.
In the top drop-down list, choose the project into which you want to add the integration object.
In the second drop-down list, choose the name of the wizard used to create the type of
integration object you want. In this case, choose EAI SAP IDOC Adapter Wizard.
42
Installation and Configuration Configuring the SAP Connector for Use with IBM
MQSeries
Click Next.
Siebel Tools displays a list of IDOCs in the drop-down list. If you receive an error message, some
connection information is not correctly defined in your saprfc.ini or tools.cfg file. Appendix D,
Troubleshooting Siebel Connector for SAP R/3 has more information on troubleshooting
connection problems.
Click Cancel if the test was successful, or click through the error message information to exit the
wizard.
43
Installation and Configuration Configuring the SAP Connector for Use with IBM
MQSeries
Description
Queue Manager =
gatewayhost =
gatewayservice =
programid =
NOTE: A program ID is an identifier used by SAP to recognize a specific server program. This
identifier is defined as part of the RFC Destination in SAP and is tied to your logical system name.
The program ID you used to configure ALE for your SAP implementation needs to be entered
here. For more information, see Creating RFC Destinations in SAP on page 30.
Description
receivingpartner =
edi_mestype =
outboundqueuemanager =
outboundqueue =
SMQ_OUTBOUND_QUEUE
HostName =
UserID =
Password =
SAP password
Default =
Yes
44
Installation and Configuration Configuring the SAP Connector for Use with IBM
MQSeries
Description
client =
client number
user =
user name
language =
language code
password =
password
sysnbr =
hostname =
transactionqueue =
queuemanager =
badmessagequeue =
inboundqueue =
For inbound to the Siebel application, enter the following line after the command prompt:
Smqso -iout.ini
NOTE: For inbound to the Siebel application, the command links SAP to the Siebel Receiver
Server Component, and passes data from SAP to the Siebel application.
For outbound from the Siebel application to SAP, enter the following line after the command
prompt:
Smqso -iin.ini
NOTE: For outbound from the Siebel application, a sample workflow is provided. This workflow
invokes the EAI SAP IDOC MQ AMI Adapter and from that adapter invokes EAI MQSeries AMI
Transport Adapter to send data to MQ. The data then passes through MQ Link to SAP.
45
Installation and Configuration Configuring the SAP Connector for Use with IBM
MQSeries
When you have established the MQSeries queues, policy, services and MQLink, you can use the Siebel
SAP IDOC AMI Receiver for MQSeries for inbound integration, and use the sample workflow provided
for outbound integration. The outbound sample workflow uses EAI SAP IDOC MQ AMI Adapter and
EAI MQSeries AMI Transport to send data from the Siebel application to SAP.
ReceiverConnectionSubsystem
ReceiverDataHandlingSubsystem
Log in to server manager line mode (you may also use server administration).
Service name
Use the command, list named subsystem, to make sure the subsystem is created.
subsystem name
The SAP IDOC AMI Receiver can be used to trigger workflows upon the receipt of an IDOC just as
the BAPIRcvr does. The receiver is configured by default to allow the invocation of the Standard
Integration inbound workflows: Account - Send or Receive SAP 46C Customer (DEBMAS05), Product
- Receive SAP 46C Material (MATMAS03), and SAP 46C Order Status (IDOC 4x).
46
Installation and Configuration Configuring the SAP Connector for Use with IBM
MQSeries
Modify the standard Account Integration workflow Account - Submit SAP 46C Customer:
Locate the Account - Submit SAP 46C Customer workflow, and then click Revise.
In the workflow steps applet for Update SAP Customer replace the value Account - Send SAP 46C
Customer with Send46CIdoc_UpdateSAPCustomer_MQAMI.
Repeat Step d and Step e for the Update Sales Area Info step.
Right-click and select Show Input Arguments, change the value of the Connection Subsystem
argument from SAPSubsys to a name of your own choice, for example MQSenderSubsys.
Activate workflows.
Create the connection subsystem that you named in the Connection Subsystem argument.
Log in to server manager line mode (you may also use server administration).
47
Use the list named subsystem command to make sure the subsystem is created.
Now when you send an account to SAP from the Siebel application, it invokes the sample
workflow.
Sales area
48
Based on your business scenario for Pricing, you might want to enter price relevant data like Payment
terms and Incoterms in your Siebel Quote /Order. Make sure that these data are maintained in the
EAI value maps.
On the shipping screen, fill out the Delivering Plant field (KNVV-VWERK).
Define the partner functions Sold-to party (SP), Bill-to party (BP), Payer (PY), and Ship-to party
(SH). By default, the sales order mappings between Siebel applications and SAP R/3 assume a
single Payer.
For materials data, you must define a plant, sales organization, and distribution channel.
49
50
Table 11.
SAP
Configuration
Data
LOV Type
Blocking
Reason for
Billing
SAP_SO_
HEADER_
BILL_BLOCK
SAP
Description
example:
Calculation
Missing
SAP Code
example: 01
Customer
Account Group
ACCOUNT_
GROUP_TYPE
SAP
Description
example:
Sold to
Party
SAP Code
example:
0001
Delivery Blocks
SAP_SO_
HEADER_
DELIV_BLOCK
SAP
Description
example:
Credit
Limit
SAP Code
example: 01
Sales
Organization
SAP_SALES_
ORG
SAP
Description
example:
Europe
SAP Code
example:
0010
Distribution
Channel
SAP_
DISTRIBUTION
_CHANNEL
SAP
Description
example:
Retail
SAP Code
example: 10
Display
Value
Language
Independent
Value
SAP Reference
51
Table 11.
SAP
Configuration
Data
LOV Type
Division
SAP_DIVN_CD
SAP
Description
example:
Software
SAP Code
example: 10
Plant
SAP_PLANT
SAP Code
example:
0010
SAP Code
example:
0010
Table 12.
Display
Value
Language
Independent
Value
SAP Reference
SAP Configuration
Data
LOV Type
SAP Reference
Header Delivery
Status
SAP_SO_HEADER_DELIV_STATUS
SAP_SO_ITEM_DELIV_STATUS
Overall Status
SAP_SO_OVERALL_STATUS
These definitions must be made consistent with your SAP configuration data. Compare these
definitions with the values in SAP and make changes as required. Table 12 contains an SAP Reference
column that you may use to find the correct SAP configuration data in your implementation. This
column contains an SAP transaction code in which you can view the configuration data as well as a
reference section to the SAP Implementation Guide (IMG) where applicable. This information is
correct for SAP R/3 4.6C. It may vary in other SAP versions.
To make sure the required SAP entities are copied into the Siebel database, you should synchronize
the LOV types.
52
In the Siebel client, navigate to Administration - Data and select List of Values.
The following figure shows the List of Values list with its Type, Display Value, Language
Independent Code, Language Name, Parent LIC, Order, Active, Translate, Multilingual and
Replication Level fields.
Query for each LOV Type in the List of Values list to see predefined values.
Navigate to the SAP Reference area using an SAPGui client application to see the values defined
in SAP.
If differences exist between the definitions in the Siebel repository and SAP, correct or add
entries in the Siebel repository as necessary.
53
You need to add SAP configuration data to your Siebel application. Table 13 contains an SAP
Reference column that you can use to find the correct SAP configuration data. This column contains
an SAP transaction code where you can view the configuration data and a reference to the SAP
Implementation Guide (IMG), where applicable. This information is correct for SAP R/3 4.6C. It may
vary in other SAP versions.
Table 13.
SAP
Configuration
Data
Siebel
Integration
Application Data
Plants
Organization SAP
Plants
Sales Area
Organization SAP
Sales Area
SAP Reference
To complete the integration administration, map the SAP sales areas to the Siebel organizations.
54
In SAP, navigate to the SAP Reference listed for Sales Area in Table 13.
In the Siebel application, create one organization for every sales area in SAP.
Assign the SAP Sales Organization, SAP Distribution Channel, and SAP Division to the
organization.
Name, SAP Sales Organization, SAP Distribution Channel, and SAP Division are required entries and
should be unique.
55
In SAP, navigate to the SAP Reference listed for SAP Plants in Table 13.
In the Organization SAP Plants list, add a new record for the plant to assign to this organization.
To activate a workflow
1
Query for all SAP Workflows by querying for those whose names fit the pattern *SAP*46C*.
Select each workflow returned by the query, and then activate it.
56
Installation and Configuration Installing Siebel Connector for SAP R/3 on Windows for
a UNIX-Based Siebel Enterprise
For more information on activating workflows, see the Siebel Business Process Designer
Administration Guide.
To install Siebel Connector for SAP R/3 for mixed operating system enterprises
1
Install the Siebel Gateway Name Server and Siebel Server on a UNIX environment.
For UNIX installation instructions, see the Siebel Installation Guide for UNIX: Servers, Mobile
Web Clients, Tools guide.
NOTE: Complete all UNIX server installations before installing on any Windows-based servers.
When prompted for Co-located Siebel Gateway Name Server, clear the check box for Yes.
Set Gateway Name Server Hostname to the name of the Gateway Name Server name and the
Gateway Name Server port name, using a colon (:) as a separator. Example:
GatewayServer1:GatewayPort.
57
Installation and Configuration Installing Siebel Connector for SAP R/3 on Windows for
a UNIX-Based Siebel Enterprise
If you use mobile clients, then modify the .cfg files so they direct the request server to a
Windows-based Siebel server.
In the Siebel application, choose Navigation > Site Map > Administration - Server Configuration:
58
Standard Integrations
The Siebel Connector for SAP R/3 has the following standard integrations:
59
To create accounts:
Click New.
To edit accounts:
Select an account.
60
Click the Back Office (SAP) View Tab. If the BackOffice (SAP) Tab is not visible, access it from the
Site Map.
The SAP Account form appears. The following figure shows the SAP Account form. In the Back
Office (SAP) view tab, the SAP Account Sales Area list displays details for the selected record
such as Organization, SAP Sales Organization, SAP Distribution Channel, SAP Division Code, Sold
To Party, Ship To Party, Bill To Party, Payer, and Status.
Fill out the account information including the mandatory Customer Account Group.
Choose from Sold-To Party, Ship-To Party, Bill-To Party, or Payer.
Record the organization you want to assign to this account. This populates the appropriate SAP
Sales Area.
61
Product/Material Integration
One standard integration exists for integrating SAP Materials and Siebel products. The product
information in Siebel applications is based on the SAP Sales Views for material master data.
To execute the Material to Product Data Flow, first make sure that you have completed the
installation steps as described in Chapter 3, Installation and Configuration. In particular, be sure that
you have completed all ALE configuration for the message type MATMAS flowing outbound from SAP,
checked your tRFC BAPI Receiver connectivity, and entered sales areas in the Siebel database.
The flow of IDOCs from SAP can be triggered in many ways. A simple way to send a Material IDOC
from SAP is to use the transaction BD10.
If a product in SAP is assigned to a particular SAP Sales Organization/Distribution Channel (no
division is specified) then this product is automatically released for existing sales areas in this
combination of Sales Organization/Distribution Channel.
If a Division is assigned in the SAP Material Master, the product is released for the corresponding
Organization (SAP Sales Area) in the Siebel application.
From this transaction enter the Material ID, Message Type MATMAS and your external logical
system and then click Execute. This sends a MATMAS03 IDOC. You can view the new product created
under the Products list. To see the product organization and plant assignments navigate to
Organization and Inventory Location. Figure 3 shows the Products form with the Organizations view
tab active. This displays Organization, Primary Plant, Unit of Measure, Minimum Order Units,
Currency Code, Orderable, Status, SAP Sales Organization, and SAP Distribution Channel.
Figure 3.
NOTE: Standard Integrations have been created for use with SAP R/3 4.6C. The Business Service
Data Map expects to receive a 4.6C MATMAS03 IDOC. If you are using a different version of SAP, this
mapping may fail. If you are using a version of SAP newer than 4.6C, you can send a 4.6C IDOC to
the Siebel application by setting the version to 46C in the appropriate Outbound Parameter for the
Partner Profile you have created for MATMAS. You may need to modify this Standard Integration if
you are unable to send a 4.6C IDOC to the Siebel application.
62
Validate Order
This updates information on Credit Status Of Customer, Billing Block, Delivery Block, Pricing
Information, and Delivery Proposal/Availability. No orders are created on the SAP side, but Siebel
data is updated with the preceding information from SAP.
Place Order
When you are satisfied with the information in your Sales Order, you can submit sales orders to SAP
by clicking Place Order (on the SAP Line Item view). This submits your Siebel sales order to SAP and
updates Pricing Data, Delivery, Status information, and SAP Order Number. This may be different
from what you got with Validate if there is a time difference between validating and submitting the
sales order. After you submit a Siebel sales order to SAP you cannot resubmit the same Siebel sales
order to SAP again. To avoid inconsistencies between SAP Sales Order and Siebel Sales Order,
implement the state model to prevent any changes in the Siebel sales order after resubmission. For
more information on the state model, see the Siebel Business Process Designer Administration
Guide. After submitting an order to SAP you can still make changes in SAP using the Get Status
button (invoking Get Status Data flow). You can also automate the order status update process by
configuring SAP to dispatch IDOCs.
63
Enter your sales information in the form, review entries, and then save the record.
Click the Payments view tab and scroll down to the Payment Detail - Credit Card applet.
Expiration Month
Expiration Year
Click the Line Items (SAP) view tab. If this tab is not visible in the current view, access it from
the site map.
The following figure shows the Line Items (SAP) view tab with the following fields in a form:
Order #, Account Order #, Status As Of, Submit Date, Sales Area, Ship to Account, Ship to
Account Location, Delivery Block, Bill to Account, Bill to Account Location, Billing Block, Pricing
Date, Credit Status, Partial Ship, Sub Total, and Message (SAP).
64
Enter line item data, review the entries, then save the record.
To get more detailed Delivery Information for a selected line item, navigate to the Schedule Line
view tab.
Sold-to party ABCD not maintained for sales area XXX YY ZZ.
Check Accounts > Back Office (SAP) to see if the account / primary organization combination
selected in the order is there.
Partner Types. The Siebel Connector for SAP R/3 supports Sold To Party, Ship to Party, Bill to Party,
and Payer Partner types for sales orders and the data flows are preset for these fields. If you require
additional partner types, make sure to modify the data flow maps accordingly.
Get Status. Get Status does not update the Billing Block and Credit Status fields, which are only
updated by Validate Data flow.
65
To validate quotes
1
Press auto order to convert the Siebel quote to a Siebel order when you are satisfied with the
Delivery Proposal and pricing.
Enter information in the list, review entries, and then click Save.
The following figure shows the Quotes list and its fields: Quote #, Revision, Name, Opportunity,
Created, Status, Active, and Price List.
Create a new Payment Line record with credit card as the method of payment.
66
Card Name
Card Number
Card Holder
Expiration date
Enter line item data, review the entries, then save the line item.
To Create a Siebel sales order, click on the orders tab and then click on the Sales order.
All orders generated for the selected quote should be visible in this view. Drilling down on the
latest order takes to you to the order screen. Here you can choose the line items (SAP) tab and
validate and create SAP orders as described in the previous section.
To get more detailed delivery information for a selected line item, navigate to the Schedule Line
tab.
To execute the Siebel/SAP price integration make sure you have completed the installation steps as
described in Chapter 3, Installation and Configuration.
67
For standard integration, the Siebel application uses SAP to calculate the tax. To send freight charges
to SAP, click the Total view tab, and enter the Freight Costs into the Shipping Charges field.
Condition Type. Table 14 and Table 15 show the default field mappings used when the Siebel
application is the price master. You may need to change them depending on your SAP configuration
settings.
Table 14.
Mapping Siebel Fields and Values to SAP BAPI Fields When the Siebel Application Is
Price Master
Data Flow
Submit
ORDER_CONDITIONS_IN - COND_TYPE
Submit
COND_VALUE
Submit
ORDER_CONDITIONS_IN - COND_TYPE
Item Price
Submit
COND_VALUE
Simulate
ORDER_ITEMS_IN-CD_TYPE3
Simulate
ORDER_ITEMS_IN-CD_VALUE3
Simulate
ORDER_ITEMS_IN-CD_TYPE2
Item Price
Simulate
ORDER_ITEMS_IN-CD_VALUE2
The default mappings in Table 15 are only valid in Simulate Data Flow. After you submit an order to
SAP, SAP becomes the pricing master.
Table 15.
Mapping SAP BAPI Fields to Siebel Fields and Values When the Siebel Application Is
Price Master
Siebel Field/Value
ORDER_ITEMS_OUT-SUBTOTAL_5
Tax Amount
ORDER_ITEMS_OUT-NET_VALUE
GETSTATUS. When you submit a sales order, SAP takes the ownership of the price data. Any
changes you make to the pricing relevant data is updated in the Siebel application.
68
Table 16.
Mapping Siebel Fields and Values to SAP BAPI Fields When SAP Is Price Master
Siebel Field/Value
Data Flow
Simulate
ORDER_ITEMS_IN-CD_TYPE2
Submit
ORDER_CONDITIONS_IN - COND_TYPE
Table 17.
Mapping SAP BAPI Fields to Siebel Fields and Values When the SAP Is Price Master
Data Flow
Siebel Field/Value
ORDER_ITEMS_OUT-SUBTOTAL_4
Simulate
Freight Amount
ORDER_ITEMS_OUT-SUBTOTAL_5
Simulate
Tax Amount
ORDER_ITEMS_OUT-NET_VALUE
Simulate
Get Status
Get Status
Freight Amount
Get Status
Tax Amount
69
You need to perform some customization in SAP to send the IDOC, ORDERS05, to Siebel Connector
for SAP R/3 whenever there is a change in an order, or new delivery is created or modified. You can
also send a test ORDERS05 IDOC using SAP transaction we19. Siebel Connector for SAP R/3 receives
the ORDERS05 IDOC and invokes the Get Status Dataflow for the order sent. As this process is based
on the Get Status data flow for sales orders, the limitations of the Get Status data flow are applicable
to this process as well.
Specify a date range using the View Data - From and View Data - To fields.
Specify the primary SAP Sales Area using the Organization field.
The Import option obtains the order details of the selected order (from the View Orders option) and
creates a Siebel order.
70
Click Import.
The Siebel order number is assigned to the SAP order.
71
72
Customizing Integrations
To augment the standard integrations, you may want to modify them or create your own Custom
Integrations between Siebel applications and SAP. This chapter describes the process of modifying
standard integrations and creating custom integrations.
This chapter includes the following topics:
Modifying Standard and Creating Custom Integrations on page 73
Modifying Standard Integration Interfaces on page 74
Defining Your Business Interface on page 83
Making Necessary Siebel Application and SAP R/3 Customizations on page 91
Building the Interfaces on page 92
Testing the Interface on page 107
Determine the appropriate SAP interface and identify appropriate BAPIs, RFCs, or IDOCs to use.
Determine the data mapping between the Siebel business object and the SAP data object.
Making Necessary Siebel Application and SAP R/3 Customizations on page 91.
Extend the Siebel database, business objects, and user interface if necessary.
73
Siebel Sales Order to SAP Sales Order Business Data Flows on page 79
Appendix B, SAP Field Mappings contains tables with field mappings performed by the business
service data maps.
74
Figure 4.
75
There are four different data flows. The main workflow, Account - Submit SAP 46C Customer,
orchestrates these data flows as shown in Figure 5.
Figure 5.
Branches on whether or not the SAP Integration ID (Customer Number) exists in the Siebel
Account. This determines whether or not the account has been sent to SAP:
76
If the Integration ID does not exist, then reserves a customer number for the account in SAP
and sends an IDOC to SAP with the customer information.
If the Integration ID exists, then checks for the existence of this customer in SAP (this action
makes sure that any previously sent customer IDOC has been processed) and updates the
customer in SAP by sending an IDOC. If the customer does not exist in SAP, then error text is
generated.
Figure 6.
In this business data flow, the Siebel Adapter extracts the account information. It passes an
integration object instance containing this data to a business service data map, which converts it into
a BAPI input integration object. Then it passes the integration object instance to the BAPI adapter
and makes a call to SAP to get the customer number. SAP returns the customer ID. The customer ID
then resides in the BAPI Output integration object instance and this is passed to another business
service data map. This business service data map creates a Siebel integration object instance with
the name of the customer ID contained within it and this is used to update the Siebel database.
Figure 7.
77
This business data flow extracts account information from the Siebel database using the Siebel
Adapter and passes this to a Business Service Map in the form of an integration object. This map
transforms the Siebel integration object into an IDOC integration object that is then passed to the
IDOC adapter. The IDOC Adapter must be configured to call the BAPI tRFC adapter business service.
Figure 8.
78
Business Data Flow for the Check SAP Customer Standard Integration
Figure 9.
79
Figure 11. Business Data Flow for Submitting the Sales Order to SAP
80
Figure 12 shows the business data flow for retrieving sales order status. The
GetSAP46CGetDetailedList_BAPIToSiebel map is dependent upon the LOV
SAP_SO_PART_MOVEMENT_TYPE and uses LOV values defined to set Line Item Action Type in the
Siebel application.
Figure 12. Business Data Flow for Retrieving Sales Order Status
The Order - Get Detailed List SAP 46C Order workflow is used both to update order status in the
Siebel application and to get the detailed order information when creating an order.
81
Figure 14. Business Data Flow for the Sales Order Updates Standard Integration
Figure 15. Business Data Flow for Get SAP Order List
82
This flow retrieves the list of orders from SAP when given a customer ID from an account in the Siebel
database. When a Siebel user selects one of these orders, it can be imported from SAP into the Siebel
database. This Business Data Flow is shown in Figure 16.
Figure 16. Business Data Flow for Importing the SAP Order
Right-click the map service selected in Step 3 and choose Edit Server Scripts.
The Scripts view opens.
Choose the procedure you want to modify from the Procedure list control.
This displays one of the scripts that does the mappings.
83
The mapping between the chosen SAP interface and Siebel business object.
Scalar parameters
Tables
Exception strings
Any ABAP function that is defined to be remotely callable is referred to as an RFC function and can
be executed in SAP by an external application such as the Siebel application. Function calls can also
be made from SAP to an external application such as the Siebel application. In that case an RFC
interface that defines the function call must be created in SAP along with ABAP code to invoke the
function in the external application from SAP. The function's implementation must then be in the
external application.
84
The Siebel application takes full advantage of SAP's RFC interfaces that allow you to call functions
within SAP as well as call workflows in the Siebel application from SAP through the RFC interface.
Figure 17 shows the Siebel architecture surrounding SAP's RFC interface. The Siebel application to
SAP data flow consists of a Siebel workflow using the Siebel BAPI adapter to communicate with the
SAP R/3 Application Server. The SAP R/3 Application Server uses an ABAP function or other program
to process the incoming information. The SAP to Siebel data flow consists of the SAP R/3 Application
Server using an ABAP RFC function to send data to the Siebel tRFC BAPI Receiver, which uses a C++
RFC function. The data is then passed to a Siebel workflow to complete the processing.
The Siebel application supports BAPI/RFC calls in either synchronous or transactional mode.
Synchronous calls contains return parameters or table information that is returned to the
caller of the function.
85
BAPI/RFC calls should be kept short in duration so that SAP is not overloaded.
A large number of BAPI/RFC calls performed at the same time can have a very detrimental impact
on SAP performance. The number of calls your system can support will be determined by your
hardware and network configuration and the number of dialog processes in your application
servers.
Tables passed through a BAPI or RFC call are passed as a single block of memory, therefore
passing large tables through the interface is not recommended.
SAP's Transactional RFC (tRFC) interface is used to make transactional BAPI/RFC calls. This
assures the safe and secure transit of data from the calling application to the called application.
BAPI/RFC calls that are not made with tRFC can result in loss of data if a network problem occurs
during the call. For example, if an external application makes a call to an RFC function in SAP R/
3 and the network goes down before the return information is received by the caller, the external
application has no way of knowing if the call completed in SAP or not.
SAP has provided many standard BAPIs. Use a standard BAPI when possible as these interfaces
are supported by SAP and change minimally from version to version. The level of support for a
BAPI or RFC can be determined from the administration area of SAP transaction SE37 for the
specific BAPI or RFC.
Using SAP transaction SE37, you can create your own BAPI/RFC ABAP functions.
BAPIs can be browsed through the SAP transactions SWO1, SWO2, and BAPI.
SAP's Web site provides information through the SAP Interface Repository
http://ifr.sap.com.
A test run of the BAPI or RFC with sample data can be done through the function debugger under
SAP transaction SE37. In many cases, this is the only way of determining the exact functionality
of an RFC or BAPI.
86
If a call is made out of SAP in immediate mode, an attempt is made to send this to the
external application at the time the IDOC is created using a dialog process. However, if
the external application is busy, the call is placed in the tRFC queue and may be handled
by background processes or by user configured batch jobs. For example, calls defined to
be immediate may not actually be performed immediately. This is an important design
consideration.
If a call is made out of SAP in batch mode, a batch job needs to be scheduled to flush the
IDOCs from SAP to the external application.
If a call is made into SAP in immediate mode, SAP adds the IDOC to the IDOC queue and
application level functionality is immediately invoked to process the IDOC into SAP. This
processing is often slow and can affect SAPs performance.
If a call is made into SAP in batch mode, the IDOC is added to the IDOC queue and
application level functionality needs to be triggered with the scheduling of a background
job.
Before sending IDOCs from SAP, SAP bundles IDOCs together into a transaction. The
number of IDOCs in each transaction depends upon the packet size set in the Partner Profile:
Transactions which error in transmission are kept in the tRFC layer and can be viewed
with SAP transaction SM58.
SAP provides utilities for viewing and resending these transactions. This mechanism
prevents data loss between SAP and the external application.
When an external application sends IDOCs into SAP, they are also sent as a transaction. If
the send of this data fails, it is the external applications responsibility to resend the data as
the same transaction to make sure that the data reaches SAP and is not processed twice.
After SAP receives the IDOCs, they are visible in the IDOC layer.
Because ALE works through RFC, one transaction packet is passed within a single RFC call. For
this reason keep the packet size relatively small as the tables passed through the RFC call are
passed as a single block of memory. This is an inherent limitation of SAP's RFC interface. A packet
size of 2-3 megabytes works well. Each data record in an IDOC is a little over 1 kilobyte. For
example, if you are sending IDOCs with an average of 10 data records in each IDOC, you can
send 200-300 IDOCs per packet.
SAP has provided many standard IDOCs. These can be extended in SAP using the IDOC Editor
(WE30). Modification can be made to SAP's standard programs through user exits to populate
IDOC information or modify the processing of the IDOC. You can also create your own custom
IDOCs.
87
IDOC Type structure and documentation can be viewed through SAP transaction WE60.
Development of IDOCs is performed through SAP transaction WE30 and associated transactions
under WEDI.
The SAP Web site provides information through the SAP Interface Repository
http://ifr.sap.com.
88
Elements of the Siebel user interface correspond to business objects and business components.
Figure 18 shows this relationship between the Siebel UI Layer, Business Object Layer, and Data
Object Layer. Table 18 defines these elements. The figure illustrates the three layers: UI Layer,
Business Object Layer, and the Data Object Layer. The UI Layer consist of List Columns, Applets,
Views, Screens, and Applications. The Business Object Layer consists of Fields, Business
Components, and Business Objects. The Data Object Layer consists of Columns and Tables.
Figure 18. UI, Business Object, and Data Object Layer Relationships
Table 18.
Element
Definition
Application
A collection of screens.
Screen
View
Applet
Business objects
Business Component
To determine the object definitions behind a view, click on the Help menu and choose About View.
89
View Name (for example: My Organization SAP 4x Account Sales Area View)
View Applets (for example: SAP 4x Account Sales Area List Applet and SAP 4x Account Sales Area
Entry Applet)
Using Siebel Tools and with the help of the Major Object Definitions diagram, you can identify the
business object and the business components associated with the view or applets.
Navigate to the View option and query for the desired View.
The business object is one of the parameters in Properties.
Do you have a complete understanding of the business usage of each field in each object?
Can you create a field-by-field mapping document to determine if there are any specific business
rules, format specifications, or changes in the definition of fields from one application to another
that need to be changed within the Business Service Data Map?
Did you scrutinize key fields that provide unique identifiers for each application in how they are
to be mapped?
Do specific rules need to be applied to each application to make sure the data is transferable?
Should these rules be enforced procedurally or through specifically written code?
Should one application or the other be designated as the Master for specific types of data
objects? Is the creation of the object allowed in only one application with read-only access for
the other?
Does administrative information need to be created in either application to support the other?
90
91
Changes to the business objects layer may include the addition of columns to business components.
These fields then need to be exposed to the user interface in the relevant code applets. Depending
upon the changes, new views or screens may need to be added to support new functionality.
Because integration objects are based upon business objects and business components, changes in
any existing business objects for which there are corresponding integration objects requires the
update of those integration objects. Update integration objects through the synchronize function in
Siebel Tools. Take care as the integration objects may have been modified after they were originally
captured. You may need to reapply modifications manually after synchronizing. For comparison, you
should save a copy of the original integration object prior to synchronization.
Standard integrations use LOV (List of Values) definitions for language independent values instead
of hard-coded strings in eScript maps. Create and use LOVs wherever possible in scripts instead of
hard-coded strings. Maintain LOVs in Application Administration > List Of Values.
92
Make sure that you have a project checked out into which you can add the new integration object.
In the top drop-down list, choose the project into which you want to add the integration object.
In the second drop-down list, choose the name of the wizard used to create the type of
integration object you want.
In this case, choose EAI SAP IDOC Adapter Wizard.
Click Next.
The second page of the wizard appears.
93
12 Click OK.
Siebel Tools connects to SAP and retrieves the metadata for the SAP object requested.
NOTE: For this connection to take place, you must have added connection information to your
saprfc.ini file and to your tools.cfg file as described in Modifying SAP Configuration Files on
page 22 and Modifying Siebel Configuration Files for Customized Integrations on page 25.
The wizard displays a hierarchical display of the structure of the IDOC you have captured from
SAP. The following figure shows a hierarchical list (tree list) starting with IDOC Segments and
message names under it.
13 If you do not intend to use a component, clear its check box. Components are captured only if
they are not disabled at this point. Capture all components and disable those that you do not use
by setting the Inactive flag for the component in the integration object.
14 Click Next and click Finish to create the integration object in the Siebel repository.
15 To view the integration object, select the Integration Objects in the Navigation window in Siebel
Tools.
NOTE: For more information on the structure of IDOC Integration Objects and configuration of the
IDOC Integration Object Wizard, see Chapter 7, IDOC Interfaces.
94
Make sure that you have a project checked out into which you can add the new integration object.
From the top drop-down list, choose the project into which you want to add the integration
object.
From the second drop-down list, choose the name of the wizard used to create the type of
integration object you want:
Click Next.
Click Next.
Siebel Tools prompts you to continue.
10 Click OK.
Siebel Tools connects to SAP and retrieves the metadata for the SAP object requested.
NOTE: For this connection to take place, you must have added connection information to your
saprfc.ini file and to your tools.cfg file as described in Modifying SAP Configuration Files on
page 22 and Modifying Siebel Configuration Files for Customized Integrations on page 25.
The wizard displays a hierarchical display of the structure of the BAPI/RFC you have captured
from SAP.
95
11 If you do not intend to use a component, clear its check box. Components are captured only if
they are not disabled at this point. Capture all components and then disable those you do not
currently use by setting the Inactive flag on the corresponding components.
The following figure shows a hierarchical list of components. The list shown has Import
Parameters, and has SALES_ORDERS one level below.
96
Figure 20 on page 97 shows the modifications made to the integration object component and
represents the STATUSINFO table returned by SAP. This SAP internal table contains information that
can be separated into three normalized tables:
Three new components can be created in the integration object to separate the Header, Line Item,
and Delivery Item data. The BAPI adapter can then automatically create these new components from
the original component. One component from SAP becomes three normalized components within the
Siebel workflow after the invocation of the BAPI adapter.
Select the component you want to divide into multiple components and make a copy of it for each
new component.
Give each one a new name and new External Name Context.
Make sure the External name retains the original SAP name for the table and the External Name
Context is not the same as the External Name for any component.
The External Sequence number field for components is currently not used by the BAPI Adapter.
However, these fields do need to be filled in with values. If two or more components have the
same parent, you can optionally give them unique External Sequence numbers.
97
Remove fields that are not needed for each component, leaving only the fields that you would
like to have in each new component.
Give the key a name, sequence number, and key type of User Key.
Select Integration Component Key Fields from the Object Explorer and add new records to the
Integration Component Key Fields list, one for each field in the key.
SAP's BAPI interface passes a NUMC field with no decimal point, but the number is intended to
be interpreted as a decimal number. For example: the field ORDER_ITEMS_IN-REQ_QTY is
defined as a NUMC field but it is intended to be interpreted as a decimal number with three digits
after the decimal point. A value of 0009000 then needs to be interpreted as 9.000 rather than
9000. SAP indicates this in the field's description, but no metadata is available in SAP which
defines this. The BAPI Adapter has the capability to place the decimal point at the correct position
given that the External Scale field is set. In this case the External Scale value would need to be
set to 3 in the integration object.
Incorrect currency values can be passed through the BAPI interface depending upon currency
being used in the application. There are differences between the scale value passed to the BAPI
wizard as metadata and the actual scale value for the data. If you find that the decimal point has
moved after sending or receiving a currency value, you may need to adjust the External Scale
value for the Integration Object field. The External Scale value of a numeric field defines the
number of decimals to appear in the number after the decimal point.
98
Integration ID
Integration ID serves many purposes. It refers to the back office objects such as customer number,
sales order number, and so on. Integration ID can also be used in the user keys. Integration ID is
used for both BAPI and IDOC based data flows.
Select Business Service and right click and choose New Record or Copy Record.
99
Enter Name, Project, Class CSSEAIDTEScriptService, Display Name (as you want it to appear)
and other Properties.
For more information, see the Overview: Siebel Enterprise Application Integration guide.
After you have created a business service, you can edit it by right-clicking on the business service
record and choosing Edit Scripts.
For more information on eScript, see the Siebel eScript Language Reference.
To create maps
1
Field
Description
Example
Name
Navigate to Data Maps Editor, and edit Integration Component Maps using the following table as
a guide.
Field
Description
Name
100
Field
Description
Source Search
Specification
Precondition
Postcondition
Description
Source Expression
Create new maps between any two integration objects, and then build your new integration point
based on your business requirement.
For Siebel Data Mapper limitations in this release, see the Overview: Siebel Enterprise
Application Integration guide.
Creating Workflows
After you have created the Business Service Data Map, you can create a workflow to execute it. For
information about creating, deploying, and activating workflows, see the Siebel Business Process
Designer Administration Guide.
The workflow that you create will need to include and execute specific business services. The
following topics describe the types of Business Services you are likely to use in building an SAP
interface workflow.
10 1
Select EAI Siebel Adapter as the business service for this step.
If you are querying the Siebel database for an object, you output a Siebel integration object
instance in the form of a SiebelMessage.
If you are updating the Siebel database, you input a Siebel integration object instance in the
form of a SiebelMessage.
For more information on using the Siebel Adapter, see the Transports and Interfaces: Siebel
Enterprise Application Integration guide. See the workflows provided for the SAP standard
integrations for examples.
Siebel-to-SAP Interfaces
If you are creating a workflow which must make a synchronous BAPI/RFC call you need to add the
BAPI Adapter business service to your workflow.
102
Select EAI SAP BAPI Adapter as the business service for this step.
For more information on using the BAPI Adapter see Chapter 6, BAPI Interfaces. See workflows
provided for the SAP standard integrations for examples.
If you are creating a workflow which must make an transactional RFC call, you need to add the tRFC
BAPI Adapter business service to your workflow.
Select EAI SAP BAPI Adapter (tRFC) as the business service for this step.
The tRFC BAPI Adapter can be configured to use the EAI Queue to temporarily store data within the
BAPI call for recovery in case of error during transit to SAP. For more information on using the tRFC
BAPI Adapter see Chapter 6, BAPI Interfaces.
If you are creating a workflow which must send an IDOC to SAP, you need to add the IDOC Adapter
Business Service to your workflow.
10 3
Double-click on the Business Service box to open the Business Service Arguments window.
Select EAI SAP IDOC Adapter as the business service for this step.
If executing the map in the server, set the SAPSenderPrtnrNum component parameter for the
Business Integration Manager.
Within your map, set the sender partner field (SNDPRN) in the IDOC control record.
Set the literal value of the SAPSenderPrtnrNum input argument in the workflow.
The IDOC Adapter converts the IDOC to an RFC call and then invokes the tRFC BAPI Adapter. For this
reason, this call can be configured to use the EAI Queue to temporarily store data within the IDOC
for recovery in case of error during transit to SAP. For more information on using the tRFC BAPI
Adapter with EAI Queue see Chapter 6, BAPI Interfaces. For more information on using the IDOC
Adapter see Chapter 7, IDOC Interfaces. The SAP standard integrations provide examples of sending
an IDOC to SAP.
SAP-to-Siebel Interfaces
The tRFC BAPI Receiver processes data that SAP sends. This component invokes a workflow to
process the data. The tRFC BAPI Receiver may receive an IDOC or a tRFC call from SAP. In each case,
the first step in a workflow invoked by the receiver is a Business Service Data Map that accepts an
EAI Property Set in the form of a SiebelMessage containing an IDOC or BAPI Input Integration Object
instance.
104
Figure 21 illustrates IDOC Processing and tRFC Call Processing. In IDOC Processing, data from SAP
R/3 goes to the Siebel tRFC BAPI Receiver, which passes it to the IDOC Workflow Processor, which
passes it a specific workflow (data dependent). This workflow consists of a Business Service Data
Map and the Siebel Adapter. The Siebel Adapter then writes the data to the Siebel database. In tRFC
Call Processing, data from SAP R/3 goes to the Siebel tRFC BAPI Receiver, which passes it a specific
workflow (data dependent). This workflow consists of a Business Service Data Map and the Siebel
Adapter. The Siebel Adapter then writes the data to the Siebel database.
The name of the workflow to be called upon receipt of the IDOC must be defined. This is usually
done in the workflow user property of the IDOC integration object to be passed to workflow.
The names of IDOC integration objects that may be accepted by the IDOC workflow processor
must be defined in the SAPIdocAllowedObjectnn user properties of the IDOC workflow processor
business service.
10 5
For more information on configuration of user properties, see Chapter 7, IDOC Interfaces.
The name of the Workflow to be called upon receipt of the tRFC call must be defined. This is
usually done in the Workflow user property of the BAPI Input Integration Object to be passed to
workflow.
The names of BAPI Input Integration Objects that may be accepted by the tRFC BAPI receiver
must be defined in the RFCFunctionIntObjnn user properties of the tRFC BAPI receiver business
service.
For more information on configuration of user properties, see Chapter 6, BAPI Interfaces.
Select the name of your business service for this step. If you are using a Siebel Data Mapper
map, choose .EAI Data Mapping Engine.
106
Argument
Description
SiebelMessage
MapName
OutputIntegrationObjectName
The output arguments generally include an output SiebelMessage that contains a new integration
object instance created during the map.
See the workflows provided for the SAP standard integrations for examples. For more information,
see the Siebel Business Process Designer Administration Guide and the Overview: Siebel Enterprise
Application Integration guide.
Workflow Simulator
File Output
Select New in the Input Property Set view to create a new record.
Then select the Property Name field and create a new property name value pair with the name
SAPRfcDestEntry and its appropriate value.
NOTE: If you are using the Siebel Mobile Client you may also set SAPRfcDestEntry in the client
configuration file as described in Modifying Siebel Configuration Files for Customized Integrations
on page 25.
10 7
Verify results of the workflow. This depends upon the action your workflow takes.
NOTE: When the tRFC BAPI receiver is executed from the Business Service Simulator it tests for
input from SAP only for SAPSleepTime seconds. When the receiver is executed in the Siebel Server
as the BAPIRcvr component, it continuously recalls itself, and looks each time for input from SAP.
If your workflow begins with the Siebel Adapter, you can set the Object ID field of the Siebel
Message with the value of a ROW_ID that corresponds to an object you would like to extract from
the Siebel application to begin the test. The ROW_ID of an object can be retrieved from the About
Row Help when the row is selected.
The XML Read from File and XML Write to File services can be added as intermediate steps
between business services in your workflow to write the current Integration Object Instance to
an XML file. This can be useful for creating test data and for verifying the content of the object.
If you need to execute a workflow that is normally triggered by the tRFC BAPI receiver upon
receipt of an IDOC or BAPI call in the workflow simulator, you can:
Add the EAI XML Write to File service as your first step in the workflow to write the input from
SAP to an XML file.
Execute the tRFC BAPI receiver service with the Business Service Simulator as described
previously. The first step of the workflow writes the input data to a file.
Modify the workflow to start by reading the data from the file. Replace the EAI XML Write to
File service with the EAI XML Read from File service.
108
If you are making a BAPI or RFC call from your workflow into SAP and you would like to follow
your data from the Siebel application to the ABAP debugger, set ABAP_DEBUG=1 in your TYPE=A
Destination definition in the saprfc.ini file. When the BAPI adapter service is executed in your
workflow, the SAP Client appears and displays the ABAP debugger at the start of the BAPI or RFC
function call. The SAP Client must be installed on the same machine on which you are executing
the Siebel Mobile Web Client.
NOTE: If your workflow contains a call to the BAPI adapter business service, you must remember
that you are invoking this business service from the Siebel Client. Connection parameters for this
business service are usually set as component parameters on the Business Integration Manager.
However, if working with the Siebel Mobile Web Client, the connection parameters need to be set in
the Siebel Client configuration file. The connection parameters, in this instance, can also be set as
input arguments to the BAPI adapter business service in your workflow.
File Output
You can use the system created log files to further assist you in your debugging. You can also write
some identifying strings or variable values to a file yourself using the file manipulation capabilities
in eScript. For example:
var fp = Clib.fopen("SAPIntAcc.log", "w");
Clib.fputs("Integration Id: " + IntId,fp);
//Add more fputs() lines according to your needs.
Clib.fclose(fp);
For more information on system log files, see the Configuring Siebel Business Applications guide. For
more information on the Clib object, see Siebel Tools Online Help.
10 9
110
BAPI Interfaces
This chapter provides reference information for BAPI and RFC interfaces. It contains information on
BAPI Integration Objects as well as information on configuration of the BAPI Integration Object
Wizard, BAPI Adapter, tRFC BAPI Adapter, and tRFC BAPI Receiver.
The chapter includes the following topics:
Creating SAP Integration Objects with the BAPI Wizard on page 111
BAPI and RFC Integrations with the Siebel Application on page 114
11 1
BAPI Interfaces Creating SAP Integration Objects with the BAPI Wizard
112
BAPI Interfaces Creating SAP Integration Objects with the BAPI Wizard
11 3
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Transactional BAPI calls using the tRFC BAPI AdapterEAI Queuing options for data
recoverability
This functionality is performed through a series of business services provided by Siebel applications.
Other sections of this document refer to these business services by the names in Table 19.
Table 19.
Reference Name
BAPI Adapter
Configuration requirements for each of these Business Services are discussed in the following topics.
The behavior of Business Services can be controlled using:
User Properties
Component Parameters
Method Arguments
Set the values of User Properties in Siebel Tools. Select Business Service > Business Service User
Prop from the Object Explorer and edit the Value field for the specific User Property. Compile changes
to User Property values into the .srf file.
The values of Component Parameters may be set by default or by you. You can change parameter
values through the Server Manager. For more information on setting Component Parameters, see the
Siebel System Administration Guide. If a Component Parameter has the same name as a User
Property, its value when it is set overrides any previously defined value of the User Property.
114
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
The values of Method Arguments are set when a method in a Business Service is invoked. Values for
Method Arguments on services that are invoked from a workflow are defined within workflow. For
this reason, they can have fixed or variable values. If a Method Argument and a Business Service
User Property have the same name, the value of the Method Argument overrides the value of the
User Property. If a Method Argument and a Component Parameter have the same name, the value
of the Method Argument overrides the value of the Component Parameter.
To summarize, the value of User Properties can be overridden with Component Parameter or Method
Argument values and the value of a Component Parameter can be overridden with a Method
Argument value.
Table 20.
Name
User
Prop
Comp
Param
Method
Arg
OutputIntObjectFormat
OutputIntObjectName
Valid
Values
Must be a
BAPI
Output
Integration
Object
name
Usage
11 5
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 20.
Comp
Param
Method
Arg
SAPRfcConnectString
SAPRfcUserName
SAPRfcPassword
SAP password.
SAPRfcTrace
Name
SiebelMessage
DisconnectAlways
116
Valid
Values
true or
false
Usage
true or
false
Determines connection
behavior of BAPI adapter.
When true, the adapter
makes a new connection each
time the Execute method is
called. If false, the adapter
keeps its connection open.
(See also
SAPRfcMaxConnectTime.)
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 20.
Name
User
Prop
SAPRfcMaxConnectTime
SAPAutoError
Comp
Param
Method
Arg
Valid
Values
Usage
Integer
value in
seconds
True or
False
11 7
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 20.
Name
User
Prop
Comp
Param
Method
Arg
Valid
Values
SAPCodepage
Value from
Transcode
Encoding
drop-down
list
SAPIgnoreCharSetConv
Errors
True or
False
Usage
SAPRfcConnectString uses SAP's internal connect string format. This must include the following
elements:
These elements must be separated in the string by one or more spaces, for example,
DEST=DEV_Outbound CLIENT=555 LANG=E. Table 21 contains Output Method Arguments for the
Execute Method.
Table 21.
Name
Usage
RfcExceptionName
SiebelMessage
The Execute method is likely to be all that you need to use with the BAPI Adapter. There are two
more utility methods defined. The first is MakeConnection. You can use this to test your connection
information to SAP. For information on how to test your connection, see Checking Siebel Client
Connectivity on page 41. The second is EndConnection. Use this method to force a disconnect from
SAP.
NOTE: To control the disconnection with SAP by using the EndConnection method, you must use this
method within the same workflow where a previous call to the adapter opened a connection. You
cannot make a connection within one workflow and disconnect within a different workflow.
EndConnection uses no method arguments. It disconnects the BAPI adapter from SAP.
MakeConnection uses the SAP connection variables described in Table 20 on page 115:
SAPRfcConnectString, SAPRfcUserName, SAPRfcPassword, and SAPRfcTrace.
118
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
SAP BAPIs often use a standard return structure to send error messages back to the calling
application. The BAPI Adapter has the capability of handling this error information in a flexible
manner. The BAPI Adapters flexibility is based on the values of two user properties or method
arguments: SAPAutoError and SAPErrorTypeField. These parameters can be used together to direct
the BAPI adapter to automatically raise errors or let these errors pass on to other portions of
workflow for handling. The SAPAutoError flag turns on or off the automatic error generation. The
SAPErrorTypeField specifies the field in the BAPI interface that contains the SAP error type (E, A, I,
S, or W). Table 22 summarizes the functionality.
Table 22.
SAPAuto
Error
Behavior
True
True
True
False
False
False
These parameters can be set in the workflow as input method arguments to the BAPI adapter
business service call. The SAPAutoError parameter defaults to True when not set and the
SAPErrorTypeField parameter defaults to RETURN-TYPE when not set.
11 9
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 23.
Comp
Param
Method
Arg
SAPRfcConnectString
See Table 20
SAPRfcUserName
See Table 20
SAPRfcPassword
See Table 20
SAPRfcTrace
Name
SiebelMessage
Valid Values
true or false
Usage
See Table 20
See Table 20
DisconnectAlways
true or false
See Table 20
SAPRfcMaxConnectTime
Integer value in
seconds
See Table 20
tRFCMode
tRFC
SAPWriteXML
WriteNone,
WriteAlways,
WriteBeforeErr
, WriteOnErr
120
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 23.
Name
User
Prop
SAPXMLQueueCleanup
Comp
Param
Method
Arg
Valid Values
Usage
true or false
SAPXMLQueueService
XML queuing
service name
SAPXMLQueueName
EAI Queue
name
SAPCodepage
Value from
Transcode
Encoding dropdown list
SAPIgnoreCharSetConv
Errors
True or False
Table 24.
Name
Usage
RfcExceptionName
SiebelMessage
As with the BAPI adapter, you may also use the methods MakeConnection and EndConnection. For
more information, see BAPI Adapter Configuration on page 115.
12 1
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
The Workflow User Property on the BAPI Input Integration Object definition in Siebel Tools can
be set to the workflow name. When this type of BAPI Integration Object is received, it is sent to
this workflow. The workflow name must be set using Siebel Tools and the changed integration
object must be compiled into the Siebel .srf file.
The workflow name may be set in the ProcessName user property of the EAI SAP BAPI Workflow
Service business service. If the workflow name is set here, BAPIs received from SAP are sent to
this workflow. The workflow name in the integration objects is ignored.
The list of BAPI Input Integration Objects that the receiver can create must be defined in the User
Properties: RfcFunctionIntObjnn where nn represents numbers from 01 to 50. For example if the
BAPI receiver needs to be configured to receive two function calls from SAP, you would need to add
two User Properties, RfcFunctionIntObj01 and RfcFunctionIntObj02 to the EAI SAP BAPI Receiver
(tRFC) business service. The values of these user properties would be the BAPI Input Integration
Object names for the integration objects representing the RFC calls to the Siebel application.
Using the BAPI Input Integration Object Wizard in Siebel Tools, capture the function interface as
a BAPI Input Integration Object.
Add the name of the workflow you wish to invoke when the tRFC call is made to the Siebel
application to:
122
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
The ProcessName user property of the EAI SAP BAPI workflow service if all tRFC calls are
routed to the same workflow.
Add the integration object name to the Business Service definition for the EAI SAP BAPI Receiver
(tRFC) by adding a user property of the form, RfcFunctionIntObjnn, as previously mentioned.
Using the Siebel client, create the workflow you named in Step 4.
Create the ABAP code in SAP to invoke the function in the Siebel application.
Call the function IN BACKGROUND TASK with your external logical system name as the
DESTINATION. Follow the call with a COMMIT WORK statement.
CALL FUNCTION 'ZRFC_TEST_TRFC'
IN BACKGROUND TASK
DESTINATION Logical System name
. . .
COMMIT WORK.
NOTE: SAP allows you to make multiple calls prior to the COMMIT WORK statement. This causes
SAP to place multiple tRFC calls in the same transaction. The tRFC BAPI Receiver does not
currently support this. If you need to make multiple calls prior to the COMMIT WORK, you must
use the modifier AS SEPARATE UNIT to cause each BAPI call to be made within a separate
transaction.
Start the Siebel Server and the BAPIRcvr component using your new .srf file.
Make sure that you followed all setup procedures described in Chapter 2 and tested the
connectivity of the tRFC BAPI receiver.
10 Execute your new ABAP code in SAP to make the function call to the new Siebel Workflow.
Receiving IDOC calls
When the tRFC Receiver receives an IDOC from SAP, it passes the information it receives through the
EAI SAP IDOC Workflow Processor business service. This business service transforms the raw data
into an IDOC Integration object and invokes a workflow. The name of the IDOC Integration Object
you are using must be defined in a user property on the EAI SAP IDOC Adapter business service. The
workflow you want to invoke may be defined in two ways. For information on how to define your
workflow and IDOC Integration Object, see IDOC Workflow Processor Configuration on page 138.
12 3
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 25 summarizes the User Properties and Component Parameters that may be set to control its
behavior. Those variables that may be set as component parameters must be set for the BAPIRcvr
component.
Table 25.
Name
SAPRfcDestEntry
Comp
Param
Valid Values
Usage
SAPBAPIDispatchService
SAPBAPIDispatchMethod
SAPIDOCDispatchService
SAPIDOCDispatchMethod
SAPReceiverReconnectTime
Integer value in
minutes
124
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
Table 25.
Name
User
Prop
Comp
Param
SAPSleepTime
Valid Values
Usage
Integer value in
seconds
SAPWriteXML
SAPXMLQueueCleanup
WriteNone,
WriteAlways,
WriteBeforeErr,
WriteOnErr
true or false
SAPXMLQueueService
XML queuing
service name
SAPXMLQueueName
RfcFunctionIntObjnn
SAPCodepage
Value from
Transcode
Encoding dropdown list
SAPIgnoreCharSetConv
Errors
True or False
12 5
BAPI Interfaces BAPI and RFC Integrations with the Siebel Application
NOTE: There may be up to 50 user properties defined with a name of the form, RfcFunctionIntObjnn,
such as RfcFunctionIntObj01, RfcFunctionIntObj02, RfcFunctionIntObj03, and so on. Each of these
user properties contains the name of a BAPI Input Integration Object that the tRFC BAPI Receiver
can accept.
126
IDOC Interfaces
This chapter provides reference information for ALE/IDOC interfaces. It contains information on
configuration of the IDOC Integration Object Wizard, IDOC Adapter, IDOC Workflow Processor, and
IDOC Workflow Service as well as information on IDOC Integration Objects.
This chapter contains the following topics:
Creating SAP Integration Objects with the IDOC Wizard on page 127
IDOC Integration with the Siebel Application on page 133
Before reading this chapter, you should be familiar with the tRFC BAPI Adapter and tRFC BAPI
Receiver described in Chapter 6, BAPI Interfaces. These Business Services provide the SAP
connectivity for transporting IDOCs to and from SAP R/3.
Table 26.
DEBMAS02 IDOC
Control Record
IdocSegments Component
E2KNA1M Segment
E2KNA1M Component
E2KNA1H Segment
E2KNA1H Component
12 7
IDOC Interfaces Creating SAP Integration Objects with the IDOC Wizard
Table 26.
DEBMAS02 IDOC
E2KNA1L Segment
E2KNA1L Component
E2KNVVM Segment
E2KNVVM Component
E2KNVPM Segment
E2KNVPM Component
The IdocSegments component contains the control record fields. These fields are named with a prefix
of CONTROL-. How these fields are used depends upon whether the IDOC is being sent to SAP or
received from SAP. When an IDOC is sent from the Siebel Connector for SAP R/3 to SAP, you may set
some control fields in a business service data map. Other fields are populated by the IDOC adapter
business service or are populated by SAP. When an IDOC is received from SAP by the Siebel
Connector for SAP R/3, you can access the information in the fields from a business service data map.
The fields in the control record may differ depending upon which version of SAP ALE is being used.
If you are using SAP R/3 version 3.1, you are using ALE version 3X. If you are using SAP R/3 version
4.0 you should use ALE version 4X, but you can still use 3X if other constraints on your
implementation dictate that it must be used. The IDOC Integration Object has a property ALEVersion
that can be set to either 3X or 4X. If it is not defined, it is assumed that it is a 3X version. Its initial
value is set by the IDOC wizard. Its default value is 3X for SAP R/3 3.1 and is 4X for SAP R/3 4.0
and newer. The default value for this property can be changed by setting the ALEVersion property on
the EAI SAP IDOC Adapter Wizard. If you need to convert an existing IDOC Integration Object from
3X to 4X or the reverse, the ALEVersion property must be changed accordingly and the external name
for the IDOC Integration Object must be consistent with the 3X or 4X usage as described later in this
section.
Table 27 lists the control record fields and indicates if they are used in a 3X or 4X control record. The
User Can Populate? column indicates whether you can set the value of the field from a Business
Service Data Map for input to SAP. The Mandatory column indicates when the field must be filled in
for SAP to process the IDOC. The IDOC Adapter Action column indicates what the IDOC Adapter does
to the field prior to sending the IDOC to SAP.
Table 27.
4X Field
3X Field
User Can
Populate?
Mandatory
TABNAM
TABNAM
No
Yes
EDI_DC or EDI_DC40
MANDT
MANDT
No
DOCNUM
DOCNUM
No
DOCREL
DOCREL
Yes
STATUS
STATUS
Yes
DIRECT
DIRECT
No
OUTMOD
OUTMOD
No
128
Filled by SAP.
Yes
Yes
IDOC Interfaces Creating SAP Integration Objects with the IDOC Wizard
Table 27.
4X Field
3X Field
User Can
Populate?
EXPRSS
EXPRSS
Yes
TEST
TEST
Yes
IDOCTYP
IDOCTYP
Yes
Yes
CIMTYP
CIMTYP
Yes
Yes if
extension is
used
MESTYP
MESTYP
Yes
Yes
MESCOD
MESCOD
Yes
MESFCT
MESFCT
Yes
STD
STD
Yes
STDVRS
STDVRS
Yes
STDMES
STDMES
Yes
SNDPOR
SNDPOR
Yes
SNDPRT
SNDPRT
Yes
Yes
SNDPFC
SNDPFC
Yes
SNDPRN
SNDPRN
Yes
Yes
SNDSAD
SNDSAD
Yes
SNDLAD
SNDLAD
Yes
RCVPOR
RCVPOR
Yes
RCVPRT
RCVPRT
Yes
RCVPFC
RCVPFC
Yes
RCVPRN
RCVPRN
Yes
Mandatory
Yes
Yes
12 9
IDOC Interfaces Creating SAP Integration Objects with the IDOC Wizard
Table 27.
4X Field
3X Field
User Can
Populate?
RCVSAD
RCVSAD
Yes
RCVLAD
RCVLAD
Yes
CREDAT
CREDAT
No
CRETIM
CRETIM
No
REFINT
REFINT
Yes
REFGRP
REFGRP
Yes
REFMES
REFMES
Yes
ARCKEY
ARCKEY
Yes
SERIAL
SERIAL
Yes
None
DOCTYP
No
Mandatory
Yes/3X
IDOCTYP Information
DOCTYP, IDOCTYP and CIMTYP are related as in the following examples:
3X control record - using SAP defined type or user created IDOC type:
CIMTYP - blank
4X control record - using sap defined type or user created IDOC type
IDOCTYP - DEBMAS02
CIMTYP - blank
130
IDOC Interfaces Creating SAP Integration Objects with the IDOC Wizard
DOCTYP is no longer required as a unique name for the IDOCTYP/CIMTYP pair in SAP R/3 version 4.0
or newer.
NOTE: DOCTYP can be populated in a 3X control record by a 4X implementation by maintaining the
conversion table in the IDOC type editor (we30). Navigate to Environment > Conversion > IDOC Type
and enter a unique DOCTYP name for the basic type/extension type pair being used.
The integration object has an external name as well as a Siebel name. The External Name field is
specially encoded when an IDOC Extension is being used.
The external name for the integration object is defined as follows:
The IDOC Integration Object has a user property Workflow that can be set to the name of a workflow
to process upon receipt of the integration object from SAP. This is used only when an IDOC is received
from SAP. It is not used when an IDOC is sent to SAP. For more information on the usage of this user
property, see Receiving IDOCs from SAP on page 137.
Table 28 summarizes the IDOC integration object user properties.
Table 28.
Name
Valid Values
Usage
13 1
IDOC Interfaces Creating SAP Integration Objects with the IDOC Wizard
Table 28.
Name
Valid Values
Usage
Workflow
ALEVersion
3X or 4X
In addition, the user property Offset appears for each field in the IDOC. This field is set by the IDOC
integration object wizard and you must not change it.
When selecting IDOC objects to capture with the wizard, the list contains IDOC Type, Extension Type,
and Message Type.
Table 29.
Name
Valid Values
Usage
SAPIdocVersion
ALEVersion
3X, 4X
When you make any changes to user properties in the IDOC wizard business service, you must
compile these changes into the .srf file.
132
Make a copy of the .srf file used by your Siebel Tools application.
Add or change the desired user properties on the EAI SAP IDOC Adapter Wizard business service
as in Table 29.
Compile the SAP Business Services project into your .srf file copy.
Copy the modified .srf file to the name of your old .srf file.
When you invoke the wizard, it uses the new user property definitions.
IDOC Adapter
Configuration requirements for Business Services for each of these options are discussed in the
following sections. The behavior of Business Services can be controlled in three ways:
User Properties
Component Parameters
Method Arguments
The values of User Properties are set within Siebel Tools by selecting Business Service > Business
Service User Prop from the Object Explorer and editing the Value field for the specific User Property.
Changes to User Property values must be compiled into the .srf file.
13 3
The values of Component Parameters may be set by default or by you. You can change parameter
values through the Server Manager. For more information on setting Component Parameters see the
Siebel System Administration Guide. If a Component Parameter has the same name as a User
Property, its value overrides any previously defined value of the User Property.
The values of method arguments are set when a method in a business service is invoked. Values for
method arguments on services that are invoked from a workflow are defined within a workflow. For
this reason they can have fixed or variable values. If a method argument and a business service user
property have the same name, the value of the method argument overrides the value of the user
property. If a method argument and a component parameter have the same name, the value of the
method argument overrides the value of the component parameter.
To summarize, the value of user properties can be overridden with component parameter or method
argument values and the value of a component parameter can be overridden with a method
argument value.
Each section in this chapter provides information on user properties, component parameters and
method arguments that may be used for each business service. An explanation of how to incorporate
these business services into a workflow is provided in Creating Workflows on page 101.
134
Table 30 contains User Properties, Component Parameters and Input Method Arguments for the Send
Method.
Table 30.
Name
User
Prop
Comp
Param
Method
Arg
SAPRfcConnectString
SAPRfcUserName
SAPRfcPassword
SAP password.
SAPRfcTrace
SiebelMessage
Valid Values
true or false
Usage
SAPReceiverPrtnrNum
Logical
system name
SAPReceiverPrtnrType
Partner type
SAPSenderPrtnrNum
Logical
system name
SAPSenderPrtnrType
Partner type
ALE
DispatchFormat
13 5
Table 30.
Name
User
Prop
DispatchService
DispatchMethod
Comp
Param
Method
Arg
Valid Values
Usage
Business
service name
Method name
SAPWriteXML
WriteOnly,
WriteNone,
WriteOnErr,
WriteBefore
Err
SAPXMLQueueCleanup
true or
false
SAPXMLQueueService
XML queuing
service name
SAPXMLQueueName
EAI Queue
name
SAPCodepage
Value from
Transcode
Encoding
drop-down
list
SAPIgnoreCharSetConv
Errors
True or False
SAPRfcConnectString uses SAP's internal connect string format. This must include the following
elements:
136
These elements must separated in the string by one or more spaces, for example,
DEST=DEV_Outbound CLIENT=555 LANG=E. Table 31 contains output method arguments for the
Send Method.
Table 31.
Name
Usage
DispatchErrorStatus
If the value of SAPWriteXML is set to anything other than WriteNone, the EAI Queue is used. For
more information on the EAI Queue, see Chapter 8, EAI Queue. When sending IDOCs to SAP the
queue is accessed by the EAI SAP BAPI adapter (tRFC) service.
13 7
Table 32.
Name
Comp
Param
SiebelMessage
Method
Arg
Valid
Values
Usage
Integration Object with raw
data from the tRFC BAPI
receiver.
DispatchFormat
ALE
DispatchService
DispatchMethod
SAPIdocAllowedObject
nn
SAPCodepage
Value
from
Transcode
Encoding
dropdown list
SAPIgnoreCharSetConv
Errors
True or
False
NOTE: There may be up to 99 user properties defined with a name of the form,
SAPIdocAllowedObjectnn, such as SAPIdocAllowedObject01, SAPIdocAllowedObject02,
SAPIdocAllowedObject03, and so on. Each of these would contain the name of an IDOC Integration
138
Invoking Workflows
After an IDOC is received and passed to the Workflow Processor, the Workflow Processor must pass
this IDOC integration object on to a specific workflow. The workflow name can be defined in two
ways:
The Workflow User Property on the IDOC Integration Object definition in Siebel Tools can be set
to the workflow name. When this type of IDOC Integration Object is received, it is sent to this
workflow name. The workflow name must be set using Siebel Tools and the changed integration
object must be compiled into the Siebel .srf file.
The workflow name may be set in the ProcessName user property of the EAI SAP IDOC Workflow
Service business service. If the workflow name is set here, all IDOCs received from SAP are sent
to this workflow. The workflow name in the integration objects is ignored.
Standard integrations have been set up to use the first method. All workflow names are set in the
Workflow User Property of the IDOC Integration Objects.
13 9
Table 33 contains User Properties, Component Parameters, and Input Method Arguments for the
Send Method.
Table 33.
Name
Comp
Param
SiebelMessage
Method
Arg
Valid
Values
Usage
EAI Siebel Message containing
IDOC integration object
instance.
SAPReceiverPrtnrNum
Logical
system
name
SAPReceiverPrtnrType
Partner
type
SAPSenderPrtnrNum
Logical
system
name
SAPSenderPrtnrType
Partner
type
MQ
DispatchFormat
SAPCodepage
Value from
Transcode
Encoding
drop-down
list
SAPIgnoreCharSetConv
Errors
True or
False
In addition, the default format on the AMI service point needs to be set to MQSTR or MQHSAP
depending upon whether or not a user exit is used. For more information, see your MQSeries
documentation.
140
Using the Workflow Diagram Editor, drag a Business Service box to your diagram.
Double-click on the Business Service box to open the business service arguments screen.
From the drop-down list for Business Services, choose the EAI SAP IDOC MQ AMI Adapter.
From the drop-down list for Business Service Methods, choose the Send method.
Enter appropriate output argument. You must set an output argument as Value which is defined
from Process Property.
Using the Workflow Diagram Editor, drag a Business Service box to your diagram.
Double-click on the Business Service box to open the business service arguments screen.
From the drop-down list for Business Services, choose the EAI MQSeries AMI Transport.
From the drop-down list for Business Service Methods, choose the Send method.
14 1
Create a named subsystem on the server with the same name as that defined in the Connection
Subsystem argument.
On this subsystem, define the values you are using for MqPolicyName and
MqSenderServiceName. For example, using server manager command line mode the command
to create the subsystem would look like this:
create named subsystem your connection subsystem name for subsystem
MQSeriesAMISubsys with MqPolicyName=your MQ AMI Policy name,
MqSenderServiceName=your MQ AMI Sender Service name
The IDOC MQ AMI Adapter converts the IDOC to a buffer which MQSeries can understand, and passes
this to the AMI Transport which sends the IDOC to the MQSeries Queue. For more information on
MQSeries, see the Transports and Interfaces: Siebel Enterprise Application Integration guide.
142
Table 34.
Name
User
Prop
Comp
Param
Value
Method
Arg
Valid
Values
Usage
Raw data buffer from MQSeries.
DispatchFormat
MQ
DispatchService
DispatchMethod
SAPIdocAllowedObject
nn
SAPCodepage
Value
from
Transcode
Encoding
dropdown list
SAPIgnoreCharSetConv
Errors
True or
False
NOTE: There may be up to 99 user properties defined with a name of the form,
SAPIdocAllowedObjectnn, such as SAPIdocAllowedObject01, SAPIdocAllowedObject02,
SAPIdocAllowedObject03, and so on. Each of these would contain the name of an IDOC Integration
Object that can be accepted by the IDOC MQ AMI Workflow Processor.
CAUTION: When an IDOC is received from MQSeries, the External Name is extracted from
14 3
information in the control record of the IDOC. This name is then compared with the External Names
for each integration object listed in the user properties SAPIdocAllowedObjectnn. When a match on
the External Name is found, the corresponding IDOC Integration Object is used. For this reason, each
IDOC Integration Object defined by an SAPIdocAllowedObjectnn user property must have a distinct
external name. For example, two IDOC Integration Objects that both have the external name of
DEBMAS02 cannot be used at the same time.
Invoking Workflows
After an IDOC is received and passed to the Workflow Processor, the Workflow Processor must pass
this IDOC Integration Object on to a specific workflow. The workflow name to which this IDOC
Integration Object is passed must be defined. For information on how to define the workflow name,
see Receiving IDOCs from SAP on page 137.
For more information on the EAI MQSeries AMI Transport service on which this component is based,
see the Transports and Interfaces: Siebel Enterprise Application Integration guide.
144
EAI Queue
This chapter describes the EAI Queue, which is used by the Siebel Connector for SAP R/3. This
information helps you understand the processes that the Siebel Connector for SAP R/3 uses, which
may be valuable when creating your integrations.
This chapter includes the following topics:
About the EAI Queue on page 145
EAI Queue Usage with SAP R/3 tRFC on page 146
EAI Queue Usage with SAP R/3 ALE on page 151
EAI Queue Usage on page 153
EAI Queue Business Service on page 158
Additional fields to be used for error information and other external application specific
information.
Siebel administrators can view the data in the queue and its current processing status. If errors occur
while the data is in transit, the external system reference ID and error information can be used to
determine the problem, correct it and restart the data flow between the Siebel application and the
external application.
To view entries in the EAI Queue, navigate to Administration - Integration > EAI Queue. For SAP
there are two queues, tRFC Inbound from SAP, and tRFC Outbound to SAP. Select a queue in the
upper list. Queue entries then appear in the lower form. You can edit and delete queue entries,
however, be aware that if the Siebel Server is running, queue entries may be in progress. You can
safely edit and delete queue entries with the following statuses: Confirmed, Error in Processing, and
Error in Sending. Entries having any other status value may be in progress while the server is
running. Do not edit or delete entries in this case.
14 5
A business service API is also provided to the EAI Queue. This business service contains methods to
update information held in the queue and allows other components in the Siebel application, as well
as customers, to develop software to use the queue. The business service contains the following
methods:
This chapter explains the usage of the EAI Queue within the Siebel Connector for SAP R/3 and defines
the EAI Queue business service methods and configuration options.
146
Figure 26 shows the flow of a business object from the Siebel database to the SAP database. From
an EAI workflow, the EAI Siebel Adapter is invoked to extract data from the Siebel database
corresponding to a Siebel business object definition. This data is used by the Siebel Adapter to create
a Siebel integration object instance. This is passed through a transformation map service to create
a BAPI input integration object instance. The BAPI input integration definition contains the structure
of the data object to be passed to SAP in the tRFC call.
14 7
When the tRFC BAPI Adapter receives the integration object instance, it behaves depending upon the
setting of the SAPWriteXML component parameter, as reflected in Table 35.
Table 35.
No SAP
Connection
Available
SAPWriteXML
Value
SAPCodepage Is
Set
SAPCodepage Is
Not Set
WriteOnly
Connection error
occurs and no entry
is created in the EAI
Queue.
WriteOnErr
Connection error
occurs and no entry
is created in the EAI
Queue.
148
Table 35.
No SAP
Connection
Available
SAPWriteXML
Value
SAPCodepage Is
Set
SAPCodepage Is
Not Set
WriteBeforeErr
Connection error
occurs and no entry
is created in the EAI
Queue.
WriteNone
Connection error
occurs, and no entry
is created in the EAI
Queue.
Connection error
occurs, and no entry
is created in the EAI
Queue.
14 9
WriteNone. EAI Queue is not used, and a workflow is invoked. If an error occurs in workflow
the error shows up in the tRFC layer in SAP.
WriteOnErr. When a call is received from SAP and an error occurs in the workflow invoked in
the Siebel application, the data in transit is saved to the EAI Queue. If the data cannot be saved
in the queue, an error is returned to the tRFC layer in SAP. If the data is saved in the queue
successfully, no error is returned to SAP and error handling occurs in the Siebel application.
WriteBeforeErr. When a call is received from SAP, the data is immediately saved in the EAI
Queue. The workflow is then invoked in the Siebel application, and if it fails the data is
reprocessed by a Process Transaction Service at a later time. An error is returned to the tRFC
layer in SAP only if the data cannot be saved in the queue initially. WriteBeforeErr always creates
a queue entry regardless of error status.
150
WriteOnly. When a call is received from SAP, the data is immediately saved in the EAI Queue
and no immediate attempt is made to call workflow. The workflow is invoked at a later time by
a Process Transaction Service. An error is returned to the tRFC layer in SAP only if the data cannot
be saved in the queue.
Table 36 summarizes the possible status values for a data object stored in the queue during
processing from SAP to the Siebel application in each of the preceding modes.
Table 36.
Possible Status Values for EAI Queue Entries (SAP to the Siebel Application)
Result of
Workflow
SAP Network
Error
Entry in EAI
Queue (Status)
Transaction Errors
in tRFC Layer
WriteOnly
N/A
N/A
Yes (Initial)
No
WriteNone
Success
N/A
No
No
Failed
N/A
No
Yes
Success
N/A
No
No
Failed
N/A
Yes (Initial)
No
Success
No
Yes (Confirmed)
No
Yes
Yes (Initial or
Processed)
No
Yes (Initial)
No
WriteOnErr
WriteBeforeErr
Failed
15 1
152
Set the SAPWriteXML component parameter on the BusIntMgr component to one of the following
choices:
WriteBeforeErr
WriteOnly
15 3
WriteOnErr
WriteNone
Start a Send Transaction Service background task to pick up erred transactions from the queue
and resend them to SAP.
For more information, see The Send Transaction Service on page 156.
Select the tRFC Outbound to SAP queue from the EAI Queue applet.
Entries in the queue appear in the EAI Queue Items applet. Each entry contains:
The Transaction ID used to identify the transaction to SAP in the Reference ID field.
Status values for Siebel application to SAP Send Transaction are Initial, Sent, or Confirmed. If
the process errors, status remains in one of these three states until a Send Transaction Process
executes. If the Send Transaction Process errs, the status appears as Error in Sending. At this
point, manual intervention is needed to determine the cause of the error.
If a transaction has the status Error in Sending in the EAI Queue, make a note of the
Transaction ID in the Reference ID field.
This value uniquely identifies the transaction in the Siebel log file. Using this ID, you can find
error information in the log file to help you determine the cause of the problem. When you
determine the cause you may do the following:
Edit the XML data held in the EAI queue for that transaction to correct the information and
change the status from Error in Sending to Initial. A Send Transaction service picks up the
data and resends it to SAP.
Delete the entry in the EAI Queue for that transaction and recreate it from the Siebel application
using whatever correction may have been made.
Set the component parameter SAPWriteXML on the component BAPIRcvr so that it contains:
WriteBeforeErr
WriteOnly
WriteNone
WriteOnErr
154
Start a Process Transaction Service background task to pick up erred transactions from the queue
and reprocess them into the Siebel application.
For more information, see The Process Transaction Service on page 157.
Select the tRFC Inbound from SAP queue from the EAI Queue form.
Entries in the queue appear in the EAI Queue Items list. Each entry contains:
The Transaction ID used to identify the transaction to SAP in the Reference ID field.
Status values for SAP to Siebel applications Send Transaction are Initial, Processed and
Confirmed. If the process errors, status remains in one of these three states until a Process
Transaction Service executes. If the Process Transaction Service errors, status appears as Error
in Processing. At this point, manual intervention is needed to determine the cause of the error.
If a transaction has the status Error in Processing in the EAI Queue make a note of the
Transaction ID in the Reference ID field.
This value uniquely identifies the transaction in the Siebel log file and also in the SAP tRFC layer.
Using this ID you can find error information in the log file to help you determine the cause of the
problem. You can also retrieve information from SAP by SAP transaction SM58. When you
determine the cause you may do the following:
Edit the XML data held in the EAI queue for that transaction to correct the information and
change the status from Error in Processing to Initial. A Process Transaction Service picks up
the data and reprocesses it into the Siebel application.
NOTE: You should not modify queue entries with the status Initial, Send, or Processed while
the server is running. These entries may be in use by the background processes in the server.
You may edit entries with Error in Processing or Error in Sending status values while the
server is running.
Delete the entry in the EAI Queue for that transaction and recreate it from SAP using whatever
correction may have been made.
NOTE: All components which may have services accessing the queue must execute on the same
server machine. These components use a locking mechanism around the EAI Queue that operates
correctly only when all processes execute on the same machine. These components are: BusIntMgr,
SAPSendTrans, BAPIRcvr, and SAPProcessTrans.
15 5
Table 37.
Name
User
Prop
Comp
Param
Valid
Values
SAPWaitTime
Integer
value in
seconds.
The
default
value is 0
(zero).
SAPWakeupCount
Integer
value.
The
default
value is 0
(zero).
SAPWakeupTime
Integer
value in
minutes.
The
default
value is 5
minutes.
156
Usage
Number of seconds to pause between
sending transactions to SAP. This may be
used to slow down the flow of information to
SAP. Too many RFC calls to SAP or IDOCs,
which are set to process immediately, can
overwhelm SAP.
Table 37.
Name
User
Prop
Comp
Param
SAPtRFCService
SAPSiebelWaitTime
Valid
Values
Usage
Business service that originally created the
entry in the queue. It is important to use the
same service because the user properties in
this service are used by the Send service.
Integer
value in
seconds.
The
default
value is 30
seconds.
SAPRfcConnectString
SAPRfcUserName
SAPRfcPassword
15 7
Table 38 summarizes the user properties and component parameters that may be set to control its
behavior. Those variables that may be set as component parameters must be set for the
SAPProcessTrans component.
Table 38.
Name
User
Prop
Comp
Param
Valid
Values
SAPBAPIDispatchService
SAPIDOCDispatchService
SAPtRFCService
SAPSiebelWaitTime
Integer
value in
seconds.
The
default
value is
30
seconds.
Usage
158
TempDirectory. Directory for temporary storage, default of c:\temp. Depending upon your
configuration you may need to change this value. In Windows 2000 a temp directory is under the
WINNT folder. TempDirectory is not used within the Siebel server environment. This variable is
used only when running within the Siebel Mobile Web Client.
FileExtension. The file extension to be used for files created by the EAI XML Queuing service.
The default value is txt.
AddMessage
AddMessage
The AddMessage method creates an XML file with the given Siebel Message and inserts a status row
into the status table. Table 39 summarizes the AddMessage arguments.
Table 39.
AddMessage Arguments
Argument
Name
Input/
Output
Required
?
Argument
Type
SiebelMessage
Input
No
Hierarchy
ReferenceID
Input
Yes
String
QueueName
Input
Yes
String
Status
Input
Yes
String
Comments
Input
No
String
RowID
Output
String
ReferenceValue2
Input
No
String
Additional information.
ReferenceValue3
Input
No
String
Additional information.
SequenceID
Output
String
Description
15 9
DeleteMessage
The DeleteMessage method either deletes the status record or updates its status as Confirmed.
Table 40 summarizes the DeleteMessage arguments.
Table 40.
DeleteMessage Arguments
Argument Name
Input/
Output
Required
?
Argument
Type
Description
RowID
Input
No (see
following
comment)
String
DeleteStatusRecord
Input
No
String
QueueName
Input
Yes
String
Status
Input
Yes
String
Comments
Input
No
String
SearchSpec
Input
No (see
following
comment)
String
Search criteria.
SortSpec
Input
No
String
Sort criteria.
NumberRowsAffected
Output
String
If Row ID is provided, it is the only search criteria used and a single row is deleted.
If a search spec is provided, all rows matching the search criteria are deleted.
If a sort spec is provided, the first row retrieved using the sort spec is deleted, and other rows
are not.
SearchSpec is modified to be [Queue Name] = 'Queue name given' AND (SearchSpec given).
160
GetMessage
GetMessage retrieves the XML file data and outputs a Siebel Message. It also retrieves the current
status information. Table 41 summarizes the GetMessage arguments.
Table 41.
GetMessage Arguments
Argument
Name
Input/
Output
Required
?
Argument
Type
Description
RowID
Input/
output
No (see
following
comment)
String
QueueName
Input
Yes
String
Queue name.
SearchSpec
Input
No (see
following
comment)
String
Search criteria.
SortSpec
Input
No
String
Sort criteria.
SiebelMessage
Output
Hierarchy
ReferenceID
Output
String
Reference ID.
SequenceID
Output
String
Sequence number.
Status
Output
String
ReferenceValue2
Output
String
Additional information.
ReferenceValue3
Output
String
Additional information.
Comments
Output
String
If Row ID is provided, it is the only search criteria used and that row is retrieved.
If both a search spec and sort spec are provided, the first record selected using this information
is returned.
If a search spec is provided and no sort spec is provided, then the records are sorted based on
Sequence number and the oldest entry in the queue that matches the search spec is returned.
SearchSpec is modified to be [Queue Name] = 'Queue name given' AND (SearchSpec given).
16 1
GetStatus
GetStatus retrieves the current status record from a given Row ID or Search Spec. Table 42
summarizes the GetStatus arguments.
Table 42.
GetStatus Arguments
Argument
Name
Input/
Output
Required?
Argument
Type
Description
RowID
Input/
output
No (see following
comment)
String
QueueName
Input
Yes
String
SearchSpec
Input
No (see following
comment)
String
Search criteria.
SortSpec
Input
No
String
Sort criteria.
ReferenceID
Output
String
Reference ID.
SequenceID
Output
String
Sequence number.
Status
Output
String
ReferenceValue2
Output
String
Additional information.
ReferenceValue3
Output
String
Additional information.
Comments
Output
String
If Row ID is provided, it is the only search criteria used and that row is retrieved.
If both a search spec and sort spec are provided, the first record selected using this information
is returned.
If a search spec is provided and no sort spec is provided, then the records are sorted based on
Sequence number and the oldest entry in the queue that matches the search spec is returned.
SearchSpec is modified to be [Queue Name] = 'Queue name given' AND (SearchSpec given).
162
UpdateStatus
UpdateStatus updates the fields in the status record for the given Row ID or SearchSpec. Table 43
summarizes the UpdateStatus arguments.
Table 43.
UpdateStatus Arguments
Argument Name
Input/
Output
Required?
Argument
Type
Description
RowID
Input/
output
No (see
following
comment)
String
QueueName
Input
Yes
String
Status
Input
Yes
String
Comments
Input
No
String
SearchSpec
Input
No (see
following
comment)
String
Search criteria.
SortSpec
Input
No
String
Sort criteria.
ReferenceID
Output
String
Reference ID.
SequenceID
Output
String
Sequence number.
ReferenceValue2
Output
String
Additional information.
ReferenceValue3
Output
String
Additional information.
NumberRowsAffected
Output
String
If Row ID is provided, it is the only search criteria used and a single row is updated.
If a search spec is provided, all rows matching the search criteria are updated.
If a sort spec is provided, the first row retrieved using the sort spec is updated, other rows are
not.
SearchSpec is modified to be [Queue Name] = 'Queue name given' AND (SearchSpec given).
Reference ID and Sequence ID are output only if it is guaranteed that only one row is returned. For
example, if the Row ID is input, then only a single row is updated. The same result occurs if a Search
spec is provided.
16 3
164
This chapter provides you with tips for upgrading from Siebel 6.x to Siebel 7.x. This chapter includes
the following topics:
About Upgrading the Siebel Connector for SAP R/3 on page 165
Upgrading IDOC Integration Objects on page 165
Revising Workflows for Sending IDOCs to SAP on page 167
The MessageBox Function and Business Service Data Maps on page 167
The AllLangIndependentVals = Y user property has been added to the Order - Create SAP Order
(Siebel) integration object. This is now required for the Siebel adapter to pick LIVs (Language
Independent Values) when the database is non-ENU.
The Order Item XA business object component has been added to the Order Entry - Get SAP
Order Status business object. This is because in Siebel 7 the calculation of the quantity of items
has been moved to a separate business component and this business component must be
included in the business object on which the integration object is based.
Picklists and Pickmaps were added to the Delivery Block, Delivery Status, and Pricing Status
fields in the Order Entry - Get SAP Order Status Header business component and the Delivery
Status field in the Order Entry - Get SAP Order Status Item business component. The PICKMAP
user property was set to Y for the four corresponding fields in Order - Get SAP Order Status
(Siebel) integration object.
You can also upgrade your 6.x business data flows to work with the new Siebel 7.x infrastructure.
The following sections cover the changes you need to make. While this was not required for 7.0,
these changes are required for release 7.5.
16 5
Upgrading from Release 6.x to Release 7.x Upgrading IDOC Integration Objects
Using the EAI SAP IDOC Adapter Wizard, create a new IDOC integration object with the original
name of your old IDOC integration object.
Continuing with the example in Step 2, capture a DEBMAS02 IDOC from SAP using the new
wizard and name this Customer IDOC Integration Object. This new integration object will contain
control and data record fields as well as the user properties ALEVersion and Workflow that do not
exist in 6.x integration objects.
If you are sending IDOC Integration Objects to SAP, make sure that the setting of the ALEVersion
user property in your new integration object is consistent with the ALE interface you want to use
in SAP.
If you are using SAP release 3.1, ALEVersion must be set to 3X. If you are using SAP release 4.0
or higher you may use 3X or 4X, although 4X is preferred.
If you normally receive this IDOC from SAP, enter in the Workflow user property of the IDOC
integration object the name of the workflow process that you would like to be invoked when this
IDOC is received by the Siebel application.
If you intend to receive the IDOC from SAP, add the name of the integration object to a user
property of the type SAPIdocAllowedObjectnn in the business service definition of the EAI SAP
IDOC Workflow Processor.
This registers your integration object in the Siebel application:
Navigate to the Business Service definition for the EAI SAP IDOC Workflow Processor.
Add a new User Property record with the name SAPIdocAllowedObjectnn, where nn is a number
sequentially one more than the highest existing number (for example, if the highest number is
05, then add SAPIdocAllowedObjects06).
Set the value of the user property to the name of the integration object you are using.
Recompile the new IDOC integration object and the SAP Business Services project into your .srf
file.
Copy the .srf file as needed for use by the server and client applications.
166
Upgrading from Release 6.x to Release 7.x Revising Workflows for Sending IDOCs to
SAP
Determine which business service box on your workflow corresponds to the EAI SAP IDOC RFC
Adapter (the 6.x business service).
You will be creating a new business service to replace this one.
Make note of how these are used because you will need to add them to the new business service.
Create a new business service box on your diagram in the vicinity of the old business service.
Define the input and output method arguments in the new service as they were defined in your
old service. These have not changed.
Modify the flow of the workflow diagram to use the new service you have created.
Test your workflow using the workflow simulator. Follow the suggestions for testing in Testing
the Interface on page 107.
16 7
Upgrading from Release 6.x to Release 7.x The MessageBox Function and Business
Service Data Maps
168
10 Modifying
Siebel Interfaces
After an SAP Upgrade
Siebel interfaces to SAP R/3 can be affected by an SAP upgrade (or even an SAP patch installation).
For this reason it is important to thoroughly review your Siebel interfaces in the event of an upgrade
and to retest your interfaces after an SAP patch has been applied. This chapter describes some of
the changes that might invalidate your Siebel implementation when the R/3 version is changed.
This chapter includes the following topics:
About SAP IDOC Interfaces on page 169
Status of SAP BAPI/RFC Interfaces After an Upgrade on page 170
Using the SAP DLL Library on page 171
Set the Seg.Release in IDOC type field to your previous R/3 IDOC version.
For example, if you are using the DEBMAS02 IDOC type, running SAP R/3 version 4.5B, and
upgrading to R/3 version 4.6B; set the Seg.Release in IDOC type field to 45B. SAP then sends the
IDOC type structure of version 4.5B as opposed to 4.6B. If the field is not filled in, the IDOC type
structure corresponding to the current version is sent.
NOTE: This version is only applicable to SAP developed IDOC type structures. It is not applicable to
custom IDOCs if no version change has been made.
When sending IDOCs from the Siebel application to SAP, no version setting is necessary. SAP
determines the version of the IDOC when it is sent.
16 9
Modifying Siebel Interfaces After an SAP Upgrade Status of SAP BAPI/RFC Interfaces
After an Upgrade
IDOC type structures that change from version to version are changed in minimal ways. Fields and
segments may be added to the structure; no fields are deleted nor does the order of preexisting fields
change. However, SAP also provides application software that populates the IDOC fields on output
from SAP and extracts field values on input to SAP. This application software may change during an
upgrade of SAP. For this reason, test all IDOC interfaces during the upgrade process.
BAPIs and RFCs that have been released may also change slightly during an SAP upgrade. However,
because of their release status, they are tested and supported by SAP and should remain functional
from one version to another, unless SAP indicates otherwise.
Select the BAPI you are interested in from the left panel.
Check the release information in the Status area of the Detail tab.
This may supply more specific information on release status. For example,
BAPI_SALESORDER_CREATEFROMDAT1 shows a released status, but also shows the warning,
Caution: Method is obsolete as of Release 46C!
Check the following for all BAPIs and RFCs during an SAP upgrade:
Check for any OSS notes that might indicate a change in functionality or defects.
Check any existing function documentation, accessed through the Function Module
Documentation button in SAP transaction SE37.
170
Modifying Siebel Interfaces After an SAP Upgrade Using the SAP DLL Library
Extract the new version of the BAPI into new integration objects (input and output) in Siebel Tools
and use the Compare Objects function to detect any differences in structure between the new
and old integration objects.
If the structure is different, the new structure should always be used. If the structure is
significantly different, it may be necessary to review and modify eScript maps that reference
fields in the structures.
Always retest, even when there are no structure changes, as the function itself may have a
slightly different behavior than in the previous R/3 system.
Be aware that patch installations in SAP may also affect the functionality of BAPIs and RFCs. Patches
should be reviewed for content and some testing may be required after the application of a patch.
17 1
Modifying Siebel Interfaces After an SAP Upgrade Using the SAP DLL Library
172
Data Type - This is the Siebel Data type. It can have the following values:
Precision and Scale - Siebel data type precision and scale values
The SAP data types CHAR, LCHR, LANG, CUKY, UNIT, CLNT and VARC have a Siebel type of
DTYPE_TEXT. The Length and External Length columns are populated with the length of the field in
SAP. These field types are used both in BAPI and IDOC Integration Objects. When a field of these
types is being sent to SAP, the data in the field is left-justified and blank filled. When a field of these
types is received from SAP, trailing blanks on the field are truncated, except in the case of the LCHR
field. The LCHR field is passed exactly as it is received from SAP.
The SAP data types DATS and TIMS have a Siebel type of DTYPE_DATETIME. The Siebel type is a 19
character string that includes both date and time, in
MM/DD/YYYY HH:MM:SS format. DATS is the 8 character SAP date in YYYYMMDD format. TIMS is the
6 character SAP time in HHMMSS format.
When a DATS field is sent to SAP, the SAP adapters extract the date portion of the Siebel
DTYPE_DATETIME field and construct an 8 character DATS field in the correct format. When a TIMS
field is sent to SAP, the SAP adapters extract the time portion of the Siebel DTYPE_DATETIME field
and construct a 6 character TIMS field in the correct format.
When a DATS field is received from SAP, a Siebel DTYPE_DATETIME field is constructed with a time
of 00:00:00. When a TIMS field is received from SAP, a Siebel DTYPE_DATETIME field is constructed
with a date of 01/01/1980. Example, if a DATS field for November 7, 2000 is received from SAP, it
looks like this: 20001107. When converted to a Siebel DTYPE_DATETIME field, it looks like this:
11/07/2000 00:00:00.
17 3
The SAP data types DEC, CURR, and QUAN are packed decimal fields in SAP. These have a Siebel
type of DTYPE_NUMBER. Both precision and scale values are kept for these fields. Precision is the
character length of the number and scale is the number of decimal places after the decimal point. In
some cases, this information can be incorrect in the SAP data dictionary and may need to be
corrected in the integration object after it is captured from SAP. These types are supported for BAPI
and RFC calls only. All data contained within IDOCs is in character form when passed to or from SAP.
The SAP data types INT1, INT2, INT4, and PREC are binary integer fields in SAP. These have a Siebel
type of DTYPE_NUMBER. These types are supported for BAPI and RFC calls only. All data contained
within IDOCs is in character form when passed to or from SAP.
The SAP data types ACCP and NUMC are numeric character strings in SAP. These have a Siebel data
type of DTYPE_NUMBER. While a NUMC field does not normally have a scale value, as it generally
represents an integer, a scale value can be entered for the field in the Siebel Integration Object. In
this event, a decimal point is created at the appropriate place. This feature supports BAPI interfaces
that send integer values that are intended to have fixed decimal places. For example, if the number
00054321 is sent as a NUMC field and the comment for the field indicates that the number should
be interpreted as 543.21, the Siebel SAP adapters have the capability of inserting the decimal point
at the correct position, if the external scale value for the field is set to 2. When the number is sent
to SAP, the decimal point is removed. NUMC and ACCP fields are also padded on the left with zeros
prior to sending to SAP. Leading zeros are removed from NUMC and ACCP fields when the value is
received from SAP. These data types are used for both BAPI and IDOC interfaces. However, only BAPI
interfaces use the External Scale field to shift the decimal point.
The SAP data type FLTP represents an 8 byte floating point number. This has a Siebel data type of
DTYPE_NUMBER. The 8 byte binary floating point number passed from SAP is converted to a
character string DTYPE_NUMBER field. The DTYPE_NUMBER field is converted to an 8 byte binary
floating point number and passed to SAP. Exponential notation is not supported. The number must
be representable as a 16 character field without exponential notation.
IDOC Integration Object fields that represent decimal numbers are treated specially by the adapters.
All IDOC data is passed as character strings. The format for a decimal value passed as a character
string in an IDOC field is to left-justify the number and place any - sign after the number. For
example, the value -123.45 would be placed into the IDOC field as 123.45. To handle
this situation some special external data types are used in the IDOC Integration Object. These are
IDOC-DEC, IDOC-CURR, IDOC-QUAN, and IDOC-FLTP. When an IDOC is sent or received, to or from
SAP, the number is converted to or from a DTYPE_NUMBER field. The - sign is moved to the front
of the number in the DTYPE_NUMBER field.
Similarly IDOC Integration Object fields that represent integer numbers are treated specially by the
adapters. The types of IDOC-INT1, IDOC-INT2, IDOC-INT4 and IDOC-PREC are treated as if they
were NUMC fields with the exception that no scale information is used.
When an IDOC Integration Object field does not require a value, you may enter the SAP no-data
character, usually a forward slash (/). This indicates to SAP that no data is being passed for this
field. The interpretation of this is up to the SAP application processing the data, but usually it is
interpreted as an initial value for data that does not exist or no change to previously existing data.
Siebel Applications display SAP material numbers, customer numbers, and sales order numbers with
leading zeros. These numbers are stored in this manner in the SAP database, although the leading
zeroes are not displayed in the SAP user interface.
174
This appendix contains instructions on assessing the field mapping tables used by the business
service data maps. For more information, see Modifying Standard Integration Interfaces on page 74
in Chapter 5, Customizing Integrations.
From the Siebel Bookshelf, in the Documentation by Product Line section, click Business
Applications.
Navigate to the Connector for SAP R/3 Guide in the Application Integration category.
To access the SAP field mappings table that you are interested in, choose from the following
listings:
17 5
176
This appendix provides specific information on code page mappings used by the Siebel Connector for
SAP R/3. The connector directly maps SAPs ISO codepages to Microsoft codepages; however it is
possible for the ISO code page to differ from the Microsoft code page. The ISO code page can differ
from the Microsoft code page if:
There are characters in the Microsoft code page that are not defined in the ISO code page, see
Mapping Microsoft Characters Not Available in ISO.
There are characters in the ISO code page that are not defined in the Microsoft code page, see
Mapping ISO Characters Not Available in Microsoft..
There are characters that are defined in both but are not the same, see Mapping SAP Characters
that Differ Between Codepages..
The behavior of the SAP connector in each of these cases is described in the following sections. The
last section includes tables of commonly used codepages and their differences.
17 7
SAP Code Page Mappings Mapping Microsoft Characters Not Available in ISO
Table 44 contains a list of codepoints in the Microsoft codepages that do not exist in the ISO
codepages for all mappings in Table 10 on page 38.
Table 44.
Codepoint in
Microsoft 1255
(Hex)
Unicode value
(Hex)
Character representation
BF
00BF
C0
05B0
C1
05B1
C2
05B2
C3
05B3
C4
05B4
C5
05B5
C6
05B6
C7
05B7
C8
05B8
C9
05B9
CB
05BB
CC
05BC
CD
05BD
CE
05BE
CF
05BF
D0
05C0
D1
05C1
D2
05C2
D3
05C3
D4
05F0
D5
05F1
D6
05F2
D7
05F3
D8
05F4
FD
200E
Left-to-right mark
FE
200F
Right-to-left mark
178
SAP Code Page Mappings Mapping Microsoft Characters Not Available in ISO
Table 44.
Codepoint in
Microsoft 1255
(Hex)
Unicode value
(Hex)
80
20AC
Euro sign
82
201A
83
0192
84
201E
85
2026
Horizontal ellipsis
86
2020
Dagger
87
2021
Double dagger
88
02C6
89
2030
8B
2039
91
2018
92
2019
93
201C
94
201D
95
2022
Bullet
96
2013
En dash
97
2014
Em dash
98
02DC
Small tilde
99
2122
Trademark sign
9B
203A
Character representation
17 9
SAP Code Page Mappings Mapping Microsoft Characters Not Available in ISO
Table 45.
Codepoint in
Microsoft 1253
(hex)
Unicode value
(hex)
80
20AC
Euro sign
82
201A
83
0192
84
201E
85
2026
Horizontal ellipsis
86
2020
Dagger
87
2021
Double dagger
89
2030
8B
2039
91
2018
92
2019
93
201C
94
201D
95
2022
Bullet
96
2013
En dash
97
2014
Em dash
99
2122
Trademark sign
9B
203A
A4
00A4
Currency sign
A5
00A5
Yen sign
AE
00AE
Registered sign
Table 46.
Character representation
Codepoint in
Microsoft
1254 (Hex)
Unicode
value (Hex)
80
20AC
Euro sign
82
201A
83
0192
180
Character representation
SAP Code Page Mappings Mapping Microsoft Characters Not Available in ISO
Table 46.
Codepoint in
Microsoft
1254 (Hex)
Unicode
value (Hex)
84
201E
85
2026
Horizontal ellipsis
86
2020
Dagger
87
2021
Double dagger
88
02C6
89
2030
8A
0160
8B
2039
8C
0152
91
2018
92
2019
93
201C
94
201D
95
2022
Bullet
96
2013
En dash
97
2014
Em dash
98
02DC
Small tilde
99
2122
Trademark sign
9A
0161
9B
203A
9C
0153
9F
0178
Table 47.
Character representation
Codepoint in
Microsoft
1252 (Hex)
Unicode
value (Hex)
80
20AC
Euro sign
82
201A
Character representation
18 1
SAP Code Page Mappings Mapping Microsoft Characters Not Available in ISO
Table 47.
Codepoint in
Microsoft
1252 (Hex)
Unicode
value (Hex)
83
0192
84
201E
85
2026
Horizontal ellipsis
86
2020
Dagger
87
2021
Double dagger
88
02C6
89
2030
8A
0160
8B
2039
8C
0152
8E
017D
91
2018
92
2019
93
201C
94
201D
95
2022
Bullet
96
2013
En dash
97
2014
Em dash
98
02DC
Small tilde
99
2122
Trademark sign
9A
0161
9B
203A
9C
0153
9E
017E
9F
0178
182
Character representation
SAP Code Page Mappings Mapping ISO Characters Not Available in Microsoft
18 3
SAP Code Page Mappings Mapping SAP Characters that Differ Between Codepages
If either the SAP or the Siebel application is defined as the system of origin for the data, then no
data corruption occurs; however, the data displays differently in each system (correct in the system
of origin and incorrect in the other system). Data corruption is possible if data is changed in both the
SAP and the Siebel applications because displayed values are different in each system for these
characters.
Table 48 and Table 49 list codepoints that differ for SAP codepages 1700 and 1800.
Table 48.
Mapping SAP code page 1700 - ISO 8859-7 to Microsoft 1253 (Greek)
Character
representation
for ISO
Unicode
value for
Microsoft
Character
representation
for Microsoft
02BD
0385
A2
02BC
Modifier letter
apostrophe
0386
B5
0385
00B5
Micro sign
B6
0386
00B6
Pilcrow sign
Codepoint
value (Hex)
Unicode
value for ISO
A1
Table 49.
Mapping SAP code page 1800 - ISO 8859-8 to Microsoft 1255 (Hebrew)
Codepoint
value (Hex)
Unicode
value in ISO
(Hex)
Character
representation
in ISO
Unicode value
in Microsoft
(Hex)
Character
representation
in Microsoft
A4
00A4
currency sign
20AA
AF
203E
overline
00AF
Macron
184
Troubleshooting Siebel
Connector for SAP R/3
18 5
Troubleshooting Workflows
This section provides guidelines for resolving workflow issues. To resolve the problem, look for it in
the list of Symptoms/Error Messages in Table 50.
Table 50.
Symptom/Error
Message
Diagnostic Steps/Cause
Solution
186
Table 51.
Error Message
Diagnostic Steps/Cause
Solution
Check values in
SAPRfcUserName,
SAPRfcPassword, and
SAPRfcConnectString.
or
The DLL 'SSCAEIIR.DLL'
could not be loaded.
18 7
Table 52.
Symptom/Error
Message
Diagnostic Steps/
Cause
188
Solution
Add your IDOC message type to the Distribution
Model under SAP transaction SALE as defined in
Distributing Logical Systems on page 31.
Table 52.
Symptom/Error
Message
Diagnostic Steps/
Cause
Solution
Go to SAP Transaction
WE02 or WE05 and
verify that the IDOC has
been created and there
are no errors in its
transmission.
18 9
Table 52.
Symptom/Error
Message
Diagnostic Steps/
Cause
Solution
190
Manually using SM58. Select a specific transaction and resend with Edit > Execute LUW.
Through a scheduled background job. This is the preferred method. You can schedule
RSARFCCP to resend failed tRFC calls for a given logical system or RSARFCEX to selectively
resend failed tRFC calls. To do this you need to turn off the automatic resend of transactions, as
described in the next step.
Automatically through background processes. Initially this is the default setting for RFC
Destinations. This is not recommended if the IDOC load is expected to be heavy. The resend is
done with background processes and, depending upon your configuration, can limit your
background processes and cause a very slow resend of IDOCs to the Siebel application.
The automatic resend is configured under SM59 by making changes to your RFC destination. The
RFC Destination can be assigned tRFC parameters consisting of three values. (This is done
through the tRFC Options selection in the Destination menu under sm59.) These options are:
19 1
Status of 64. IDOC ready to be passed to application. If you expected the IDOC to be processed
immediately, check your Partner Profile to see that you have selected this type of processing. If
you do not want to process immediately, you can create a background job to process the IDOC
into the application layer. You can schedule RBDAPP01 to process the IDOC. Transaction BD87
can be used to manually process these.
NOTE: If you expect a large quantity of incoming IDOCs, consider setting the processing type in
the partner profile to collect IDOCs, rather than process them immediately. Immediate
processing can tie up dialog processes and slow down your performance. Alternatively, you can
also use the EAI Queue to control the flow of IDOCs to SAP. Set SAPWriteXML to WriteOnly and
the EAI SAP Send Transaction service user property SAPWaitTime to slow the flow of IDOCs to
SAP so that SAP is not flooded.
192
Status of 51. Application Document not posted. This means that errors occurred when the IDOC
was being processed in the application layer. This is normally a data problem. Examine the error
message for information. Data can be corrected.
NOTE: The SAP workflow should be configured to send erred IDOCs to an SAP Inbox for processing.
This can greatly aid in the debugging process when data errors occur.
Start Siebel Tools and lock or checkout the SAP Business Services project.
Select Business Service User Prop from the Object Explorer (under Business Service).
Enter SAPSysVersion in the name field and your SAP version in the Value field (for instance, 40B).
Repeat steps Step 4 through Step 7 for the EAI SAP BAPI Output Wizard business service.
10 Exit Siebel Tools and use the new .srf file for starting Siebel Tools and executing the wizards.
19 3
194
This appendix provides an example of how to create a new integration touch point using the Siebel
Connector for SAP R/3. This appendix includes the following topics:
Create an Integration Object for the Siebel Business Object on page 196
19 5
Creating Integration Touch Points Process of Creating New Integration Touch Points
For the BAPI to work, you need to specify MATERIAL, UNIT, and PLANT. The Internal Product business
object has an integration ID field. This can be used to store the SAP material number. Unit of measure
is also there. However, Plant is missing.
For simplicity of the example, assume that Plant has a fixed value. The alternative would be to use
Siebel Tools to extend the data model, but that is beyond the scope of this example.
When you have identified the Siebel and SAP objects, you need to determine the mappings. At
minimum, you need to specify the three input parameters (MATERIAL, UNIT, and PLANT). Use the
integration ID of the internal product business component, as it contains the SAP material number.
The internal product business component has unit of measure information also. For PLANT, set the
value to constant value, although this could also be obtained from the extended business component.
Store the stock value returned by the BAPI. You can use the field, Stock_Level, for this purpose. If
there are no corresponding fields to store the BAPI return values, then extend the Siebel business
component that you are working with.
196
Table 53.
Process Property
Value
BAPI_MATERIAL_AVAILABILITY (Input)
GetSAPMaterialATP_SiebelToBAPI
BAPI_MATERIAL_AVAILABILITY (Output)
Using the workflow process designer, modify the existing business service for the mapping steps.
Remember to use the display name. You can find the name in the drop-down list.
Use the workflow simulator to test the workflow. Use the row-ID of the material. Specify this row-ID
as the object ID of the process parameter for this workflow. Step through the simulator and debug
the workflow. When it is working properly, activate the workflow.
19 7
/*
* Set up EAI Output Message objects
*/
var oProductObj;
// Siebel Productinstance
var oProductComp;
// Product
var oGSOutputComp; // Create Output
/*
* Find and create top-level integration object
*/
iGSProductObj = inputMsg.GetIntObj("BAPI_MATERIAL_AVAILABILITY (Output)");
oProductObj = outputMsg.CreateIntObj ("Product - Get SAP Material (Siebel)");
/*
* Read int object instances from EAI message
*/
while (iGSProductObj.NextInstance ())
{
/*
* Create "Product" object in output message
*/
oProductObj.NewInstance ();
/*
* Create "Product" component
*/
oProductComp = oProductObj.CreatePrimaryIntComp ("Product");
/*
* Read "Export Parameters" component
*/
iGSExportComp = iGSProductObj.GetPrimaryIntComp ("Export Parameters");
/*
* Create the output component.
*
*/
if (iGSExportComp.NextRecord())
{
/*
* Write "Create Output" component
*/
oProductComp.NewRecord ();
oProductComp.SetCopySource (iGSExportComp);
oProductComp.SetFieldValue ("Id",
inputId);
oProductComp.CopyFieldValue ("Stock Level",
"AV_QTY_PLT");
}
}
}
198
Index
A
ABAP
ABAP code, creating
123
debugging feature
185
defined
12
function calls
84
Account Order History
data flow, example
82
executing
70
Account to Customer data flow
limitations
61
SAP account, creating
60
adapters, about
16
ALE connectivity
ALE calls, about
87
ALE Logical System Definition, diagram
logical system, creating
30
Logical Systems
29
transaction bundling
87
Application Link Enabling
See ALE
28
B
BAPI
definition
12
integration, about
12
workflows, data mapping
modifications
167
BAPI Adapter
business service, adding
102
component parameters
115
configuration
115
destination designation
23
Destination Entry, creating
23
EndConnection utility
118
External Scale value, setting
98
extracting data to multiple components
97
Input arguments
115
MakeConnection utility
118
output method arguments, example
118
SAP connection, testing
118
SAP disconnect, forced
118
SAPRfcConnectString, required
elements
118
and Siebel Client
109
timing argument
117
user properties
115
19 9
Index C
about
107
versus Siebel Server testing
108
business services
See also BAPI Adapter; IDOC Adapter
data maps, upgrade modifications
167
defined
18
EAI Queue, checking for errors
157, 158
EAI SAP IDOC Adapter Service
134
EAI SAP IDOC AMI Adapter
139
EAI SAP IDOC Workflow process
138
EAI SAP Process Transaction
157
EAI SAP Send Transaction
156
method argument values, setting
115
RFC calls dispatcher
124
SAP names for
114
Siebel Adapter, adding
102
tRFC Adapter, adding
103
BusIntMgr
37
C
CIMTYP
130
COMMIT WORK statement
123
component parameters
about
114
BAPI Adapter, listed
115
Business Integration Manager component,
setting
37
EAI SAP IDOC MQ AMI Workflow
Processor
143
EAI SAP IDOC Workflow process
138
IDOC Send method
135
SAP tRFC BAPI Receiver component,
setting
38
SAPSendTrans component
156
tRFC BAPI Receiver
124
configuration
BAPI Adapter
115
IDOC Wizard
132
partner profiles, about
33
partner profiles, generating
33
configuration files
saprfc.ini file, modification
22
saprfc.ini, destination entries
23
Server Request Broker, role of
28
tools.cfg, modifying
26
uagent.cfg modifying
27
connectivity verifications
Siebel Client
41
Siebel Tools
42
tRFC BAPI Receiver
42
CPIC user
25
CSSWfEngine
124
currency values, correcting
98
200
custom integrations
See integrations, custom
Customer to Account data flow
about
59
prerequisites
60
standard integration business data flow
sample
75
customization
to SAP
92
to Siebel applications
91
D
data flows
Quote to Sales Order data flow
66
Sales Order Status Change data flow
69
Siebel Sales Order to SAP Sales Order
63
data mapping
workflow modifications
167
data maps
Business Service data maps, creating
99,
100
business service data maps, upgrade
modifications
167
creating with Siebel Data Mapper
100,
101
eScript tool
99, 100
data transfers, about adapters
16
data transformation, Business Data
Flow
17
DEBMAS
31
DEBMAS02
130
DEBMAS02 IDOC
59
DEBMASEX
130
destination definitions
about
22
connect string, about
116
SAPRfcDestEntry
124
Dialog Process, definition
13
DisconnectAlways
settings, about
116
dll requirements
21
DOCTYP
130
dynamic link library requirements
21
E
EAI MQSeries
AMI Transport service
142
External Name
143
message handling
43
MQSeries server, starting
144
workflow processor, configuring
EAI Queue
checking for data
157
143
Index F
F
function calls, external applications
86
84,
I
IBM MQSeries
See MQSeries; eAI SAP IDOC MQ AMI Adapter
IDOC Adapter
control field actions
128
RFC calls
104
role in Account to Customer data flow
78
Send method component parameters
135
Send method, Input arguments
135
Send method, user properties
135
IDOC errors
IDOCs not processed
190
status 03
189
status 29
189
status 30
189
IDOC integration objects
control record fields
128
control record, version differences
128
data mapping modifications
165
20 1
Index L
process overview
21
saprfc.ini, about
22
saprfc.ini, destination entry
23
integration objects
See also BAPI integration objects; IDOC
integration objects
creating and modifying, about
98
defined
18
described
88
extracting data to multiple components,
about
96
extracting data to multiple components,
procedure
97
field information, about
173
IDOC integration objects, creating
93
RfcFunctionIntObjnn
125
Siebel Data Mapper, mapping fields
with
100
upgrade modifications
165
viewing in Siebel Tools
113
integrations, custom
data flows, about creating
92
interface testing, about
107
mapping scripts, modifying
83
process overview
73
integrations, standard
Account Order History business data flow,
example
82
Account Order History, executing
70, 71
Account to Customer data flows, about
78
Customer to Account data flow, about
59
Customer to Account data flow,
limitations
61
Customer to Account data flow,
prerequisites
60
Customer to Account data flow, sample
75
Material to Product data flow, about
62
modifying
83
prebuilt integrations, summary
14
Quote to Sales Order business data
flows
81
Quote to Sales Order data flow,
executing
66
Sales Order business data flows, about
79
Sales Order data flow, about
63
Sales Order data flow, executing
64
Sales Order limitations, about
65
Sales Order order status business data
flow
81
Sales Order Status Change data flow,
about
69
Sales Order submission to SAP business data
flow
80
Sales Order validation business data
202
flow
80
SAP account, creating
SAP master data
14
transaction data
15
intermediate document
See IDOCs
60
L
librfc32.dll
21
list of values (LOV)
50, 53
log files, testing workflows
109
logical system definitions
about
28
creating
30
distributing
32
partner profiles, creating
33
M
mapping
considerations, business objects
90
master data
customer data
49
SAP materials
49
standard integrations, table of
14
Material to Product data flow
62
MATMAS
31, 62
message types, IDOC
34
mobile user support
16
MQ Series Adapter
configuring
139
MQLink, running
45
MQSeries
about configuring the connector
43
configuration properties and
parameters
143
external name
143
MQ Link connectivity parameters,
setting
43
server, starting
144
O
ORDCHG
31
OutputIntObjectName
115
Outward Business Data Flow, defined
P
packet size, recommended
partner profiles
about
33
about creating manually
creating manually
35
generating
33
87
34
17
Index Q
ports, role of
34
troubleshooting
189
partner types, supported
65
phone numbers, formatting
61
ports, creating manually
34
Process Transaction Service
157
Q
Quote to Sales Order data flow
about
66
business data flows, about
81
executing
66
R
ReceiverConnectionSubsystem,
setting
46
Remote Function Call
See RFC interface
Resend Transaction service
157
RFC
definition
13
destinations, creating
31
interface architecture diagram
85
RFC_INI, importance to Siebel Tools
RFC_INI, setting
24
RFC interface
BAPI interface, relationship to
85
data denormalization
96
function calls to Siebel applications
IDOC data containers, passing
86
transactional RFC calls in workflows,
creating
103
usage tips
85
22
84
S
sales area limitations
65
Sales Order data flow
about
63
business data flows, about
79
executing the data flow
64
limitations
65
order status business data flow
81
order submission business data flow
validation business data flow
80
Sales Order Status Change data flow,
about
69
sales type limitations
64
SAP accounts, creating from Siebel
application
60
SAP data
configuration data, setting up
54
customer master data
49
data objects
85
80
20 3
Index T
T
telephone numbers, formatting
61
terminology, table of equivalents
12
test transactions
BD10
62
BD12
59
customer IDOC, sending
59
material IDOC, sending
62
tools.cfg, modifying
26
trace file argument name
116
tracing options, saprfc.ini
185
transaction SE37
122
transaction SM59
42
transactional calls
204
See tRFC
tRFC
ALE and transaction bundling
87
configuration considerations
106
definition
13
typical problems, troubleshooting
190
tRFC Adapter
business service, adding
103
component parameters
120
Input method arguments
120
output arguments
121
user properties
120
tRFC BAPI Adapter
Send Transaction business service
156
tRFC BAPI Receiver
component parameters
124
connectivity, verifying
42
destination designation
23
Destination Entry, creating
24
multiple BAPI calls
123
receiving calls, overview
123
user properties
124
workflow for SAP sends
104
tRFC Receiver
BAPI calls, receiving, overview of
122
IDOCs, receiving from SAP
123
input integration object
125
troubleshooting
data not visible
186
SAP configuration problems
190
shifted decimal position
186
U
uagent.cfg
modifying
27
SAP parameters
27
user properties
BAPI Adapter, listed
115
component parameter overrides
114
EAI SAP IDOC MQ AMI Workflow
Processor
143
EAI SAP IDOC Workflow process
138
IDOC Send method
135
IDOC Wizard business service
132
method argument overrides
115
method arguments, compared to
115
SAPSendTrans component
156
setting values
114
tRFC BAPI Receiver
124
W
Workflow Simulator
workflows
108
Index Z
adding
103
troubleshooting
186
workflows, testing
Business Service Simulator
107
Business Service Simulator versus Siebel
Server testing
108
EAIRaiseError() function
109
eScript, testing aid
109
Siebel Tools features
110
system log files
109
triggered workflows, executing
107
Workflow Simulator
108
Z
ZDBMAS02
130
20 5
Index Z
206