SBC SAPAdapterGuide 481
SBC SAPAdapterGuide 481
SBC SAPAdapterGuide 481
SA P SY S TE M
Release 4.8.1
Copyright
©Copyright 2020 SAP SE. All rights reserved.
No part of this description of functions may be reproduced or transmitted in any form or for any
purpose without the express permission of SAP SE. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP SE and its distributors contain proprietary software
components of other software vendors.
Microsoft®, WINDOWS® and EXCEL®, NT® and SQL-Server® are registered
trademarks of Microsoft Corporation.
IBM®, OS/2®, DB2/6000®, AIX®, OS/400® and AS/400® are registered trademarks of IBM
Corporation.
OSF/Motif® is a registered trademark of Open Software Foundation.
ORACLE® is a registered trademark of ORACLE Corporation, California, USA.
webMethods® is a registered trademark of webMethods Incorporated, Virginia, USA.
INFORMIX®-OnLine for SAP is a registered trademark of Informix Software Incorporated.
UNIX® and X/Open® are registered trademarks of SCO Santa Cruz Operation.
SAP®, R/2®, R/3®, RIVA®, ABAP/4®, SAPaccess®, SAPmail®, SAPoffice®, SAP-EDI®, SAP
Business Workflow®, SAP EarlyWatch®, SAP ArchiveLink®, R/3 Retail®, ALE/WEB®,
SAPTRONIC® are registered trademarks of SAP SE.
All rights reserved.
Typographical Conventions
Interface Text Words or characters that appear on the screen. This includes field
names, screen titles, pushbuttons, menu names, and menu options.
User Entry Words and characters that you enter exactly as they appear in the
documentation.
<Variable User Variable user entry. Pointed brackets indicate that you replace these
Entry> words and characters with appropriate entries.
Name File names, path names, program names, user names, parameters,
file contents and operating system output.
KEY Keys on the keyboard. These include the function keys, e.g. F2, or
the ENTER key.
Icon Description
A caution. Cautions help users avoid errors which can, for example,
lead to loss of data.
Contents
Chapter 7: Routing IDocs and XML messages to the Partner Manager .................7-1
Introduction ...........................................................................................................7-2
Sending IDocs with ALE from an SAP System to SAP BC ..................................7-2
Posting IDoc- and RFC-XML (XRFC) Documents .................................................7-5
Posting an IDoc-XML Document from an HTTP Client ........................................7-5
Posting an IDoc via FTP .....................................................................................7-6
Posting an IDoc in an email message .................................................................7-6
Posting an IDoc from a Web Browser .................................................................7-7
Transmitting IDocs between two Business Connectors......................................7-7
Posting arbitrary XML documents ........................................................................7-8
Mapping IDocs to Other Formats........................................................................7-10
Creating a Routing Rule that points to a Flow Service .......................................7-11
Obtaining a Record Definition for Your IDoc ......................................................7-13
Mapping the data in an IDoc .............................................................................7-18
Pre-Routing Mechanisms for content-based routing with IDocs ......................7-23
Using the ALE Monitoring Features via the SAP BC .........................................7-26
Introduction ......................................................................................................7-26
IDoc Trace........................................................................................................7-27
Status Update via ALEAUD IDoc ......................................................................7-28
Status Update via SYSTAT01 IDoc...................................................................7-29
Improving the Performance of the Partner Manager..........................................7-31
Chapter 8: Coding Client Applications and Services ..............................................8-1
Overview ................................................................................................................8-2
Invoking RFCs from SAP Business Connector Server ........................................8-3
Calling SAP Services from Java Services ...........................................................8-3
Receiving IDocs from an SAP System..................................................................8-4
Accessing and Modifying Fields in IDocs ............................................................8-4
Converting an IDoc to XML .................................................................................8-5
Traversing all segments and attributes of an IDoc ...............................................8-5
Constructing an IDoc with the SAP Java IDoc Library ........................................8-6
Sending IDocs to an SAP System.........................................................................8-8
Transaction Features for HTTP and SAP-XML .....................................................8-8
Chapter 9: Security ...................................................................................................9-1
Product Availability ...............................................................................................9-2
SAP BC Configuration...........................................................................................9-2
SAP Business Connector Developer ...................................................................9-2
Chapter 1: Introduction
Welcome!
This guide describes how to install, configure, and develop applications for the SAP Business
Connector. It contains information for administrators who manage the system, and for application
developers who create applications that use the system.
To use this guide effectively, you should:
• Understand the basic concepts SAP Business Connector and XML.
• Have completed the tutorial in the SAP Business Connector Developers Guide or have a
general idea about how to perform basic tasks with the SAP BC Developer.
• Know how to create Flow Services and/or Java services.
• Be familiar with the set up and operation of the SAP Business Connector Server.
Related Documentation
The following documents are companions to this guide. Some documents are in PDF format and
others are in HTML.
SAP Business Connector Information about using the Server Administrator to configure, monitor, and
Administration Guide control the SAP Business Connector Server. This book is for server
administrators.
You will find this book at:
<sapbc>\Server\doc\SAPBCAdministrationGuide.pdf
SAP Business Connector Information about creating and testing SAP BC services and client
Developer Guide applications. This book is for application developers.
You will find this book at:
<sapbc>\Developer\doc\SAPBCDeveloperGuide.pdf
SAP Business Connector Information that orients you to SAP BC and shows you how to create a
Developer Tutorial simple application. It includes basic conceptual information about B2B.
This book is aimed at new users of SAP Business Connector.
You will find this book at:
<sapbc>\Developer\doc\SAPBCDeveloperTutorial.pdf
SAP Business Connector Information about the controls in the SAP BC Developer application
Developer Online Reference windows and step-by-step procedures describing how to perform tasks with
the SAP BC Developer.
You can access the online reference by clicking Help in an application
window or dialog box.
This reference is only available, when the SAP BC Developer is installed.
SAP Business Connector This guide describes the built-in services provided with a standard
Built-In Services installation of SAP Business Connector and located in the WmPublic or
WmDB packages.
You will find this document at:
<sapbc>\Developer\doc\SAPBCBuiltInServices.pdf
Serialization of ABAP data in In depth information about how ABAP data is serialized in XML messages.
XML This serialization is used for RFC and BAPI parameters.
You will find this document at:
<sapbc>\Server\packages\SAP\doc\ABAPSerialization.h
tml
XML Format Specifications In depth information about how RFCs, BAPIs and IDocs are formatted in
XML.
You will find this guide at:
<sapbc>\Server\packages\SAP\doc\IFR-
XMLFormatSpec.pdf
SAP Business Connector In depth information about the IDoc Java classes.
IDoc Class Documentation
You will find this guide at:
<sapbc>\Server\packages\SAP\pub\doc\idoc30\index.ht
ml
SAP Business Connector Descriptions of the Java classes and built-in services you use to create
API Reference SAP BC services. This reference is for application developers who build
SAP BC services.
You will find this book at:
<sapbc>\Developer\doc\api\Java\index.html
Microsoft BizTalk Framework This add-on package introduces XML messages that are based on the
1.0a Microsoft Biztalk Framework. Further information on this framework and the
BizTalk Envelope XML envelope it defines can be found on the web site
Specifications http://www.biztalk.org
See also:
Independent Document <sapbc>\Server\packages\SAP\doc\BizTalkEnvelopeSpec
Specification .pdf
Functional Highlights
• Synchronous and Asynchronous Communication with SAP Systems via RFC and
tRFC
• Bidirectional communication to and from SAP systems
• Higher level services to process SAP IDocs and BAPIs
• Easy XML and Internet enabling of existing SAP releases
• Support of BizTalk XML envelopes for BAPI and RFC calls
• Support of unified error handling of BAPIs and RFCs on XML level
• Out-of-the-box support of standard internet protocols HTTP, FTP, Email (client and
server side).
BAPI interfaces are developed according to strict development guidelines, which means
they are:
o well-defined
o stable
o implementation-independent
o well-documented
The SAP Interface Repository provides public web-based access to the collection of
BAPI interfaces provided by SAP and to the corresponding documentation.
In short, the use of BAPIs leads to the following advantages:
•SAP solutions are accessed on a standardized, implementation-independent
level. Implementation on the SAP server can therefore be exchanged without
invalidating the (BAPI) interface used by clients.
A business management function which is implemented as a BAPI can be called both
synchronously and asynchronously by using the same XML message.
Message Store
The SAP Business Connector provides a persistent Message Store that the transaction
manager uses to track all IDocs and all tRFC calls routed to and from SAP systems via
the SAP Business Connector Server.
Basic Concepts
To use the SAP Business Connector Server successfully, you should understand the
following terms and concepts:
Term Description
BAPI Business functions in SAP systems, which are written in the programming
(Business Application language ABAP. BAPIs are formalized RFCs. Systems that are remote to
Programming Interface) the SAP server commonly use BAPIs to have the SAP server perform an
action.
RFC Server (Listener) SAP terminology for a process that can accept RFCs from SAP systems.
This allows SAP systems to access functions in external systems. In SAP
BC terminology, this is an RFC Listener.
RFC Listeners are one or more threads on the SAP Business Connector
Server that waits for incoming requests from SAP systems. RFC Listeners
are named and register with an SAP gateway to indicate that they are ready
to accept requests. Listeners can accept RFC or tRFC requests.
RFC Client SAP terminology for a process that sends RFCs to an SAP system to invoke
functions.
tRFC Protocol for ensuring that an RFC is successfully executed and executed
(Transactional RFC) exactly once on the target system. The SAP Business Connector Server can
handle both inbound and outbound tRFCs.
tRFC protocol Communications method that the SAP server uses to asynchronously
invoke a function on a remote system and a remote system uses to
asynchronously invoke a function on the SAP system. The transactional
RFC (tRFC) protocol ensures that an RFC is successfully executed and that
it is executed exactly once.
TID Transaction ID. A 24 bytes long, globally unique identifier used by tRFC to
ensure exactly once execution.
RFC Requests that the SAP server initiates to have functions performed on
(Remote Function Call) remote systems, or calls remote systems initiate to have the SAP server
perform a function.
RFC protocol Communications method that the SAP server uses to synchronously invoke
a function on a remote system, and a remote system uses to synchronously
invoke a function on the SAP system.
Term Description
SAP BC Service SAP Business Connector Server functions (interfaces to data sources, XML
documents, or HTML Web sites) that are named with hierarchical
interface/service syntax. Services can be developed in the languages Flow,
XSLT, Java, or C/C++. They can be developed by you, third-party vendors,
or SAP AG.
Partner Manager A process that accepts messages and routes them to a configured location,
for example, messages can be routed to an SAP system, an SAP BC
Server, or a remote URL in an XML format. Typically, IDocs are routed
through the Partner Manager.
Transaction and A file-system-based storage component that the SAP Business Connector
Message Store Server uses to track all transactions that pass through the Partner Manager.
The following illustrates the components in a system that uses the SAP Business
Connector Server:
Requests
RFC mapped to
a service
RFC Server
(Listener)
IDOCs
tRFC Requests
that are not
Partner Manager
mapped to
tRFC a service
Message Store
Requesting the Execution of a BAPI from the SAP Business Connector Server
SAP Business Connector Server SAP Server
SAP BC Services
BAPIs
RFC
RFC Client
The SAP Business Connector Server uses the RFC Server (Listener) to listen for
incoming requests to execute SAP BC services from an SAP server. From an SAP
application point of view, calling the SAP Business Connector Server is no different
from calling any other RFC server.
RFCs
SAP BC Services
RFC RFC Server
(Listener)
Message Store
An SAP Business Connector inbound call is an outbound call from the SAP system’s point of
view.
When the Partner Manager receives a message with tRFC or an XML-message that
contains a TID, it logs the transaction in the Message Store. It then uses routing rules to
determine where to route the messages. The routing rules indicate where to route the
message based on who the messages is from (sender), who is to receive the message
(receiver), and the message type. A message can be:
Routed to an SAP server (IDocs, RFCs and BAPIs)
Routed to an SAP BC service on the local machine or a remote machine
HTTP posted to an URL
FTP'd to a location
Sent via e-mail to a mailbox.
M Rule N
A
N Rule E
A
G Rule
T
E HTTP post a URL http://company.com/url
Rule
R
Overview
You can create SAP BC services that execute a Remote-enabled Function Module (RFM)
residing on an SAP server. A Function Module performs functions against data in the SAP
system. You can create a service for any Function Module that is designated for external
use (i.e. ‘remote enabled’). This includes all BAPIs, which are formalized RFMs. To
create an SAP BC service, you simply select SAP server and the RFC that you want the
service to execute. Such a service is called “RFC Outbound Map”.
After creating the RFC Outbound Map, you can use it at any point in your Business
Connector applications to execute the corresponding RFM in the backend. You can also
allow external HTTP/FTP or SMTP clients to invoke the outbound map.
Before you can create an RFC Outbound Map, you must configure the SAP Business
Connector Server to define the SAP servers you want to use. You identify an alias name
for the SAP server and specify information that the SAP Business Connector Server
requires to connect to the SAP server.
This chapter describes how to map an SAP BC service to a RFM and how to test the SAP
BC service.
You must have Administrator privileges on the SAP Business Connector Server to execute these
procedures. If you do not have such privileges, have your SAP Business Connector Server
administrator perform the following for you.
General Settings
For the general settings of the SAP BC server you can use the Administrator User
Interface:
Setting Description
Timeout check period (seconds) Time interval in seconds between checks whether
unused pooled connections have timed out
Poolqueue waiting time (seconds) Delay (seconds) until requests waiting for a
connection from a pool time out in the queue
Response time (seconds) Delay (seconds) until a listener responds at the latest
to an incoming request.
Default XRFC version Version of RFC-XML sent. Valid versions: 0.9 and
1.0 (default).
SNC library path Path of the SNC library needed for secure RFC
connections.
CPIC Trace Level The trace level for the CPIC layer. The valid value
range is from 0 (trace is off) to 3 (most verbose
trace).
As of version 4.8.1 a new connection type WebSocket is offered in addition to the standard
CPIC communication. Depending on the connection type, different sets of information
must be provided to set up the SAP server.
Connection Type Type of connection, either the traditional connections using the
CPIC protocol or connections using the WebSocket
protocol available with ABAP Platform 1909 (Application
Server ABAP 7.54) or higher.
Complete the following fields with the values similar to how you would configure them
in a SAPGui entry.
System
Name An alias for the SAP server. This is the name by which the server
will be known to SAP BC services.
Login Defaults
Language The logon language. This can be either the one-character SAP
language code. or the two-character ISO language code.
Depending on whether you want to use “direct application server logon” or “group logon/load balancing”,
fill in one of the two following sections:
Server Logon
You can leave all remaining fields at their default values. If you do so, the BC will always connect to the
same application server.
Load Balancing
Complete the following fields only if you apply the group login concept, (in this case you do not need to
enter values in the ‘Server Logon’ section):
Load Balancing If you choose ON, the group login concept is active.
Advanced settings
ABAP Debug Can be set to "Off" (default) and "On". If set to on, the BC will try
to attach a SAPGui to any newly opened RFC connection, switch
the connection to debug mode and stop execution at the first
ABAP statement of any called function module. See chapter Notes
on the option ABAP Debug.
Use SAPGUI Specifies to use a SAPGui. The default SAPGui will be started
and attached to each new RFC connection being opened. It is
strongly recommended to use this option only if really needed for
executing specific ABAP Remote Function Modules which require
an output to a GUI. The development and usage of such ABAP
RFMs should usually be avoided.
Security Options
SNC enabled Determines whether this server should use SNC or not. Default:
no.
SNC Name Your own SNC name if you don't want to use the default SNC
name. This is the name you chose when generating a PSE.
SNC Partnername SNC name of the SNC partner (RFC server) or SNC name of the
message server (Load Balancing).
SNC Quality of protection, possible values:
Quality of Protection
• Authentication only
• Authentication and integrity protection
• Authentication, integrity protection and encryption
• Use global build-in default settings
• Use maximum value supported by security product
Specifies whether the repository pool for this server should use
Repository uses SNC
SNC protected connections. Default: no.
Note: If you want to use SNC connections for the communication, there are some more
general and user specific settings required on the SAP application server. These settings
are listed below:
- Certificate log in
- Diag
- RFC
The fields in the sections System and Advanced Settings are the same as with the
CPIC Connection connection type. The following fields are WebSocket specific.
System
Client Certificate The path and file name of the BC Server’s certificate to use for
client authentication with the server.
Signing Certificates Comma‐separated list of path and file names signing the client
certificate (certificate chain). List the files containing the
certificates in the following order: intermediate certificate 1, …,
intermediate certificate n, root certificate.
Private Key The private key matching the client certificate to handle signing
and encryption.
Once a SAP Server entry has been created, the password can only be changed via a separate
screen. To display this screen, choose SAP SAP Servers selecting the Alias of your SAP
Server and then click on the "Change password" link.
When you select Default or Custom Certificates as the Logon Type, the chosen certificate must be
mapped to a user in the target SAP System. In the CERTRULE transaction of the SAP target
system, add the certificate you want to authenticate with. When you selected Custom Certificates,
this is the Client Certificate in the Login Defaults section of the SAP Server definition. If you
selected Default Certificates, it is the Server’s Signed Certificate defined under Security
Certificates.
Upload the according certificate in the CERTRULE dialog of the target SAP System:
Then select Explicit Mapping to map the uploaded certificate to an existing user in the SAP
System:
In the example above, whenever the BC Server authenticates at the SAP System with the
certificate, the RFC will be executed as the SAP User MYSAPBCUSER. Any function call will
then be authorized based on the access permissions of this user.
Connection Information
1 Choose SAP from the SAP Business Connector navigation panel to display the
main SAP page if it is not already displayed.
2 Select the Lookup tab.
3 From the drop-down list in the Server Name field, select the name of the SAP
server on which the FM you are to test resides.
4 Enter the name of the FM you want to test in the field Function Name of the
group Function Search. For example, enter BAPI_COMPANY_*. Then select
the Search button. The SAP Business Connector searches for all RFCs that
begin with BAPI_COMPANY_.
5 In the list of matching RFCs that is returned, follow the link of the RFC you want
to test. For this example, choose BAPI_COMPANY_GETLIST. The SAP
Business Connector displays the function signature for the selected FM as
shown below. It lists the imports, exports and tables comprising this FM.
Function Signature
6. Choose Test Function to invoke the FM on the SAP server you selected in step 5.
7. This BAPI doesn’t have any inputs. Just press Test Function again to proceed.
After a few moments, a screen displays the number of companies found.
Follow the entries link beside this row count to view the companies found.
Terminology
To use SAP Business Connector Server successfully, you should understand the
following terms and concepts:
Term Description
Export Output parameters of a Function Module. Output parameters are simple values
or structures.
Function Signature Specifications of the import, export, and table parameters of an FM. Also known
as a function interface.
Import Input parameter to an FM. Input parameters are simple values (e.g., string or
number) or structures.
Structure SAP data structure containing one or more fields. This can be thought of as a
Term Description
single row of a table.
Table SAP data structure that is both an import and export to a function. Tables can be
created and passed to an RFC. The FM can modify these tables and return
them. Tables, themselves, are no different from relational database tables,
consisting of a series of fields and rows of data for these fields.
8. Set the parameters on the Outbound Map for <FM_Name> screen as follows.
(Leave all other fields at their default values.)
In the field… Specify… Description
Folder Demo This is the name of the folder in which the service
you are mapping resides.
Service CompanyGetDetail This is the name of the service to which you are
mapping the FM.
Package Default This is the name of the package into which the
service you are mapping will be generated.
SAP Business Connector folder and Service names are case sensitive, as are the parameters to the
Flow Service.
Choose Save to add this map to the SAP Business Connector Server.
For Outbound and Inbound Maps associated with an SAP Server alias, there is an option
to search for maps without reference in the map overview. The symptom, that a map
exists, but is not listed in the function map list, can occur when you distribute a package
containing Inbound/Outbound Maps from a development system to a production system.
In the production BC the maps exist, but are not referenced in the function map list of the
associated server.
3 Click on the "Find Maps for <serverName>" link at the top of the 'RFC function maps’
screen. This will display a list with all maps found.
4 Select the maps you want to add and press the ‘Add’ button. The corresponding maps will
be added to the function map list and will be referenced from now on.
Note: There can only be a single reference for an Outbound Map in the map list. If
there are multiple entries for Outbound Maps of the same function module, only the
first one will be referenced. Although all of them will work, it is still preferable to
have a single Outbound Map that is called from all locations.
Since release 3.5.2 optional tables are really optional, i.e. if an optional table is not passed
to an Outbound Map, there won't be any values returned for that table. If the table is
optional and should not be filled in the request, then how can the Outbound Map return
data for that table in the response? The answer is simple:
Example: you are calling an Outbound Map named opotional_table_demo. In this Outbound
Map there is an optional table called T_OPT_SBCOPT. To pass this table use the "Set value”
button for this parameter.
The only thing you have to do now is to uncheck "Overwrite Pipeline Value", then the
empty table is only the default value. With these settings the optional table will always be
returned in the output, both, when a filled table is passed in as input for the function call,
as well as when there is none.
Use the following procedure to test the service you just created.
1 Choose Packages -> Management -> Browse Folders from the SAP
Business Connector navigation panel.
You will see your service CompanyGetDetail. This is the SAP BC Service
mapped to BAPI_COMPANY_GETDETAIL.
After you create an SAP BC Service that executes a function module, you can create
other SAP BC Services and clients that invoke the Service.
--> you have to set the content type. When sending an RFC-XML
document, the content type has to be application/x-sap.rfc
Cookie: ssnid=<4711>
--> This is optional. On the first connect SAP BC will generate
a session cookie. When you use this for the following
communication you will be assigned to the same SAP BC
session. If you do not use the session cookie a new SAP BC
session will be created with every HTTP request.
The HTTP Body then has to consist of the XML document, encoded in RFC-XML.
Depending on whether the call was processed successfully or not, you will get a response
or an exception XML document (see the document packages/SAP/doc/RFC-
XML.html). You can also force SAP BC to invoke the Function Module with tRFC by
setting a transaction ID in the Envelope of the XML document. However, you should
bear in mind that only FMs without return parameters can be called with tRFC.
Starting to Browse
You can start browsing your BAPIs using the Lookup tab. Here you can enter the name of
a business object and a BAPI. This selection always applies to the SAP System selected
in the field Server Name.
There are several ways you can fill out the form:
In the group BAPI By Name enter the full name of the business object and BAPI. You can
either view the details of the BAPI by selecting Lookup or directly invoke the BAPI via
XML by pressing on bXML.
In the group BAPI By Name enter only the name of the business object. Choose Lookup to
view details of the business object and select one BAPI from the list of available BAPIs
for the business object.
In the group BAPI By Name enter * in the business object field to view a list of all
business objects available in the selected system.
Note: Please keep in mind that business object and BAPI names are case-sensitive.
Each link in this list represents a business object. If you follow the link, you will get a
detailed view of this business object. Please note that this list may also contain business
objects that do not contain BAPI methods.
Just follow the links to the corresponding table fields to display more information on a
specific key field or BAPI.
Displaying a BAPI
By entering the full name of the business object and BAPI in the corresponding field on
the Lookup main page, you can display detailed information of the BAPI. You can also
display this information by following the corresponding link on the display page for a
business object.
Field Description
Static method The Static method flag is true, if the BAPI is an instance-independent method. In
practice, that means that you do not have to specify the business object’s key
fields when calling this method.
Factory method The Factory method flag is true, if the BAPI is used to create an object instance
inside the SAP System. Factory methods return the key fields of the business
object.
Function Module The Function Module (formerly known as Implementing RFC) is the message
type that has to be used to set up routing for synchronous calls coming from a
SAP System. This is technically realized via RFC, so here the name of the
corresponding RFC function module inside the SAP System is provided.
Although it is possible at the moment, it is not recommended to call BAPIs
directly via RFC-XML, as this would only be an implementation-dependent view
of the BAPI.
Parameters The Parameters field contains a list of all parameters in the BAPI interface. By
selecting this link, you can display more information on each parameter. Please
note that the key fields of a business object are not displayed in this parameter
area but in the key fields area on the business object detail page.
By using the Create XML template button, you can generate the XML message that has to be used
to invoke this BAPI via XML. After it has been generated, you can immediately send the XML to
the SAP Business Connector for testing purposes (see below).
Field Description
Internal Name The internal name of the parameter is displayed.
Direction The use-direction of the parameter is displayed. BAPIs use importing, exporting
and changing (= importing and exporting) parameters.
Optional If the flag Optional is set to true, you can omit this parameter in an XML
message. Usually, the implementation inside the SAP System uses specific
default values for optional parameters that were omitted.
Table If the flag Table is set to true, this parameter may consist of several lines. Each
line has the data type specified in the ABAP Dictionary Type field.
ABAP Dictionary Type The ABAP Dictionary Type is a link to the data type description used for this
parameter. This may be a whole structure or just a field of a structure. By
following the hyperlink, you will always see the whole structure.
Field Description
Please note that key fields are used with instance-dependent (non-static) methods and with factory
methods.
In calls to these methods, the key fields of the corresponding business object have to be
specified as attributes of the business document root element
Using the key field CompanyCodeId in a call to the CompanyCode.GetDetail:
<?xml version="1.0" encoding="iso-8859-1"?>
<biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1">
<header>
…
</header>
<body>
<doc:CompanyCode.GetDetail CompanyCodeId="0001"
xmlns:doc="urn:sap-com:document:sap:business"
xmlns="" >
</doc:CompanyCode.GetDetail>
</body>
</biztalk_1>
There are three ways of calling the BAPI, which can be selected through the dropdown
list:
Synchronously calling the BAPI in an SAP System.
Asynchronously calling the BAPI in an SAP System. This only works for BAPIs that are
mapped to an ALE interface. To see whether the BAPI is mapped to an ALE
interface, check the BAPI detail page. If an ALE message type is specified, the BAPI
is asynchronously callable.
Applying routing rules: The call will be sent to the BAPI inbound process of the Partner
Manager that will check, if a routing rule for this BAPI call exists, and will forward
the call to the specified service. This will only work, if a correct routing rule has been
setup, otherwise you will receive an XML error-message.
When you select one of the first two options, the SAP Business Connector will execute a
synchronous or asynchronous call without checking the existence of a transaction
identified in the XML message. However, when using routing or when posting directly to
BC services, you have to specify a transaction identifier in the XML message, if you want
to execute an asynchronous call. If you want to execute a synchronous call, you do not
need to specify a transaction identifier.
After choosing the invoke button, the result of your XML call is displayed. In case of
synchronous processing, this will be a BizTalk message with either the exporting
parameters of the BAPI or with an error message.
For asynchronous calls, this will be a BizTalk message with an empty body in the case of
success or with an error message, if the message could not be delivered to an SAP System.
Application specific errors are not returned in the case of asynchronous calls, but you can
use the ALE monitoring tools in the target SAP System to check these errors.
Overview
You can create ABAP reports on the SAP server that invoke SAP BC services. This
allows SAP users to access the information that is available to the SAP Business
Connector.
Before you can create a report that invokes an SAP BC service, you must configure the
SAP server to have an RFC destination for an SAP Business Connector Server. This
defines to where the SAP server should send RFC calls that invoke an SAP BC service.
You must also configure the SAP Business Connector Server to have a listener (RFC
Server) that listens for RFCs from the SAP server.
After you have the SAP server and the SAP Business Connector Server configured, you
can create a function module on the SAP server that will be mapped to an SAP BC
Service. You also need to create an “RFC Inbound Map” on the SAP Business Connector
Server. The Inbound Map indicates what service the SAP Business Connector Server is to
execute when it receives the RFC from the SAP Server.
4 Choose Create.
5 In Destination field, type a name that will meaningfully identify both
the SAP Business Connector Server and the SAP system itself. For
example, if the SAP system is named CER and the SAP BC Server
is named SBC, name your RFC destination SBCCER. You will
need to re-enter this name several times during the course of this
section, so keep it simple and memorable.
This field is case sensitive. We recommend that you pick a name that is all
UPPERCASE characters.
This field is case sensitive. We recommend that you pick a name that is all
UPPERCASE characters.
8 Enter the host the BC server is running on into the host field. This
can be a human readable host name or an IP4 address like
10.20.0.33.
9 Enter the network port on which the BC server’s WebSocket
listener will be listening on. You specify the port when configuring a
WebSocket listener in BC. See To create a WebSocket RFC
Listener on the SAP Business Connector Server.
Note that ports may be occupied by other programs or services on the target
BC host. Make sure the port you pick is still available and can be reached
from outside the host.
10 If you want or need to use a proxy to reach the BC host enter the
according proxy hostname or IP into the Proxy Host field and the
proxy port into the Proxy Service field. If it is an authenticated
proxy, provide the proxy credentials in Proxy User and Proxy
Password.
Note that by using this feature, you can easily connect to SAP BC
servers running outside the LAN segment of the SAP system!
11 A WebSocket connection needs to authenticate at the server.
Navigate to the Logon & Security tab where you can either
authenticate by user/password or by certificate(s).
3 In the Listeners column list of installed SAP servers, select the number
(initially 0, indicating that there are no listeners defined) corresponding
to your SAP Server for which you want to create a listener.
4 Choose Add Listener.
Connection Type TCP/IP or WebSocket. The set of fields to fill in changes depending on
your selection. Chose TCP/IP.
Program ID The Program ID that you specified when creating the corresponding
RFC destination on the SAP server. This field is case sensitive.
Number of Threads The number of simultaneous incoming RFCs that this Listener can
handle.
Gateway Service The Gateway Service. This corresponds to your SAP system number. If
your SAP system number is "01" then your gateway service is
"sapgw01."
Again, this must be exactly the same parameter as you chose for the
corresponding RFC destination in the SAP system.
Autostart Whether this listener will start automatically when the SAP Business
Connector Server starts.
Select Yes to have SAP Business Connector automatically start the
listener when the Server is started.
If you select No, you will have to manually start the listener after the
SAP Business Connector Server is started. To manually start the
listener, from the SAP Servers tab page, choose the number in column
Listeners for the appropriate SAP server. Then, press the red icon in
Once a listener is enabled, a connection exists between the SAP Server and the SAP Business
Connector.
Repository Server The SAP server alias is used as a repository for function interfaces and
structure definitions of inbound calls. This way it is possible to use
RFMs even if they are not defined in the calling system.
Use IDoc Segment Flag indicating whether partner profiles should be queried if possible in
Release from Partner order to create documents with the therein defined release.
Profile
If the listener receives requests for function modules, whose metadata is not yet in the DDIC
cache, it must be able to log in to the Repository System. Otherwise, it will fail to start up or will
return errors when receiving incoming RFCs. The above fields must be completed thoroughly and
accurately. If this information is incorrect or left blank, the listener will fail to start.
10. Choose Save to commit these settings to the SAP Business Connector Server.
11. To start the listener, press the read ball in the Started? column.
After a short pause, the ball turns green.
If an error occurs during startup, the state ball will turn yellow when refreshing the page. Click
the yellow ball to receive the error message. Error messages at this stage typically indicate a
problem with either the listener configuration or the network. Review the listener settings and
check the network.
1. Toggle back to your SAP GUI session. If your screen does not contain a Test
Connection toolbar button, take the following steps.
1.1 Choose Administration → System Administration → Administration → Network → RFC
Destinations (transaction SM59).
1.2 Open the TCP/IP connections folder.
1.3 Select the RFC destination you previously created.
2. Select the Test Connection toolbar button.
- If the SAP server can successfully connect to the SAP BC RFC Listener, it will display connection
information as shown below.
- If you receive an error message, review the steps for creating an RFC Destination and creating an
RFC Listener to verify your configuration settings.
Connection Statistics
5 Complete the following fields of the SAP Listener Definition page. (Leave
all other fields at their default values.)
Connection Type TCP/IP or WebSocket. The set of fields to fill in changes depending on
your selection. Chose WebSocket.
WebSocket Port The network port on which the BC listens to incoming WebSocket
connections. This must be the same port you specified in the SAP
system when you created the WebSocket RFC destination in the Port
field in the Technical Settings tab.
Note that ports may be occupied by other programs
or services on the machine BC is running on.
Make sure the port you pick is available and can be
reached from the SAP system you want to connect
from.
Number of Threads The number of simultaneous incoming RFCs that this Listener can
handle.
Autostart Whether this listener will start automatically when the SAP Business
Connector Server starts.
Select Yes to have SAP Business Connector automatically start the
listener when the Server is started.
If you select No, you will have to manually start the listener after the
SAP Business Connector Server is started. To manually start the
listener, from the SAP Servers tab page, choose the number in column
Listeners for the appropriate SAP server. Then, press the red icon in
field Started?. The icon becomes green when the listener is started.
Once a listener is enabled, a connection exists between the SAP Server and the SAP Business
Connector.
Repository Server The SAP server alias is used as a repository for function interfaces and
structure definitions of inbound calls. This way it is possible to use
RFMs even if they are not defined in the calling system.
Use IDoc Segment Flag indicating whether partner profiles should be queried if possible in
Release from Partner order to create documents with the release defined therein.
Profile
If an RFC Listener receives requests for function modules, whose metadata is not yet in the
DDIC cache, it must be able to log in to the Repository System. Otherwise, it will fail to start up
or return errors when receiving incoming RFCs. The following fields must be completed
thoroughly and accurately. If this information is incorrect or left blank, the listener will fail to
start.
If an error occurs during startup, the state ball will turn yellow when refreshing the page. Click
the yellow ball to receive the error message. Error messages at this stage typically indicate a
problem with either the listener configuration or the network. Review the listener settings and
check the network.
The WebSocket Listener reads the certificates defined under Security Certificates when it
starts. Stop and restart all WebSocket listeners when you have changed any of these certificates.
At restart the WebSocket Listener re-reads the configured certificates.
1 Toggle back to your SAP GUI session. If your screen does not contain a Test
Connection toolbar button, take the following steps.
1.1 Choose Administration → System Administration → Administration → Network → RFC
Destinations (transaction SM59).
1.2 Open the WebSocket RFC folder.
1.3 Select the RFC destination you previously created.
2 Select the Test Connection toolbar button.
- If the SAP server can successfully connect to the SAP BC WebSocket RFC Listener, it will display
connection information as shown below.
- If you receive an error message, review the steps for creating an RFC Destination and creating an
RFC Listener to verify your configuration settings.
Connection Statistics
If an error occurs when testing the connection, the BC Server might not trust the certificate the
SAP Server is presenting when negotiating the connection. On one hand the SAP System must
trust the certificate specified under Security Certificates Server’s Signed Certificate and its
certificate chain. On the other hand, the BC System will obviously trust its own Server’s Signed
Certificate when the SAP System presents it. One possibility to make the BC Server trust the
SAP System is to add the BC Server’s Signed Certificate to the SAP System’s SSL client
certificates in the transaction STRUST.
Make sure the certificate is included in the certificate list you selected when configuring the
WebSocket RFC destination.
Another way is to add the signing root certificate of the SAP system’s SSL client certificate to the
SAP BC’s trusted directory.
Viewing and deleting RFC Trace Files and SAP Log Files
In the Administrator UI browse to "SAP Monitoring". Here you can view and delete
RFC Trace Files and SAP Log Files.
RFC Trace Files are split into several parts, each of them containing one trace entry along
with the date and time it was created. Large SAP Log Files are split into several parts of
about 500K. In this way it is avoided that the browser has to load too large documents,
which would take a long time or even cause a time out. Using the "Back" button of your
browser, you can return from the display of one part to the list of parts for that file.
If you try to delete a file that is still open (e.g. because the Server is still writing to it), you
will get a notification, and the file is not deleted.
If the feature Log Throughput data has been set to “On” on the SAP Settings page and
if the log level for Component=SAP is 7 or higher, you can view performance output
information for the BC server in the SAP log file. The corresponding terms are described
below:
3 No. of bytes received Total number of (uncompressed) bytes of data received by the
Business Connector from the SAP system. In the RFC layer that might
be less because of compression.
4 Time for marshalling Time needed for transferring the data from JCo Java Objects to RFC C
(ms) structures.
5 Time for Time needed for transferring the data from RFC C structures to JCo
unmarshalling (ms) Java Objects.
6 Time for middleware Time needed for executing a function module in an SAP system.
calls (ms)
7 Time for handling Time needed to handle an inbound request from an SAP system in the
request (ms) Business Connector after unmarshalling and before marshalling the
data.
8 Total elapsed time Total time needed for handling inbound/outbound calls in JCo layer.
(ms) (1)-(8) is the performance data of the JCo layer. In addition to that
there is data available for the Business Connector data layer seen in
(9)-(14).
9 BC Data: Time for Time needed for transferring the data from Business Connector
marshalling (ms) Objects (pipeline representation) to JCo Objects.
10 Time for Time needed for transferring the data from JCo Objects to Business
unmarshalling (ms) Connector Objects (pipeline representation).
11 Time for preparing Time needed for preparing execution of a function module (outbound
(ms) calls) or invocation of a service. This includes repository queries for the
data structures and the function interface, opening connections to the
involved systems, etc.
12 Time for RFC calls Time needed in the JCo layer for outbound calls. Should be equal to 8)
(ms)
13 Time for BC service Time needed for the invocation of a service to handle an inbound
calls (ms) request in the Business Connector after preparing/marshalling and
before unmarshalling the data. (Listener performance data).
14 Total time for function Total time needed for handling inbound/outbound calls in BC layer.
calls (ms)
The purpose of this type of monitoring is to give an overview of the status of a Java
system. You’ll find this information on the SAP Monitoring screen:
Monitoring screen
At the bottom of this screen you will find the following jARM information:
jARM information
The term… Specifies…
Request rate Requests per second since the jARM Monitoring has been started.
jARM Requests You can get the TOP 100 requests, i.e. the requests that needed the
longest execution times. To restrict those entries, you can specify two
inputs before pushing the "Show"-Button:
Info for … Enter a wildcard-like pattern for the request names, for which you want
the information. You can use only exact patterns and patterns with a
single '*' at the end, such as 'IDoc*'. You cannot make entries with the
format '*XML*'.
max. listed Limits the number of requests to the given number. After pushing the
Requests button, the jARM Requests Overview is displayed.
jARM Components You can get accumulated information about all components, which
have been used in Requests. To restrict those entries, you can specify
an input before pushing the "Show"-Button:
Info for … Enter a wildcard-like pattern for the Component names, for which you
want the information. You can use only exact patterns and patterns
with a single '*' at the end, such as 'client.*' You cannot make entries
with the format '*Render*'. After pushing the button, the jARM
Components Overview is displayed.
jARM Users You can get accumulated information about all users that have been
used in requests. To restrict those entries, you can specify an input
before pushing the "Show"-Button:
Info for … Enter a wildcard-like pattern for the usernames for which you want the
information. You can use only exact patterns and patterns with a single
'*' at the end, such as 'DOE*' You cannot make entries with the format
'*SMITH*'. After pushing the button, the jARM Users Overview is
displayed.
Starting with Release 4.7 the Business Connector can be setup to accept passports from
other components and pass them on to other components and to write its own performance
records.
Prerequisites
On Business Connector side everything is prepared for the support of passports and DSR.
Setup
You can enable DSR support on the Business Connector as follows:
1 Install the necessary version of sapccmsr on the machine and find out the
directory that sapccmsr uses for storing statistical records. (On Windows
this can be found in the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\SAP\CCMS\DSR\DirDsr. For Unix
please see the documentation of sapccmsr.)
2 Go to Adapters SAP Settings, go into change mode and set the
following two parameters:
DSR Root Directory=<directory from step 1.>
Generate DSR Passport=on
3 Restart the Business Connector
Reported Values
When the Business Connector receives a message via the RFC Listener, Reverse Invoke,
HTTP(S) Listener, Email Listener or FTP Listener, it accepts the passport from the sending
SAP system (in the case of RFC Listener) or creates a new passport (in the other cases).
Also, if a Service is started in the Scheduler, a new passport for the invocation is created.
Then the Business Connector collects the following information regarding the processing
of this message:
Startdate yyyyMMdd
Starttime HHmmss (in GMT+00)
Enddate yyyyMMdd
Endtime HHmmss (in GMT+00)
GUID The 32-digit GUID from the passport. This serves to
identify the transaction across system boundaries.
Action The name of the Flow/Java Service being invoked.
Action type One of the following:
1. SAP BC is called via RFC
2. SAP BC is called with an XML document via
http(s), ftp or email
3. SAP BC is called via IDoc
4. A transaction is started via Service Invocation
or in the Scheduler
UserId Business Connector User under which the Service is
executing.
LOAD The time in ms, the Business Connector needs to
convert the RFC data to IData (Records and
RecordLists). This field is used only, when the BC is
called via RFC Listener.
WAIT The time in ms, the Business Connector is waiting for
other components (databases, FTP&Web servers, SAP
systems etc.)
RESP Total processing time in ms including the wait time.
MEM Size of received document in bytes. This field is used
only, when the Business Connector is called via
HTTP(S), FTP or Email Listener.
Additional information Information as to how this message was
received/started. One of the following: Scheduler,
REVINVOKE, EmailListener:<imap or
pop3>:<user>@<host>, RFCListener@<ProgramID>,
FTPListener@<port>, HTTPListener@<port>
For each call into a subcomponent a "call subrecord" is attached to the above information:
An SAP Business Connector inbound call is an outbound call from the SAP system’s point of view.
1 Using the SAP GUI, go to the ABAP Function Library. Choose Tools → ABAP
Workbench (transaction SE37).
2 Create a function group, e.g. Z_FG01 (Menu Goto/Function groups/Create
group)
3 Enter Z_BC_PRODUCT in field Function module. This is the name of your SAP
product retrieval function.
4 Choose Create.
5 Complete the following dialogs in accordance with the policies governing your
SAP development environment. The only aspect relevant to the SAP Business
Connector Server is the field Processing type. Select Remote Function Call
supported to allow this function to call externally to the SAP Business Connector
Server.
6 Define the import/export parameters of your function. Add an import named
SKU. You must provide a Reference field. Pick a character field with a length
greater than 5. For this example, use VBERROR-VARMSGVAL.
Generate for <any listener A drop-down list with all listeners available for this
Listener specified and active> server alias. This allows the generation of map
signatures using the repository of the Listener which
is selected for all metadata lookups.
Package Default This is the name of the package into which the
Inbound Map will be generated. This does not need
to be the same Package in which the Service to
which you are mapping the RFC is contained.
Technically, an Inbound Map is a Flow Service that
starts with the name sap.inbound.<SysID>:<FM
name>. It should not be modified manually except in
the cases described further down.
Folder tutorial.catalogue This is the name of the Folder in which the Service to
which you are mapping the RFC is contained.
Service getProductData This is the name of the Service to which you are
mapping the RFC.
The name of the table must be SBCHEADER and it must have the following structure.
This structure is defined in the SAP System starting with release 4.6A under the name
SBCCALLENV. If you do not have this structure in your system, please define a similar
one as above.
The header table can contain an arbitrary number of key/value pairs. If you want to pass
additional keys to the SAP Business Connector you can define your own name/value
pairs and insert them into the SBCHEADER table. You would read out these records
inside a java module in the SAP Business Connector with the following statements (case-
sensitive):
IDataCursor c = pipeline.getCursor();
Values sbcHeader = IDataUtil.getValues(c, "sbcHeader");
String property = sbcHeader.getString("fileName");
System.out.println("Property was "+property);
If you want the Partner Manager to invoke a routing rule to route the RFC, the header
table must contain the sender and receiver for the RFC. When determining the routing
rule to invoke, the Partner Manager uses the sender and receiver you specify in the header
table and uses the function module name in place of a message type.
To have the Partner Manager use a routing rule, include the following information in the
header table:
Key Value
sender Name of the sender. This name should match the name of a sender in the routing rule you
want the Partner Manager to use to route the RFC.
receiver Name of the receiving partner. This name should match the name of the receiver in the
routing rule you want the Partner Manager to use to route the RFC.
If you want to control the routing of an RFC from the SAP system directly (without
requiring a routing rule on the SAP Business Connector Server), you can include
transport information in the header table. The transport indicates where the Partner
Manager is to route the incoming RFC. When the Partner Manager receives an RFC that
specifies the transport, it does not invoke a routing rule but directly passes the RFC to the
specified transport. The transports that you can identify in a header table to dynamically
route an RFC through the Partner Manager are:
Route the RFC to B2B Service
Route the RFC to an SAP server
Post the RFC-XML to a URL
The following describes the key/value pairs you must specify for each transport you can
specify.
To route the RFC to a B2B Service, use the B2B Service transport.
Key Value
transport B2B Service
This value identifies the transport. Specify the value exactly as specified
above
serverAlias Name of the SAP Business Connector Server on which the service to invoke
resides. If the service resides on the server that routes the message, specify
(local). Otherwise, specify an alias for a remote server. For the routing to be
successful, the server routing the RFC must have the defined alias for the
remote server.
servicePath Name of the folder in which the service resides. The folder name is case
sensitive; use the exact combination of upper- and lower-case letters.
service Name of the service to which to pass the RFC. The service name is case
sensitive; use the exact combination of upper- and lower-case letters.
valueScope Where you want the Partner Manager to store the connection to the remote
server.
To save the connection in your own session, specify SESSION. Use
SESSION when the work being performed requires state be maintained.
To save the connection in a shared area, specify GLOBAL. Use GLOBAL
when the work being performed is stateless.
Key Value
transport RFC
This value identifies the transport. Specify the value exactly as specified
above.
server Name of the SAP server to which you want the RFC routed. This SAP server
alias needs to be defined on the Business Connector.
Key Value
transport XML
This value identifies the transport. Specify the value exactly as specified above.
url URL to which you want to post the RFC.
xmlType The XML format you want the Partner Manager to use for the http POST.
Specify SAP-XML if you want the data in an XML format that is compliant with
the SAP XML specification. Specify Values-XML if you want the data in
webMethods native XML format.
Username to supply for a username/password authentication challenge
httpUser
(optionally)
Password to supply for a username/password authentication challenge
httpPassword
(optionally)
For sending RFCs as bXML, please refer to page 6-11.
To test a function module with the function builder, write a wrapper module. The wrapper
module calls your RFC function module. The SBCHEADER table cannot be added in the
function builder and must not be part of the function interface of the module you want to call
remotely.
Note: normally you would not create such a wrapper module. Instead you would include
code similar to the following in your ABAP report at the point, where you want to call the
Business Connector.
The following example invokes the SBC_DEMO_COPY function module and echoes the
inputs it receives in the INPUT parameter. The input parameter DESTINATION is
interpreted as the RFC destination.
A wrapper for SBC_DEMO_COPY could look like this:
FUNCTION SBC_DEMO_WRAPPER.
*"------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT) TYPE CHAR255 OPTIONAL
*" VALUE(DESTINATION) TYPE CHAR32
*" EXPORTING
*" VALUE(OUTPUT) TYPE CHAR255
*" TABLES
*" SBCHEADER STRUCTURE SBCCALLENV
*"------------------------------------------------------------------
CALL FUNCTION 'SBC_DEMO_COPY' DESTINATION destination
EXPORTING
input = input
IMPORTING
output = output
TABLES
sbcheader = sbcheader
EXCEPTIONS
no_input_given = 1
communication_failure = 2 message msg
system_failure = 3 message msg
others = 4.
CASE sy-subrc.
WHEN 1.
output = 'Exception received: NO_INPUT_GIVEN'.
WHEN 2.
concatenate 'COMMUNICATION_FAILURE received:' msg into output separated
by space.
WHEN 3.
concatenate 'SYSTEM_FAILURE received:' msg into output separated by
space.
WHEN 4.
output = 'Exception received: OTHERS'.
ENDCASE.
IF sy-subrc NE 0.
WRITE output.
ENDIF.
ENDFUNCTION.
The following example illustrates how to route the SBC_DEMO_COPY function module
to the SAP Business Connector Server and have the Partner Manager invoke a Routing
Rule to route the message. When testing the function module SBC_DEMO_WRAPPER
from the SAPGui, provide the following input values:
In this case, the SAP system routes the RFC to the specified RFC-Destination SAPBC.
In the SAP Business Connector Server, the gateway manger interprets the header table to
determine how to route the RFC. The Partner Manager routes the message to the SAP
server named CER using RFC. Note that CER must correspond to the name of an SAP
server that is configured in the SAP Business Connector Server.
This feature allows you to generate a record for any structure directly from the Function
Lookup or Table Lookup screen. If a service or record with the same name already exists
in the server namespace, an exception is raised. Thus, you won't overwrite existing nodes.
Generating a record
Generation parameters:
Press the Save Button to generate a record with the given settings.
You can also use the ftp or smtp transport easily as standard transport from the Partner Manager. For
further information, please refer to Example of Updating a Flow for FTP or Email Transport on page
5-19.
To create the standard SAP XML you would use the service pub.sap.rfc:encode, which
handles encoding automatically.
For an example on how to use the encode Service, refer to the SAP Business Connector
Server Tutorial (see Related Documentation on page 1-2).
If you wish to create other XML-documents from SAP data, you should be careful to avoid
problems with code pages whenever you receive data from an SAP System (e.g. a response
to an outbound Remote Function Call or via an inbound call).
You need to set the encoding attribute in the XML-document manually:
Introduction
This chapter describes the Partner Manager. It includes information about how to:
• Create and maintain routing rules
• Update Flow Services that process routing rules
• Manage transactions in the Message Store
For specific information about how to send IDocs and RFCs to the Partner Manager to be
routed, refer to “Chapter 7:Routing IDocs and XML messages to the Partner Manager” on
page 7-1.
to a URL Add-on packages like the MarketSet Connector offer additional transports, e.g.
for routing IDocs as XML messages to a Marketplace or Portal.
2 Name of the service that is associated with this routing rule, an ACL which controls access to
the routing rule and a package, into which to generate this service
4 A flag that indicates, whether the "Confirm TID event" should be routed, too
6 Information about when and by whom this routing rule was last changed
Value Description
message type Identifies the type of information the message contains (e.g., a purchase order, a
credit memo, an invoice, and so forth)
For the Message types ORDERS and ORDRSP a demo mapping is shipped with SAP Business
Connector.
sap.demo.idoc.mappings:orders
sap.demo.idoc.mappings:ordrsp
These replace the sender/receiver information from the IDoc control record (SNDPRN and
RCVPRN) by partner information from the E1EDKA1 segment. If this is not desired, disable
this Content Based Routing from "Adapters SAP Routing".
You can write your own service for routing based on the fields which are used in your
environment. You can use Content Based Routing for this purpose (see page 8-24).
Refer to “Constructing an IDoc with the SAP Java ” on page 8-6 and Appendix D for the APIs
to parse the IDoc.
for all ORDERS documents from different companies. You don’t necessarily want to
define routing rules for each Company that might sent ORDERS to you, so you use the
wildcard character (*) for the Sender.
Use a wildcard for all parameters (Sender, Receiver, and Message Type) to serve as a “last
resort” routing rule. This routing rule will be executed when no other routing rules
match the incoming document.
Eighth (last) * * *
Example
___________________________________________________________________________
Suppose that you have three routing rules set up with the following values:
* partner1 ORDERS
H9CCLNT750 * ORDERS
Note: If you specify the name of an already existing Flow Service here, it will be
overridden!
The Partner Manager then generates the Flow Service based on the fields you specify in
the routing rule. You select the package, into which this Flow Service should be put, and
the ACL determining, which SAP BC users are allowed to execute this routing rule.
After you create a routing rule and the Partner Manager generates the Flow Service, you
can update the Flow Service using the SAP Business Connector Developer. For more
information, refer to “Updating the Flow Associated with a Routing Rule”on page 5-18.
Comment
You can use this field for your own purposes, as needed.
that the WmPartners Package needs to be reloaded, before changes to that setting become
effective.)
B2B Service Routes the message to an SAP BC service on the local SAP Business
Connector Server or on a remote SAP Business Connector Server.
Based on the transport you select, the Partner Manager displays additional fields required by the
selected transport.
The following transports are able to support the "Confirm TID event" feature: B2B Service, ALE,
RFC, XML, BAPI.
1 Choose the Routing entry under Adapters from the SAP Business Connector
Server navigation panel.
2 Select the Routing Rules link, if is not already selected.
The Partner Manager displays the View Routing Rules screen. The top part of
the screen allows to restrict the display of routing rules by setting certain search
filters using the wildcards? for exactly one arbitrary character and * for any
number of characters. You can also use the character ^ for negating a filter. (For
example if you want to view only those routing rules, whose sender has an 'A' as
second letter, you would set the sender filter to ?A*. If you want to select all
routing rules, whose sender does not start with a B, use the filter ^B*.) The
middle part of the screen lists the existing rules that match with the search filter.
3 Below the list of existing rules are three input boxes. Type the name of the
sender in the first box, the name of the receiver in the second box, and the
message type in the third box.
4 Select Add. The Partner Manager displays the Edit Routing Rule screen.
5 Set the Routing Rule Flow parameters as follows:
Key Value
8 Press Save.
9 Enable the routing rule by clicking on the enabled column.
Key Value
Server Alias SAP Business Connector Server on which the service to invoke resides. If
the service resides on the same service as the Partner Manager that is
routing the message, select (local). If the service resides on a remote server,
select the name of the SAP BC Server from the drop-down list.
The drop-down list contains the names of remote SAP BC Servers that you
have defined. For information about defining aliases for remote SAP BC
Servers, refer to the SAP Business Connector Server Administrator’s Guide.
Folder Name of the Folder in which the service resides. The Folder name is case
sensitive; use the exact combination of upper- and lower-case letters as
defined on the SAP BC Server that you specified in the Server Alias field.
Service Name of the service to which the message is to be passed. The service
name is case sensitive; use the exact combination of upper- and lower-case
letters as defined on the SAP BC Server that you specified in the Server Alias
field.
Scope Used only if the target Service is invoked on a remote SAP BC Server.
Specifies whether you want the connection to the server to be stored in your
session or in a shared location. If the work being performed requires that
state be maintained, select SESSION. If the work being performed is
stateless, select GLOBAL.
When sending an IDoc or an RFC between two SAP Business Connectors using B2B Service
Transport, enter pub.sap.transport.ALE or pub.sap.transport.RFC as Folder and InboundProcess
as Service.
If the receiving Business Connector is of a lower release than 4.8 and you are sending an IDoc,
you also need to edit the main flow of this routing rule and add the following extra step, as older
SAP BC releases do not understand the new internal IDoc format.
SAP BCs of release 4.6 or lower expect the two tables IDOC_CONTROL_REC_40 and
IDOC_DATA_REC_40. Therefore add the step pub.sap.idoc:iDocToTables.
SAP BCs of release 4.7 expect the IDoc to be in “IDoc Library 1.0” format. Therefore add the
step pub.sap.idoc:convertToIDoc10.
SMTP Host Host name of the SMTP server to which is to relay the e-mail message.
Content Type Content type the Partner Manager should specify for the attachment of the e-
mail, which contains the document. For example, specify application/x-edi-message
for an EDI message.
From E-mail address that you want the Partner Manager to use for the sender of the
e-mail message, for example, [email protected].
To E-mail address to which you want the Partner Manager to send the e-mail
message, for example, [email protected].
CC Optionally, the e-mail address to which you want the Partner Manager to send a
complimentary copy of the e-mail message, for example,
[email protected].
BCC Optionally, the e-mail address to which you want the Partner Manager to send a
blind complimentary copy of the e-mail message, for example,
[email protected].
Subject Optionally, the subject you want the Partner Manager to use for the e-mail
message.
Body Optionally, a note for the receiver you want the Partner Manager to put into the
body of the email.
Port Number Port number on which the remote FTP server listens for incoming requests.
User Name Username the SAP Business Connector Server must supply to connect to the
remote FTP server.
Password Password the SAP Business Connector Server must supply to connect to the
remote FTP server.
File Path Directory path and file name on the target machine where the message is to
be placed.
Transfer Type Optional: active or passive depending on whether you want the Business
Connector to use active or passive FTP.
File Name Optional. A file name under which the data should be stored on the FTP
server. If no name is specified, the Partner Manager uses the file name
<tid>.xml, if the document came in with a transaction ID (e.g. via tRFC),
or ftpfile<n>.data, where n is a continuously increasing number,
otherwise.
Timeout Optional. Time (measured in seconds) to wait for a response from the ftp
server before timing out and aborting the request. Default is to wait forever.
Before you can route an IDoc to an SAP server, you must define the SAP server. For instructions, refer to
“Defining SAP Servers” on page 3-4.
Specify SAP Name of the SAP server to which you want the Partner Manager to route the
Destination IDoc. Select an SAP server from the drop-down list.
The drop-down list contains the names of servers that are defined in the SAP
Business Connector Server. For instructions on how to define an SAP server,
refer to “Defining SAP Servers” on page 3-4.
Transport: RFC
Use this transport to route an RFC to an SAP server via RFC or tRFC.
Set the Configure RFC Transport parameters as follows:
Key Value
Specify SAP Name of the SAP server to which you want the Partner Manager to route the
Destination RFC. Select an SAP server from the drop-down list.
The drop-down list contains the names of servers that are defined in the SAP
Business Connector Server. For instructions on how to define an SAP server,
refer to “Defining SAP Servers” on page 3-4.
Transport: XML
Specify URL URL to which you want the Partner Manager to post the XML message.
XML dialect Choose between the XML dialects SAP-XML, bXML, Values-XML, Arbitrary
XML or SOAP XRFC (XRFC with SOAP envelope).
If you select SAP-XML the content type is set to ‘application/x-sap.idoc’
(respectively ‘application/x-rfc’). Therefore, the receiving server has to
understand this content type. (This can be overridden using the following flag.)
If ‘Arbitrary XML’ is selected, the transport expects the XML document as
string in the variable xmldata. In that case you need to modify the routing rule
flow similarly to the Email or FTP cases. Add the necessary steps to create the
XML string from the input data and then map it to the xmldata parameter.
Use text/xml as Flag that allows you to overwrite the content type of bXML, SAP-XML and
content type SOAP XRFC to text/xml, if set to true. The checkbox is disabled for other
dialects.
Use utf-8 as encoding Flag that allows you to force the renderers of bXML, SAP-XML and SOAP
XRFC to use the encoding utf-8, if set to true. The checkbox is disabled for
other dialects.
Use BAPI Format Set this flag, if you want to use the BAPI XML format. (This field is only active
when using the bXML dialect.)
Business Object The name of the business object to which the call should be mapped. This
value is case-sensitive. (Available only when using the bXML dialect and the
BAPI format.)
BAPI The name of the BAPI method, to which the call should be mapped. This value
is case-sensitive. (Available only when using the bXML dialect and the BAPI
format.)
Replace invalid If this flag is set, non-printable characters (characters in the range 0x00 –
characters 0x1F) are replaced with a ‘#’ character instead of being escaped with an
escape sequence like � for the NUL character. Note: the three characters
TAB, LF and CR are always escaped. (Available only when using SAP-XML,
the bXML dialect or SOAP XRFC.)
Use XML 1.1 If this flag is set, version=”1.1” is used in the XML preamble. Note: in XML 1.1,
non-printable characters, except for the NUL character, are always escaped
instead of replaced. (Available only when using SAP-XML, the bXML dialect or
SOAP XRFC.)
User An optional parameter that allows you to specify a username for authentication
(optional) on the remote Web system.
Password An optional parameter that allows you to specify a password for authentication
(optional) on the remote Web system.
When sending an IDoc between two SAP Business Connectors via XML transport, use
http://<sapbc>:<port>/invoke/pub.sap.transport.ALE/InboundProcess as URL.
When sending an RFC to a second SAP BC that does not have an outbound map for the function
module in question, use
http://<sapbc>:<port>/invoke/pub.sap.transport.RFC/InboundProcess as URL.
Transport: BAPI
Set the Configure BAPI Transport parameters as follows
Key Value
Specify SAP Name of the SAP server to which you want the Partner Manager to route the
Destination BAPI. Select an SAP server from the drop-down list.
The drop-down list contains the names of servers that are defined to the SAP
Business Connector Server. For instructions on how to define an SAP server
to the SAP Business Connector Server, refer to “Defining SAP Servers” on
page 3-4.
synchronous only Caller may only send calls without a transaction ID.
Messages with a transaction ID (asynchronous
messages) are rejected and an XML error message is
returned.
asynchronous only Caller may only send calls with a transaction ID.
Messages without a transaction ID (synchronous
messages) are rejected and an XML error message is
returned.
1 Select the Routing entry under Adapters from the SAP Business Connector Server
navigation panel.
2 Select the Routing Rules tab, if it is not already selected.
The Partner Manager displays the View Routing Rules screen. The middle part of
the screen lists existing rules.
The incomplete routing rule has the status “Not Ready” (indicated by the red ball).
3 Press the icon for the rule you want to complete. The Partner Manager displays
the Routing Rules screen.
4 Set the Flow Information, Invoke Pre-Processing, and Transport parameters as
described in Establishing Routing Rules on page 5-8.
5 Choose Save.
The next time the Partner Manager receives a message that has the sender,
receiver, and message type identified in the routing rule that you just completed, the
Partner Manager will trigger this routing rule.
1 Select the Routing entry under Adapters from the SAP Business Connector Server
navigation panel.
2 In the top part of the screen you can specify search filters for the parameters sender,
receiver and message type to restrict the number of routing rules which are displayed. In
the filter you may include the wildcards * to match an arbitrary number of characters and
? for exactly one character. You can also start the filter with the character ^, which will
form the logical complement of the search expression. (E.g. the search will return all
routing rules that do not match the filter.) Leaving a field empty is equivalent to specifying
a *.
3 Press the Update button to view the new selection of routing rules.
If you have routing rules that use a wildcard * as sender (or receiver or message type) and you
want to display only those, you cannot take "*" as the search filter for sender, as this would select
everything. Instead set the search filter to "?". This will select all routing rules, whose sender
value is exactly one letter long, and this will most probably be the set of routing rules, whose
sender equals "*".
screen affect only the first operation in the Flow Service. If you have added additional operations
to the flow, they will not be altered. For more information about updating the Flow Service, refer
to Updating the Flow Associated with a Routing Rule on page 5-18.
Perform the following procedure to update a routing rule.
1 Select the Routing entry under Adapters from the SAP Business Connector
Server navigation panel.
2 Choose the Routing Rules tab to open the View Routing Rules screen.
3 Press the icon in the Edit column for the routing rule you want to edit. The
Partner Manager displays the Routing Rule screen.
4 Make changes as necessary. For information on what you can specify, refer to
“Establishing Routing Rules” on page 5-8.
5 After you make your changes, choose Save.
1. Start the SAP BC Server Administrator. See the SAP BC Administrator’s Guide if you
need procedures for this step.
2. On the Adapters menu, click Routing. The View Routing Rules screen appears.
3. Locate the rule that you want to disable. Under Enabled?, click Yes until it turns to
No.
1 Select the Routing entry under Adapters from the SAP Business Connector
Server navigation panel.
1 Do not add any flow operations before the first MAP operation.
2 Do not modify the pre/post-processing service’s label property (if a pre/post-processing service
exists in the flow).
Use the SAP Business Connector Developer to update the Flow Service. Be sure to abide
by the following rules for updating the Flow Service:
1 Do not add any flow operations before the first MAP flow operation.
2 Do not update the flow operation for the pre/post-processing service, if it exists.
3 Do not update the flow operation for the outbound transport service.
To update the flow for FTP or Email Transport for sending an IDoc
1 Add a flow operation to invoke the pub.sap.idoc:encode service after the first
MAP flow operation.
This service converts the IDoc to an XML string, which is the format the FTP
and Email Outbound Transport service can understand. Alternatively, you can
use any other Service that transforms the IDoc data into the desired format in
string or byte array form.
2 Select the last flow operation, Transport Service: INVOKE Outbound Process.
3 Select the Pipeline tab if it is not already selected.
4 Expand the data variable in Service In to display its structure.
5 Add a map to link the xmlData variable in Pipeline In to the content variable in
Service In.
Use the Transactions screens to view and manage the transactions that the Partner Manager
records in its Message Store. Here you can view transactions and their processing log as
well as delete transactions that are no longer needed.
The Administrator should manually follow-up transactions in status ‘Rolled back’ as
follows:
Try to find and eliminate the reason of failure and then
Re-send the transaction from SM58, if it originally came from an SAP system
Ask your partner to re-send the transaction, if it originally came in via FTP or HTTP.
1 Select the Routing entry under Adapters from the SAP Business Connector
Server navigation panel.
2 Select the Transactions tab if it is not already selected. The Partner Manager
displays the Transactions screen that lists the transactions.
3 Optionally you can specify query settings to restrict the number of displayed
transactions or to specifically search for certain transactions. You can specify a
time frame (upper limit and lower limit) in which the transaction has been
created, a search filter for TID, sender, receiver and message type and restrict
to a certain state.
The date format of the upper and lower limit fields has to be exactly like the
Server-wide date format specified under Settings Logging Log Timestamp
format. The list of transactions is also using this format
The search filters may include the wildcards * for an arbitrary number of
characters and ? for exactly one character. In addition, you can start the filter
with the ^ character, which will negate the expression. (I.e. in that case the
search will return all transactions that do not match this particular filter.)
All conditions are combined with a logical and.
The Partner Manager displays transactions in pages of 50, to avoid a timeout or
out-of-memory of the web browser in case there are a large number of
transactions in the message store. This page size can be changed also. The
current selection of transactions (according to the query settings) and their
current sort order is kept until the Update Search is executed again, even if you
switch between different screens or log off from the Server and later log in again.
4 In the end press the Update Search button to display the selection of transactions.
To view detail information for a transaction, press on the transaction ID in the TID column.
This screen allows you to view the details of each transaction, including the sender,
receiver, message type, transaction ID, time when this transaction was first received by the
BC, current state, the time when this state was set, last error (if any), and an audit trail that
shows state changes, error messages and the various steps that have processed the message.
The Current State field contains the transaction state. The information in this field
corresponds to the different states of the tRFC protocol. If the message was not received
via tRFC but via a different protocol (like http), the Partner Manager tries to "imitate" the
tRFC status handling, but the meaning of the single states is slightly different in this case.
The following describes the valid states of a tRFC transaction:
Status Meaning (tRFC) Meaning (other protocols)
Created The sender has sent a transaction ID, which was The sender has sent a transaction ID and
accepted by the BC. (No data sent yet.) data, which was forwarded to the Partner
Manager.
Executed The data has been sent and processed ok. The Partner Manager has located and
executed a routing rule successfully.
(Meaning there was no error message, but
also no success message from the
OutboundProcess of the transport used in
this routing rule.)
Rolled Back Execution of the transaction has failed. The sender Execution of the transaction has failed. The
may retry the transaction again at a later time. sender may retry the transaction again at a
later time.
Committed The sender has acknowledged, that he knows, that The OutboundProcess of the transport
the transaction executed successfully. used in this routing rule returned a success
message.
Confirmed The sender has "promised" never to send this This is used, only if the external client
transaction again. So the TID may be deleted, as invokes the service
there is no need any more to protect against wm.PartnerMgr.gateway.runtime:con
duplicate processing of the same transaction. firmTID after the transaction has been
executed successfully. In this case and if
the transport supports it, the "Confirm
event" has been forwarded to the final
receiver, so that it is able to clean up its
ARFCRSTATE table and remove the TID
from it.
If the storing of message bodies has not been disabled on this Business Connector
(server.cnf parameter watt.PartnerMgr.noMsgStorage), it is also possible to view the
message body of the transaction from this screen.
If the data was received in any arbitrary format, the message can be viewed as a Values
document. If it came in as an RFC, RFC-XML, IDoc or IDoc-XML, it can be viewed as
XML, and if it came in as an IDoc or IDoc-XML, it can even be viewed in form of an
HTML table.
1 Select the Routing entry under Adapters from the SAP Business Connector
Server navigation panel.
2 Select the Transactions tab if it is not already selected.
3 If you want to delete just a single transaction, press the icon in the Delete
column for that transaction.
4 If there is a certain selection of transactions, you would like to delete -- for
example "all transactions in state Confirmed that came from sender HUGO
between 2003-01-26 08:00:00 and 2003-05-09 15:36:00" -- you can do so by
completing the query settings as described above under ’Viewing Transactions
in the Message Store’, then pressing Update Search and finally Delete
Selection. The total number of transactions that will be deleted, can be seen in
the field Currently Selected. But careful: if you haven't refreshed the page in
your browser for quite some time, and someone else has meanwhile also
created a selection of transactions, you will delete his selection instead of the
previous one made by yourself. This is, because the selection is kept Server
wide and not per user.
5 Finally, you can delete everything by pressing the Delete All button.
elapsedTime The number of minutes that the transaction has been in status onState
1. watt.PartnerMgr.noMsgStorage
If this parameter is set to "true", the Business Connector will not save the message body of
incoming transactions.
2. watt.PartnerMgr.routeOnly
If this parameter is set to "true", the Business Connector will neither maintain any transaction
and status information in the message store, nor save the message body of incoming
transactions.
3. watt.PartnerMgr.flushPeriod
This parameter specifies the time period in minutes, how often the Partner Manager will flush
yet unsaved changes in the transaction Cache to the file system. Default is every 5 minutes.
4. watt.PartnerMgr.flushMaximum
This parameter specifies how many unsaved transactions the "flushing thread" should save to
the file system during one execution. It will stop after this number, even if there are still more
unsaved transactions in the Cache. This is offered for performance reasons, so that the server
will not spend too much time non-stop in Cache flushing. Default is 200.
5. watt.sap.monitorIDocs
If this parameter is set to "true", the Business Connector will link the IDoc packet's TID with
the DOCNUMs of the IDocs in that packet, so that a later ALE IDoc Trace or SYSTAT01
update will be possible. See the section "Using the ALE Monitoring Features via the SAP BC"
in chapter 8 for more information.
The only transport applicable to inbound BAPI calls is the BAPI transport as shown in the
screenshot.
no restrictions Caller may decide to send both synchronous and asynchronous calls
Caller may only send calls without a transaction ID. Messages with a
synchronous only
transaction ID (asynchronous messages) are rejected and an XML
error message is returned
asynchronous only Caller may only send calls with a transaction ID. Messages without a
transaction ID (synchronous messages) are rejected and an XML error
message is returned
After completing the form, select Save. The routing rule is now displayed as Ready,
indicated by the green symbol in the routing table.
</header>
<body>
<doc:CompanyCode.GetList xmlns:doc="urn:sap-
com:document:sap:business" xmlns="">
<CompanyCodeList>
<item>
<COMP_CODE></COMP_CODE>
<COMP_NAME></COMP_NAME>
</item>
</CompanyCodeList>
</doc:CompanyCode.GetList>
</body>
</biztalk_1>
Transaction Control
You can control whether the BAPI should be called synchronously via RFC or
asynchronously via ALE by the <referenceID> element in the BizTalk header.
If the <referenceID> element is specified and contains a valid SAP transaction ID
(TID), the BAPI outbound process automatically chooses the ALE format, otherwise, if
the element is omitted, the message will be processed synchronously. For both
synchronous and asynchronous calls, technical processing errors are reported by an XML
response document containing a fault descriptor.
Note: With the HTTP requests in steps 2-4 you need to resubmit the cookie, which you
got with the response in step 1. Otherwise the BC cannot assign these requests to the
same user session and the “commit” does not know, which transaction to commit.
Synchronous Calls
Application-level responses to synchronous XML requests consist of a response business
document in the HTTP response.
The response business documents for synchronous calls are documented in the SAP
Interface Repository and contain a serialization of all exporting and changing parameters
of the BAPI or FM.
Example:
• Sending a synchronous call to a SAP System
• Checking the correct application-level processing inside the target SAP System
(transaction BD87 in a SAP system of release 4.6A or higher. In older systems
use the IDoc list transaction WE05):
To process this function, you have to create a routing rule, which maps the SAP call to the
XML transport.
The message types used in the Partner Manager for routing BAPIs are based on the BAPI
implementation. This means, for routing messages from an SAP System:
• the RFC (function module) name of the BAPI implementation is used for
synchronous calls
• the corresponding ALE message type is used for asynchronous calls
These ALE message types can be found using the built-in BAPI browser.
When setting up the routing rule, you have to specify the name of the business object and
BAPI to which the call should be mapped.
6 Select the checkbox Use BAPI format to specify that the call should be
represented as a BAPI in XML.
7 Enter the name of the corresponding business object.
8 Enter the name of the corresponding BAPI method.
9 Optionally you can specify a username and password for user
authentication on the remote host.
Note: as of release 4.6, you can select additional options for the XML transport
configuration:
useBAPI Set this value to ‘ON’ if you want to use the BAPI XML format. If you omit this
value or set it to something different than ‘ON’, the message will be sent as RFC
based XML in a BizTalk XML envelope
object The name of the business object, to which the call should be mapped. This value
has to be case-sensitive
bapi The name of the BAPI method, to which the call should be mapped. This value is
case-sensitive
xsender A value that should be put in the header field <from> <address>. See senderType
for further details
senderType An optional format descriptor, defining the sender address type. Default is
(optional) ‘LogSys’ for logical systems. Logical system names are automatically converted to
an URN by an SAP defined schema. Alternatively, you can set senderType.
xreceiver A value that should be put in the header field <to> <address>. See receiverType
for further details
receiverType An optional format descriptor, defining the receiver address type. Default is
(optional) ‘LogSys’ for logical systems. Logical system names are automatically converted to
an URN by an SAP defined schema. Alternatively, you can set receiverType.
useTextXml Flag that allows to overwrite the content-type to text/xml, if set to true (for SAP-
XML and bXML).
useUTF8 Flag that allows to force the renderers to use the encoding utf-8, if set to true (for
SAP-XML and bXML).
For sending RFC based XML messages, only the first five parameters are supported.
You can specify these parameters in your ABAP RFC call as follows:
Preparations:
Set up an RFC Listener for the SAP System on your SAP Business Connector as
described in Chapter 4:.
Set up a corresponding RFC destination on your SAP System for your Business
Connector using transaction SM59 as described in Chapter 4:.
Create a program ZBAPIDEMO in the SAP System using transaction SE38.
REPORT ZBAPIDEMO.
*variable companyCodes will take the application result
data companyCodes like BAPI0002_1 occurs 1 with header line.
*variable header gives Business Connector instructions for routing
data header like SBCCALLENV occurs 1 with header line.
*variable returnCode takes the processing information after the
*synchronous call
data returnCode type BAPIRETURN.
header-name = 'sender'.
header-value = 'SAPSYS'.
append header.
header-name = 'receiver'.
header-value = 'SAPBC'.
append header.
Before executing this report, you should define a routing rule using the XML transport.
You can send the XML message to any server that is able to process the HTTP Post
message and send back a correct response. In this example, the call will be sent back to
the locally installed SAP Business Connector to demonstrate its inbound XML processing
capabilities.
To handle the inbound XML message, which the local SAP Business Connector is going to send to
itself, you have to specify a second routing rule for the BAPI:
Log on to your SAP Business Connector Administration UI.
Select the Routing tab on the SAP Business Connector Administration UI.
In the input field at the end of the page, enter the following data:
• Sender: SAPSYS.
• Receiver: SAPBC.
• Message-type CompanyCode.GetList.
• Press the Add rule button.
In the transport field, select BAPI.
Select the SAP Server to which the message should be routed from the drop down list.
Choose the Save button.
When executing the program in the SAP System, the SAP Business Connector will send
the HTTP Request to the remote host. This request will look similar to the following one:
</header>
<body>
<doc:CompanyCode.GetList xmlns:doc="urn:sap-
com:document:sap:business" xmlns="">
<CompanyCodeList>
<item>
<COMP_CODE></COMP_CODE>
<COMP_NAME></COMP_NAME>
</item>
</CompanyCodeList>
</doc:CompanyCode.GetList>
</body>
</biztalk_1>
When using the SAP Business Connector as the remote partner as described above, the
BAPI will be executed in the selected system, the exporting and changing parameters
will be put in an XML response document and sent back to the calling SAP System. The
report will then display the parameters received from the remote system, which in this
case is a list of company codes.
To get to the example to work, you should set up your SAP System for ALE processing
as described in the SAP System documentation and in this guide.
When defining the partner profile for the outgoing IDoc in the SAP System, you have to
ensure, that the option Transfer IDoc immediately is selected, as the BAPI conversion
tool on the SAP Business Connector does not support IDoc packages.
Create the following report in your SAP System to test the BAPI conversion with the
BAPI Bank.Create (available as of SAP release 4.6C).
REPORT ZALEDEMO.
parameters receiver like BDI_LOGSYS-LOGSYS.
parameters country like BAPI1011_KEY-BANK_CTRY default 'DE'.
parameters bankkey like BAPI1011_KEY-BANK_KEY default '34981255'.
address-CITY = 'Walldorf'.
address-SWIFT_CODE = 'ABCDDE12'.
address-BANK_GROUP = 'SB'.
address-BANK_NO = '12345678'.
address-ADDR_NO = '123'.
*trigger processing
commit work and wait.
When executing the report, you have to enter a RECEIVER. This should be the name of
the logical system you have defined for your SAP Business Connector.
When executing the report in the SAP System, the SAP Business Connector will transmit
the XML document via HTTP. The XML document would look as follows (names of
logical systems depend on your system configuration):
<address>urn:sap-com:logical-system:BUSCON001</address>
</from>
</delivery>
</header>
<body xmlns="">
<doc:Bank.Create xmlns:doc="urn:sap-com:document:sap:business">
<BankKey>34981243</BankKey>
<BankCtry>DE</BankCtry>
<BankAddress>
<BANK_NAME>Demo Bank</BANK_NAME>
<REGION>BW</REGION>
<STREET>Neurottstr. 16</STREET>
<CITY>Walldorf</CITY>
<SWIFT_CODE>ABCDDE12</SWIFT_CODE>
<BANK_GROUP>SB</BANK_GROUP>
<POBK_CURAC></POBK_CURAC>
<BANK_NO>12345678</BANK_NO>
<POST_BANK></POST_BANK>
<BANK_BRANCH></BANK_BRANCH>
<ADDR_NO>123</ADDR_NO>
</BankAddress>
</doc:Bank.Create>
</body>
</biztalk_1>
You can check the correct processing of your BAPI-call in the IDoc status monitor.
In the target SAP System, you can also inspect the correct processing using the ALE
status monitor (transaction BD87 in SAP release 4.6C; IDoc lists can also be displayed
with transaction WE05). If any application errors occurred, they are listed in the IDoc
monitor.
Introduction
For the Partner Manager to route IDocs and RFCs, you must send the IDocs and the RFCs
to the Partner Manager. The following lists the typical ways that you can send IDocs and
RFCs to the Partner Manager.
Method Refer to page
When the Partner Manager receives the IDoc or RFC, it matches the sender, receiver, and
message type associated with the IDoc or RFC to its routing rules. When it locates a
matching routing rule, this is invoked to route the IDoc or RFC.
The RFC Destination is the low-level technical item by which the Business Connector
is known to the SAP system.
A logical system represents the communication partner, to which the ALE layer
sends its IDocs. A logical system usually collects several partner profiles for different
IDoc message types. This allows specifying different processing instructions for
different IDoc message types that go to the same business partner.
You can create a partner (logical system) using transaction SPRO_ADMIN.
Alternatively, use the following menu path to do this: Main screen -> Tools ->
AcceleratedSAP -> Customizing -> Project Management. (Or use transaction SALE
and continue with step 2 below.)
1 Choose SAP Reference IMG.
2 Expand the following nodes: Basis Components Application Link Enabling
(ALE) Sending and Receiving Systems -> Logical Systems Define Logical
System. (You can also use transaction SALE and select the path described
above, starting with Application Link Enabling (ALE).
3 Press on the green checkmark beside Define Logical System.
4 Select the New Entries button.
5 Enter an informative name for your partner and provide a short description. After
saving the partner information, assign it to a transport request.
A partner profile links three pieces of information together: the logical system, the
ALE message type and the port. In other words, the partner profile defines, which
transport channel (port) to use, when a certain IDoc (message type) is sent to a
certain business partner (logical system). For example, a business partner may
require, that ORDERS IDocs are sent to one of his systems via RFC, while INVOIC
IDocs are sent to another system of his in flat file format.
Use transaction WE20 to create a partner profile (alternatively, use the following
sequence to do this: Main screen Tools Business Communication IDoc-
Basis IDoc Partner profile).
1 Select the LS (logical system) partner type in the tree view and press the Create
button in the toolbar.
2 Enter the partner you created in step 3 in the partner field and save the
partner profile.
3 Click the Insert entry button below the outbound parameter table control.
4 Enter the message type of the IDoc, (e.g., MATMAS).
5 Enter the logical receiver port you created in step 2 and enter the basic type
of the IDoc, (e.g., MATMAS03).
6 Save the outbound parameter.
Step 5 Create a distribution model for the partner and message type
After you define a partner and a partner profile, you can create a distribution model
that triggers the creation of a communication IDoc.
If you are using SAP System 4.5 or earlier, you can use transaction BD64 to create
the distribution model or alternatively, use the following sequence to do this: Main
screen Tools -> Business Framework ALE Customizing.
1 Open the Cross-Application Components folder, then the Distribution (ALE)
folder, then the Distribution Customer Model folder in the tree view. Press on the
green hook beside Maintain customer distribution model directly.
2 Create a new model using Model Create.
3 Add a message type to your model, enter the sender in the dialog box (e.g.,
ALRCLNT000), enter the receiver (e.g., the logical system defined in step 3 ),
and the message type (e.g., MATMAS).
If you are using SAP System 4.6 or later, you can use BD64 or alternatively, the
following procedure:
1 In the Main screen, choose Tools AcceleratedSAP Customizing
Project Management.
2 Choose SAP Reference IMG.
3 Expand the following nodes: Basis Components Distribution (ALE)
Modeling and Implementing Business Processes Maintain Customer
Distribution Model.
4 Press on the green hook beside Maintain Customer Distribution Model
(transaction BD64).
5 Change into the edit mode.
6 Choose Create model view.
7 Enter a short text string and a technical name for your new model view.
8 Select your new model view in the tree Distribution Model and choose Add
message type.
9 In the dialog box, enter the sender (e.g., ALRCLNT000), the receiver (e.g., the
logical system defined in step 3 ), and the message type (e.g., MATMAS).
The value for the content length has to be replaced by the actual length of content.
The example shows an IDoc-XML document. For RFC-XML you need to change the URL to
/invoke/pub.sap.transport.RFC/InboundProcess and the content-type to
application/x-sap.rfc.
To simulate an HTTP client for testing purposes, you can use the service pub.client:http.
1 Using the SAP Business Connector Developer, navigate to the
service pub.client:http located in the WmPublic package.
2 Choose Test Run.
Perform the following steps to FTP an IDoc- or RFC-XML document to the Partner
Manager:
The FTP client should check the return code to find out whether processing of the
document was ok.
It is important that the file name of the document ends with .idocxml.
If you are posting RFC-XML, the file name needs to end with .xrfc and the term ‘ALE’ in the
file path needs to be changed to ‘RFC’.
pub.sap.transport.ALE:InboundProcess or
pub.sap.transport.RFC:InboundProcess
You can submit an IDoc-XML for any IDoc type to the Partner Manager from a Web
browser using the following page:
http://<SAP BC-server>:<port>/SAP/Submit_IDocXML.html
This demo page can be used as a test tool. If you plan to submit IDocs
from an HTML form, you can use this page as sample code.
One more tip to increase performance: ask your communication partner to also drop all
unnecessary parameters at the end of the routing rule service which receives this document. This
reduces the amount of data sent back in the response. Normally no parameters need to be returned
to the sending BC server.
Instead of using pre-defined XML dialects like IDoc-XML and RFC-XML, it is also
possible to forward arbitrary XML documents to the Partner Manager by using the
Inbound Process mechanism of the XML transport.
For this purpose, you can configure a so-called inbound routing info service for your
XML dialect. This service should implement the specification
pub.sap.transport.XML:xmlRoutingInfo, using the following parameters:
Input Parameters
This key Must specify…
boundNode This record contains the XML document as it would look like
after having been processed by pub.web:documentToRecord.
Your service should extract the routing data from your specific
documents.
Return Values
This key Must specify…
sender Sender used for finding the matching Routing Rule in the
Partner Manager.
receiver Receiver used for finding the matching Routing Rule in the
Partner Manager.
msgType Message type used for finding the matching Routing Rule in
the Partner Manager.
$tid (optional) Transaction ID found in the document, if client wants to
execute a transaction once and only once. If no $tid exists, the
Partner Manager will generate one.
$routeOnly (optional) If this parameter is set to true, the PartnerManager, will only
route the message, without creating a transaction.
To configure the Inbound Process mechanism of the XML transport, perform the
following steps:
1 Create an inbound routing info service for the XML transport. It should
extract all required parameters from the incoming XML documents so
that the Partner Manger can route these documents.
2 After having implemented this service, you still have to make it known
to the XML transport. Go to "Routing ..." in the main Administrator
screen of the Business Connector.
3 In the Routing screen click on Transports, which will give you a list of
all Transports:
Now you are ready to do routing using XML Inbound Process for arbitrary XML
documents. Whenever an XML document is posted to the URL
/invoke/pub.sap.transport.XML/InboundProcess with content-type text/xml, it
will be routed by the Partner Manager.
Stage Description
1 Create the routing rule that routes the IDoc to the SAP BC service that maps the IDoc
information.
2 Create an empty Flow Service, which will later execute the mapping.
The first step in building an application that maps information from an IDoc is to
create a routing rule that invokes the Flow Service that will perform the mapping.
When you create the routing rule, select the B2B Service transport and specify the
Configure B2B Service parameters to identify the location of the SAP BC service
that maps the IDoc. (You will create this SAP BC service in a subsequent step.)
The following example shows the routing rule you would create to pass the IDoc to a
SAP BC service called projectA.idocs:mapOrders02.
After you have created the routing rule, use the following procedure to create a Flow
Service with SAP Business Connector Developer (this is the service that the Partner
Manager will invoke based on the routing rule created in the previous stage).
1 Start SAP Business Connector Developer. See the SAP Business Connector
Developer’s Guide if you need procedures for this step.
2 Connect to the SAP Business Connector Server that you identified in the routing
rule you created in Stage 1 .
3 On the File menu, click New and create an empty Flow Service. Make sure that you
give the service the same folder and service name (projectA.idocs:mapOrders02)
specified in the routing rule you created in Stage 1 . If the necessary folders
projectA and idocs do not yet exist, you need to create them as well, before you
can create the mapOrders02 service.
data types. It will also display segment and field documentation as well as possible field
values, if this information is available in the backend’s DDIC.
5 Press Generate Record and Next, choose a package and a folder into which to generate the
record definition and specify a name for the new record.
6 Press Next two more times and then Finish.
7 In order to simplify consequent mappings, you may now edit the generated record and delete
segments/fields from it, which are not used in the documents that you plan to process.
If you are using SAP R/3 version 4.6A or higher, you can create a DTD for an IDoc from
transaction WE60. (See your SAP user guide for procedures). If you want to generate a record
definition from a DTD that you have created, you must first create an XML file that defines a root
element and points to this DTD. (Use the XML files that SAP provides as guides.) Use this XML
file to build your record definition.
7 Choose on the Flow Pane toolbar, and select the pub.flow:savePipeline service. (If
this service does not appear in the list, select Browse… to find it.) This service will copy the
contents of the pipeline so that you can retrieve it in a later stage. (Later on, the savePipeline
step will be deleted from your flow again. Its purpose is simply to capture a copy of the IDoc—
it is not a permanent part of your Flow.)
9 Select the $name variable under Service In and press on the toolbar.
10 Type a name for the saved pipeline (for example, SaveIDoc) and select OK.
Use the following procedure to retrieve the pipeline image you created:
15 Delete the savePipeline step and then choose on the Flow Pane
toolbar and select the pub.flow:restorePipeline service. (If this service does
not appear in the list, select Browse… to locate it.) This service will retrieve the
contents of the pipeline you saved previously.
16 Under Service In, select the $name variable under and choose on toolbar
in the Pipeline tab.
17 Specify the name of the saved pipeline and select OK.
18 As the next step of this service insert pub.web:documentToRecord (to be
found also in the WmPublic Package), if the IDoc was sent to the Business
Connector via http, or pub.sap.idoc:iDocToRecord (to be found in the SAP
Package), if the IDoc was sent to the Business Connector from an SAP system
via tRFC or from the demo page /SAP/Submit_ORDERS_IDOC.html.
To extract information from an IDoc, your Flow Service must transform the IDoc into a hierarchical structure
and generate a boundNode — a record whose elements correspond to the fields in the IDoc. To do this,
either use the iDocToRecord service (if the IDoc will be received by the Business Connector via tRFC or via
http POST with Content-Type: application/x-sap.idoc) or the documentToRecord service (if the IDoc will be
received via http POST with Content-Type: text/xml).
…to produce a
boundNode
After transforming the IDoc into a boundNode, you can map the fields of the IDoc to other variables in the
pipeline (for example, to variables in a cXML or OAG document). To do this, you must add a MAP operation
to the flow, insert record definitions for the IDoc and the target document, and then map fields in the IDoc to
the appropriate variables in the other document.
The following procedure describes how to add the MAP operation to the service and configure the MAP
operation to copy values from the IDoc to other variables in the pipeline.
Perform the following steps to add a record describing the content and structure of
the IDoc.
1 In the SAP Business Connector Developer, select the Flow tab.
2 In the Flow Pane, select the iDocToRecord/documentToRecord operation.
3 Select the Pipeline tab and choose the boundNode variable under Pipeline Out.
9 In Pipeline Out, select the IDoc Record and press Map , or map
boundNode to the IDoc Record using ‘drag and relate’:
10 The Pipeline Editor will show a connecting line between boundNode and the IDoc
Record you created in the previous procedure.
Now perform the following steps to define the variable(s) to which you want to map information from the IDoc.
13 In Pipeline Out, select the bottom most variable, and then choose
from the toolbar and select the type of variable to which you want to map an
IDoc value.
14 Type the name of the variable and press ENTER.
15 If the variable is a Record or a Record List, repeat steps 13 and 14 to define its
member variables. Then use to indent each member variable beneath the
Record or Record List variable.
16 Repeat this set of steps for each variable to which you want to map an IDoc
value.
For additional information about creating variables, see “Adding Variables with
the Pipeline Editor” in the SAP Business Connector Developer’s Guide.
17 Use Map to map fields from the IDoc Record in Pipeline In to the
appropriate target variables in Pipeline Out. If you need additional information
about this step, see “Mapping Pipeline Variables to Service Inputs and Outputs”
and “Working with the MAP Operation” in your SAP Business Connector
Developer’s Guide.
The following example shows a variable mapped from the ORDERS02 IDoc to a
String variable in Record called PurchaseOrder.
You can find a record definition for the example purchase order shown above in
sap.demo.records:PurchaseOrder.
To test the Flow Service you created, use the SAP GUI or the
/SAP/Submit_ORDERS_IDOC.html utility to submit your sample IDoc to the Partner
Manager. Make sure to specify the sender, receiver, and message type that you used for
the routing rule that you created in Stage 1 .
Check the results of the service to ensure that the IDoc is being mapped correctly.
If you want to debug your service in the SAP Business Connector Developer, you can use
the savePipeline/savePipelineToFile and restorePipeline/restorePipelineFromFile
services to capture an IDoc submitted by the sending system. To use this technique, do the
following.
Use the following procedure to add the savePipelineToFile service to the beginning
of your Flow Service:
4 Select the fileName variable under Service In and choose on the toolbar.
5 Type a name for the saved pipeline information (for example, SaveIDoc) and
press OK.
15 Select the fileName variable under Service In and choose on the toolbar.
16 Type a name of the saved pipeline information and press OK.
‘Content-based routing’ allows you to specify routing parameters (sender, receiver and
msgType) overriding parameters in the header of the incoming IDocs. You determine
such headers from the content of the IDoc itself. E.g. if you want to provide routing
parameters like ‘vendor’ or ‘sales organization’ in a PO as information for the receiving
system (instead of just the logical system’s name).
‘Mapping’: the mechanism that adds (or removes) data segments to (from) a document. E.g. if you want
to include the parameter ‘sales organization’ in the ORDERS IDoc.
A practical example for using the pre-routing mechanism features is if you have a special
Orders IDoc which contains its receiver and sender information in specific fields in the
IDoc itself. Further, it contains extra fields that you want removed, or added, before you
process the IDoc as an ORDER02 IDoc.
In order to do content-based routing, you need to develop Flow or Java Service meeting
certain requirements and then publish that service on the BC using a registration
mechanism. The registration mechanism assures that existing content-based routing
settings are not overridden when upgrading the BC.
You can register one special pre-routing service per message type. Also, a standard
processing service can be established, which will be executed for all message types and
provides default routing information.
You can register both inbound and outbound manipulation services. The inbound services
are executed for inbound IDocs (sent to the Business Connector) using
pub.sap.transport.ALE:InboundProcess.
The outbound services are executed before an IDoc is sent to an SAP system by
pub.sap.transport.ALE:OutboundProcess.
There are two services available, with which routing services can be registered and
unregistered:
Input Description
msgType The message type of the IDoc for which you want to register a content-based
routing or mapping. If the special value $default is used, a “global” service
(invoked for all message types) will be registered.
activated Flag that indicates whether the service could be activated as routing service.
Returns true or false.
activeService Only present if activated==false. In this case it contains the service that is
currently active, or $none if all registered services are deactivated.
Input Description
msgType The message type of the IDoc for which you want to unregister a content-
based routing or mapping. If the special value $default is used, a standard
service will be unregistered.
wasActive Flag that indicates whether the unregistered service was the active routing
service.
The best place to invoke those services for your routing service is within a replication
service or a startup service for a package. Which of these services you choose, depends
on your own needs. Note, that also the default (global) routing service can be
manipulated by using the special message type $default.
A routing service has to use the following specifications for proper behaviour:
Specification Description
Once you registered your routing services you can associate them with message types via
the Administrator UI ( SAP -> Routing ):
Important: in the SAP Routing screen of the Administrator UI there are two sections to
select services: a message type independent section (default handling section) and a
message type dependent section.
A default handling service (inbound or outbound) is executed for all message types. If
there are services selected in the message type dependent section, they will be
executed for the corresponding message type in addition to the default service.
If the special value $none is selected, all registered services are set to inactive.
Note: the services for content-based routing have to be registered by you before they
can be selected via the Administrator UI.
Important: when implementing your own default inbound routing service, the
parameters ‘sender’, ‘receiver’ and ‘msgType’ have to be set by that service. These
parameters are part of the specification. If not, you will get an error message at runtime.
Note: the setting of the global default services works the same way as the setting of
regular message type specific services. You need to register a service before you can
select it. If no service has yet been registered with '$default' as message type, then the
drop-down box for selecting one will not be present. This is the case in a freshly
installed Business Connector. The '$none' choice is only there, if one or more services
are registered.
The settings in the image above indicate that for all incoming IDocs with an ORDERS
message type, the sap.idoc.mappings:orders service will be executed. The service may alter
the IDoc itself as well as the routing parameters for the IDoc. For IDocs going to SAP
with ORDRSP message type, the sap.idoc.mappings:ordrsp service will be executed. This
service can alter the IDoc by adding or removing fields (but can no longer influence the
routing).
Introduction
When an IDoc is sent from an SAP System to the Business Connector, the status of the
IDoc (as displayed in transaction WE02) will always be "03, Data passed to port OK"
(i.e. passed to the tRFC queue of the SAP system). However, this status doesn’t provide
any information regarding whether the IDoc could be processed successfully by the
Business Connector, and who the final recipient is. To get this kind of information, the
Business Connector offers three options: IDoc Trace, ALEAUD IDoc and SYSTAT01
IDoc.
The IDoc Trace feature should be used if you sporadically want to look up the status of
certain IDocs. The lookup is done manually and only for a specific selection of IDocs. If
you want automatic status update, you should use one of the other two options described
below.
Status update via ALEAUD IDoc can be used if the final recipient is again another SAP
System. The most common case will be the connection of two SAP Systems via the
Internet like this:
SAP Server (sender) BC 1 Internet (http) BC 2 SAP Server (receiver).
In all other cases status update via SYSTAT01 IDoc should be used. SAP Business
Connector acts here like an EDI Subsystem and returns status information and
information about the final receiver (receiving email address, Web Server URL, FTP
Server, third party system, etc.) to the sender.
IDoc Trace
Overview
The ALE Monitor allows you to make inquiries about the processing status of an IDoc in
the receiving system actively from within the sending system. In R/3 Systems of release
below 4.6C this can be done with the transaction BDM2 (Cross System IDoc Reporting)
and from release 4.6C on with transaction BD87 (Status Monitor for ALE Messages). As
inputs you can specify certain selection criteria, like Document Number, Message Type,
LS of receiver and date ranges, and the system then makes a synchronous RFC call
(IDOC_DATE_TIME_GET) to the LS that received the IDocs, with a list of DOCNUMs
corresponding to the selected IDocs. (From transaction BD87 you have to hit the toolbar
button “Trace IDocs” after the selection of the IDocs.) This function call returns for each
IDoc the DOCNUM, under which it was saved in the receiving system, the receiving
time and the current processing status in the receiving system.
Prerequisites
• The IDoc Trace functionality only works for IDocs exchanged between partners of
Partner Type LS (Logical System).
• In order to be able to make this synchronous RFC, the partner profile of the LS, which
represents the Business Connector, must contain an outbound parameter with message
type SYNCH.
• Also, the Function Call to an LS of type “tRFC Port”, like the Business Connector, is
executed only if the SAP system is of release 4.6D or higher. For older releases you
have to apply the following hot packages:
R/3 Release Hot Package
SAPKH31I67
3.1I
SAPKH40B56
4.0B
4.5B SAPKH45B35
4.6B
SAPKB46B22 and SAPKH46B22
4.6C SAPKB46C11 and SAPKH46C11
3. All remote Business Connectors, to which IDocs are passed on via a remote
invoke of pub.sap.transport.ALE:InboundProcess (or
wm.PartnerMgr.gateway.transport.ALE:InboundProcess on older BC releases),
should also support IDoc Tracing.
Preparation
If the final receiver is an SAP System, the IDoc ALEAUD can be used to report status
information from the receiver back to the sender. To setup this scenario, the following
settings have to be created in the distribution models of the participating Systems:
(MATMAS is used in this example. Substitute with the IDoc type(s) used in your
scenario.)
• Sending System: For the LS that represents the receiver, set up a partner profile,
which has MATMAS as an outbound parameter and ALEAUD with process code
AUD1 as an inbound parameter.
• Receiving System: For the LS that represents the sender, set up a partner profile with
an outbound parameter ALEAUD and an inbound parameter MATMAS.
Also in the distribution model the following model view has to be created:
Sender: T90CLNT090 (or LS, which received the IDoc, if different)
Receiver: LS of sender
Message type: ALEAUD
Here add a Filter with value “MATMAS”.
Next you have to schedule a job, which executes a variant of the report RBDSTATE. The
variant has to include the LS of the sender as selection parameter. This should send out an
ALEAUD IDoc to the Business Connector.
Overview
In this case the Business Connector can be considered as a kind of EDI Subsystem. If the
SYSTAT01 feature is enabled, it automatically sends a customary EDI Subsystem Status
and some additional information for each IDoc it received back to the original sender.
You can decide for each Routing Rule, whether SYSTAT01 information should be
reported to the sender or not. The following information is then reported in addition to
the status:
In SAP Systems of Release 3.1H - 3.1I you need to perform the following additional
step, before continuing with the general setup:
Go to transaction WE42 (Process codes, inbound) and open the two tree branches
"Inbound with ALE service Processing by task" and "Inbound without ALE service
Processing by task". Here you need to reassign the process code "STA1" from
"without ALE service" to "with ALE service", if this has not been done yet. For this,
proceed as follows (it is a bit "non-intuitive"...):
Mark the node "Inbound without ALE service Processing by task STA1 Status
record from IDoc" with the cursor and then press the "Reassign" button (F6).
Confirm the popup
Double click on the node "Inbound with ALE service Processing by task"
In the following screen press the "Save" button (F11).
General setup:
1. In transaction SALE (Distribution (ALE)) go to "Basic configuration Set up logical
system Maintain logical systems" and add a new logical system for the Business
Connector, if you don't have one yet. If you name it "BUSCON", the Business
Connector will recognize it automatically; else you will have to make the name known
to the Business Connector as described later.
2. In transaction WE20 (Partner Profiles) create a partner profile with "Partn.number" =
the name you chose in step 1 (e.g. "BUSCON") and "Partn.type" = "LS". After you
saved it, add an Inbound Parameter to it as follows:
"Message type" = "STATUS"
"Process code" = "STA1"
1. If you chose a different name from "BUSCON" for the logical system above,
shutdown the Business Connector and add the following parameter to
...\Server\config\server.cnf:
watt.sap.systat01.partnerNumber=<NameOfLogicalSystem>.
Start the BC again.
With "BUSCON" you can omit this step.
2. Go to Adapters Routing Routing Rules, and add the following Service in the
field "Pre-Processing Service" for each Routing Rule, for which you want to enable
SYSTAT01 Status update (or include it as the first step of the Pre-Processing Service,
if you have already your own Pre-Processing Service defined):
pub.sap.monitor.systat01:enable
All IDocs, which come in via this Routing Rule, are now marked for automatic status
update.
3. Go to "Server Scheduler Create a scheduled task" and schedule the Service
pub.sap.monitor.systat01:report.
4. Here you specify time intervals for the Service. You should try to schedule it for times
when you know that there is little load on the system. On the other hand, in order to
prevent the resulting SYSTAT01 IDocs from getting too big, you should schedule it
often enough, so that at most around 2000 IDocs have been received by the Business
Connector since the last run of the report Service. Normally it should be ok to
schedule it once per hour.
This Service collects all the necessary information and error/success messages for
those IDocs, which the Routing Rules chosen in step 2 have processed since the last
run. For each SAP System that has sent any such IDocs to the Business Connector, it
creates and submits one SYSTAT01 IDoc containing all this information.
The Partner Manager offers four switches to improve throughput and performance. These
switches control the way how transactions and messages are persisted. In order to be
effective, these switches have to be added as statements to the server.cnf configuration
file. Please read the Appendix B ‘Server Configuration’ on how to set and modify the
statements.
Overview
The SAP Business Connector Server has several APIs that you can use in your client
applications and services.
This chapter shows how to use the built-in services API to invoke SAP RFCs, send IDocs
to an SAP server, and to receive an IDoc from an SAP server. For descriptions of the
available built-in services, refer to SAP Business Connector API on page D-1.
This chapter also shows how to use the IDoc Java API to construct an IDoc. For historical
reasons the Business Connector 4.8 contains five different APIs for creating and
traversing IDocs:
1 The classes IDOC, IDOCControl and IDOCSegment in the package
com.wm.pkg.sap.idoc
This is a very basic implementation introduced with SAP BC 3.0.1 (1999). It does not
support IDoc Packets and complex tree operations and should no longer be used. Only
included for backward compatibility reasons.
2 The IDoc base library 1.0 (the class com.sap.mw.idoc.IDoc and its nested classes)
This library was introduced in SAP BC 4.7 and should no longer be used. Only
included for backward compatibility reasons.
3 The Business Connector IDoc library 1.0 (the classes BCDocumentList,
BCDocument, BCSegment, BCRecord and JCoBCDocumentList in the package
com.wm.pkg.sap.idoc)
This library was introduced in SAP BC 4.7 and should no longer be used. Only
included for backward compatibility reasons.
4 The IDoc base library 3.x (the package com.sap.conn.idoc)
Introduced with SAP BC 4.8.
Use this API, if you want to write mappings/services, which will be able to process
both kinds of IDocs: those that came in via an RFC call from an SAP system (and
consequently contain correct metadata information from an R/3 DDIC) and those that
came in via XML document (and consequently don’t have a reference to a metadata
repository yet).
JavaDoc for these classes is available at
<sapbc>\Server\packages\SAP\pub\doc\idoc30\index.html .
5 The Business Connector IDoc library 3.x (the classes BCIDocDocumentList,
BCIDocDocument, BCIDocSegment, BCIDocRecord and
JCoBCIDocDocumentList in the package com.wm.pkg.sap.idoc)
Introduced with SAP BC 4.8.
Use the class JCoBCIDocDocumentList, if you know that the IDocs, which your code
will be processing, came in via RFC, or if you are manually constructing an IDoc at a
point, where it is already clear, into which SAP system the IDoc will be sent. (The
DDIC of the SAP system given in the constructor will then be used for metadata
information.) Continue with the classes from com.sap.conn.idoc.
Use the class BCIDocDocumentList, if you know that the IDocs, which your code will
be processing, came in as an XML document, or if you are manually constructing an
IDoc at a point, where no information about a possible receiving SAP system is yet
known. Cast the return values of the API to the classes BCIDocDocument and
BCIDocSegment as appropriate. When using this API, no automatic syntax checks for
IDoc fields and segments will be performed.
JavaDoc for these classes is available at
<sapbc>\Server\packages\SAP\pub\doc\api\index.html
For easy ways and an automatic tool to migrate BC 4.7 Java mappings (IDoc library
version 1.0) to the IDoc library 3.x, see the BC 4.8 Upgrade Guide.
With Release 4.8 SAP BC uses the SAP Java IDoc Library version 3.0 to process
IDocs. For easy ways and an automatic tool to migrate BC 4.7 Java mappings
(IDoc library version 1.0) to the IDoc library 3.x, see the BC 4.8 Upgrade Guide.
IDataCursor c = pipeline.getCursor();
Service.doInvoke("pub.sap.idoc", "encode", pipeline);
String xmlString = IDataUtil.getString(c, "xmlData");
c.destroy();
See description of service pub.sap.idoc.encode for details about the expected input
parameters.
The following code sample shows how to traverse all segments and attributes of a
received IDoc. It also demonstrates how to use segment meta data information.
IDataCursor idc=pipeline.getCursor();
IDocDocumentList iDocList;
if (idc.first("iDocList")) {
iDocList = (IDocDocumentList)idc.getValue();
}
else {
throw new ServiceException("Missing input: iDocList");
}
IDocDocument[] array = iDocList.toArray();
IDocSegment root, segment;
segment = root.getNext();
while (segment != null) {
// do something with the segment meta data
IDocSegmentMetaData meta = segment.getSegmentMetaData();
System.out.println("Segment Name:" + meta.getName());
System.out.println("Min Occur:" +
meta.getMinOccurrence());
System.out.println("Max Occur:" +
meta.getMaxOccurrence());
segment = segment.getNext();
}
}
//create and add a new and empty child segment of type E1MARAM
//and fill the segment data
segment = (BCIDocSegment)segment.addChild("E1MARAM");
segment.setValue("MSGFN", "005");
segment.setValue("MATNR", "BOXCOOKIES");
segment.setValue("ERSDA", "20030303");
segment.setValue("ERNAM", "TOPSI");
segment.setValue("PSTAT", "KBG");
segment.setValue("MTART", "FERT");
segment.setValue("MBRSH", "L");
segment.setValue("MATKL", "G1113");
segment.setValue("MEINS", "PCE");
segment.setValue("BLANZ", "000");
segment.setValue("BRGEW", "0.550");
segment.setValue("NTGEW", "0.000");
segment.setValue("GEWEI", "KGM");
segment.setValue("VPSTA", "KBG");
//create and add a new and empty child segment of type E1MAKTM
//and fill the segment data
segment = (BCIDocSegment)segment.addChild("E1MAKTM");
segment.setValue("MSGFN", "005");
segment.setValue("SPRAS", "D");
segment.setValue("MAKTX", "Schachtel mit Keksen");
segment.setValue("SPRAS_ISO", "DE");
//create and add a new and empty sibling segment of type E1MAKTM
//(same type) and fill the segment data
segment = (BCIDocSegment)segment.addSibling();
segment.setValue("MSGFN", "005");
segment.setValue("SPRAS", "E");
segment.setValue("MAKTX", "Box of cookies");
segment.setValue("SPRAS_ISO", "EN");
//create and add a new and empty sibling segment of type E1MARCM
//and fill the segment data
segment = (BCIDocSegment)segment.addSibling("E1MARCM");
segment.setValue("MSGFN", "005");
segment.setValue("WERKS", "0001");
segment.setValue("PSTAT", "BG");
segment.setValue("PLIFZ", "0");
segment.setValue("WEBAZ", "0");
segment.setValue("PERKZ", "M");
segment.setValue("AUSSS", "0.00");
segment.setValue("BESKZ", "E");
segment.setValue("AUTRU", "X");
//create and add a new and empty sibling segment of type E1MBEWM
//and fill the segment data
segment = (BCIDocSegment)segment.addSibling("E1MBEWM");
segment.setValue("MSGFN", "005");
segment.setValue("BWKEY", "0001");
segment.setValue("VPRSV", "S");
segment.setValue("VERPR", "0.00");
segment.setValue("STPRS", "15.50");
segment.setValue("PEINH", "1");
segment.setValue("BKLAS", "7920");
segment.setValue("VJVPR", "S");
segment.setValue("VJVER", "0.00");
segment.setValue("VJSTP", "15.50");
segment.setValue("LFGJA", "2002");
segment.setValue("LFMON", "08");
segment.setValue("PSTAT", "BG");
segment.setValue("KALN1", "000100126602");
segment.setValue("KALNR", "000100126603");
segment.setValue("EKALR", "X");
segment.setValue("VPLPR", "0.00");
segment.setValue("VJBKL", "7920");
segment.setValue("VJPEI", "1");
segment.setValue("BWPEI", "0");
IDataCursor idc=pipeline.getCursor();
IDataUtil.put(idc, "iDocList", iDocList);
idc.destroy();
}
When executing HTTP Posts using IDoc-XML and XRFC with transactions, you should
make sure that your client correctly handles such calls. It should have transaction
management that supports at least the following features:
Transaction ID generation.
Resending documents with same transaction ID in error cases.
After a successful execution of a transaction (and the concluding
confirmTID), a document must not be sent again.
To transfer the transaction ID to the BC, you add an extra header to the HTTP POST,
x-tid, which contains the transaction ID.
<MATMAS02>
<IDOC BEGIN="1">
<EDI_DC SEGMENT="1">
<TABNAM>EDI_DC</TABNAM>
<MANDT>000</MANDT>
<DOCNUM>0000047112211178</DOCNUM>
<DOCREL/>
<STATUS/>
<DOCTYP>MATMAS02</DOCTYP>
<DIRECT>1</DIRECT>
...
</MATMAS02>
For XRFC documents, you can alternatively put the transaction ID in the header of the
document:
<?xml version="1.0"?>
</sap:Body>
</sap:Envelope>
Chapter 9: Security
Product Availability ................................................................ 9-2
SAP BC Configuration ........................................................... 9-2
Initializing the Security Settings in the SAP BC ....................... 9-3
User Authentication between SAP BC and SAP System ........ 9-3
Authorization Configuration in the SAP Environment ............. 9-10
Installing SAP BC according to your Security Policy .............. 9-10
References .......................................................................... 9-11
Product Availability
As of Business Connector 4.8.1 there is only a strongly encrypted version. The version
with weak encryption (56 bit) is discontinued.
SAP BC Configuration
Please refer to the SAP BC Certification Toolkit User's Guide, the SAP BC Security Best
Practices Document and the SAP BC Administration Guide for information on how to
configure your server securely.
For more information on ports see the SAP BC Administration Guide, Chapter 6 (Configuring
Ports).
If you want to log on to an SAP system via SAP BC using any SAP user and a certificate, you can do so by
providing a trusted certificate for the SAP BC. In a first step you have to request a signed certificate from a CA.
You can do so using the SAP BC Certificate Toolkit (free download: http://service.sap.com/sbc-download. For
more information on how to request a certificate from a CA see the SAP BC Certificate Toolkit Guide).
Having received the CA’s certificate (root certificate), you can import the corresponding (personalized) client
certificates for each user from a local directory to the SAP BC.
For validation purposes you also have to enter the path to the CA Certificate directory.
The CA Certificate directory specifies the name of your local directory containing the
root certificates of CAs that this server trusts. You may specify the directory using an
absolute path or one that is relative to the <sapbc>\server directory.
Attention: If you leave the Trusted Certificates setting blank, the server will accept (trust) any
certificate it receives during an outbound request (a certificate the BC server receives from a
server that it submits a request to). However, the server never implicitly trusts a certificate for the
purpose of authenticating an inbound request or validating an S/MIME signature. When you use
either of these features, you must specify a Trusted Certificates directory, and that directory must
contain the certificates of the CAs that your BC server trusts.
When a user logs on (e.g. from a Web client) using a certificate, the SAP BC verifies the root certificate in the
CA Certificate directory and then passes the client certificate including the username to the SAP system
automatically. However, you have to make sure that this user can access the services he wants to execute in the
SAP BC. That’s why you have to map the client certificate to the corresponding SAP BC user or alternatively to
a (standard) SAP BC user, depending on the authorizations required. If you want to execute a protected service
within the SAP BC, the mapped user must be allowed in the corresponding ACLs (access control lists). For more
information on ACLs see SAP BC Administration Guide, Chapter 8 (Managing Server Security).
Example: You want to execute a service on the SAP BC that retrieves sales order data
from an SAP system. This service is protected by an ACL. The SAP BC user ‘Sales’ is
registered in this ACL and allowed to execute the service. If you map the certificate to
the user ‘Sales’, your SAP BC user can execute this service. In addition, the SAP (R/3)
user, to which the certificate gets mapped inside the R/3 system, must have the
necessary authorization to execute the function modules of the corresponding sales
order function group.
To restrict the rights of the SAP logon users you should create specific user accounts in
the SAP system with the minimum necessary set of authorizations. If for instance SAP
BC is used as a pure RFC-Server, it will perform only very few function callbacks into
the calling SAP System. These callbacks are needed to determine the function module
interface specifications from the SAP system’s DDIC. To allow for this it is sufficient to
use an SAP logon user with the authorization for the following SAP standard function
groups:
RFC1, SDIF, SG00, SRFC.
See SAP Note 460089 for more details.
If this user shall be used to call other application interfaces as well, you need to add the
respective function groups to the authorization list. Add this authorization to the
standard authorization object 'S_RFC' and create an authorization profile which only
contains this authorization. When creating the SAP user, you can then assign this profile
to it. For more details on authorization for SAP users please refer to the SAP
documentation. Again, see SAP Note 460089 for more details.
If the SAP system user is not defined in the SAP BC’s user management, the user
SAPUser (Password: 22101999) is used as the default user for incoming RFC calls. I.e.,
if the SAP BC is called by an SAP user that does not exist within SAP BC, the system
switches automatically to the user SAPUser as default user.
The user SAPUser is part of the User Group SAPUsers and therefore also figures in the
ACL SAPUsers that protects all Inbound Maps and Inbound Processes of SAP BC
transports.
The user SAPUser, as well as the corresponding User Group and ACL are created
automatically when you are starting the SAP BC server for the first time.
If an SAP user has been created in SAP BC, in order to execute all Inbound Maps within
SAP BC, you have to assign this user at least to the User Group SAPUsers.
If you want to avoid that an SAP user which has not been created within SAP BC, can
use the whole authorization range of the SAPUser, you should assign SAPUser only to
those User Group(s) or ACL(s), which it absolutely needs.
The usernames in SAP BC are case sensitive!
If the above succeeds, the RFC call runs under the corresponding SAP BC user ID and is
allowed to execute exactly those Inbound Maps and Routing Rules as is defined in its
assigned ACL(s).
If the login fails, the RFC call is aborted with an exception. There is no fallback to the
default SAPUser!
The SAP Cryptographic Library is the default security product delivered by SAP for
performing encryption functions in SAP Systems. You can use it for providing Secure
Network Communications (SNC) between SAP Server components. The
sapcryptolib is also used to implement Single Sign-On (SSO). This section
describes the procedure steps that are required to setup the SAP BC Server for SNC
using the sapcryptolib. For more detailed information on the installation of the
• Windows platforms: insert a line in server.bat as follows: after the SETLOCAL line
set SECUDIR=<pse-path>
• Unix platforms: insert a line in server.sh as follows at the very beginning
export SECUDIR=<pse-path>
To restrict the rights of the SAP logon users you should create specific user accounts in
the SAP system with the minimum necessary set of authorizations. If SAP BC is used as
a pure RFC Server, it will only perform very few function callbacks to the calling SAP
System. These callbacks are needed to determine the function interface specification and
structure definitions of the parameters. The same is true for a client user that only
performs those repository lookups. The authorization object for callbacks and lookups
should look like this:
The RFC_NAME field needs to be filled with the following SAP standard function
groups, depending on the SAP System release:
The SAP BC can only access SAP Systems for which a SAP alias has been created in the
SAP server list. There is no service available that allows you to execute RFC calls to SAP
Systems that are not defined there.
In addition to this restriction, you can also protect access to SAP Systems in an intranet by
installing an additional firewall between the SAP BC and the SAP Systems or putting the
SAP BC in the DMZ. You can configure the firewall to restrict which SAP Systems can
be accessed from the SAP BC through the SAP router.
Finally, you might even want to completely disallow a SAP BC server in the DMZ to
actively open connections to a SAP System in the intranet. To do so, you need to install
two SAP BC servers, one in the DMZ and one in the intranet. The SAP BC server in the
DMZ can then be configured as a reverse invoke server. Thus, the SAP BC server in the
intranet will establish the connection to the reverse invoke server (inside to outside)
whereas the data still flows synchronously from the outside to the inside. For information
on how to configure reverse invoke please see SAP BC Administration Guide, Chapter 8
(Managing Server Security), p. 135 ff.
References
For further information on how to configure security, refer to the SAP BC Administration
Guide.
The DDIC cache does not persist through shutdown and restart of the SAP Business Connector.
The SAP Business Connector displays a screen that lists the number of function
modules and structure definitions cached for each SAP server.
The System ID field is the name that was defined when the SAP system was
originally installed. If one or more SAP systems use the same system ID, they will
share the same cache. This would lead to corrupted or truncated data in function
module parameters or tables or in IDoc segments, if the two SAP systems have a
different release and structures, tables and IDoc segments have been changed from
one release to the other.
Therefore, you must not connect two different SAP systems that share the same
System ID to one Business Connector. A setup like this is not supported. It may
work in special circumstances where you can guarantee that all used structure, table
and IDoc definitions are identical in both systems, but you would run such a setup
at your own risk. Much preferable would be to do one of the following:
• Change the System ID of one of the two systems.
Changing the System ID of an installed SAP system is quite difficult and
sometimes even impossible. You may need to consult with SAP support in
this case. But it is very advisable that all SAP systems within the same
network have their own unique System ID.
• Install two separate Business Connectors and have each of the two SAP
systems use one dedicated Business Connector.
For more information about defining SAP servers, refer to Defining SAP Servers on
page 3-4.
3 To view the names of cached function modules for an SAP server, select the number
in the Function cache column for the appropriate SAP server.
4 To view the names of the cached structure definitions for an SAP server, select the
number in the Structure cache column for the appropriate SAP server.
The SAP Business Connector displays a screen that lists the function interface for
the selected function module.
5 To view the structure definition of the displayed parameters, follow the hyperlink in
the Table field. If you want to view the structures directly from the DDIC main
page, follow the instructions below.
The SAP Business Connector displays a screen that lists the structure definition
for the selected cached structure.
The list also contains BAPIs for which no ALE interface has been generated in the SAP
System, but for which the availability has already been checked. This is because the
SAP Business Connector tries only once to retrieve ALE information. If this retrieval
fails, the SAP Business Connector remembers this fact.
4 To remove a function module from the DDIC cache, press the icon in the
Remove column.
4 To remove a structure definition from the DDIC cache, press the icon in the
Remove column.
4 To remove a business object from the DDIC cache, press the icon in the
Remove column.
3 To view the names of the cached ALE mappings for an SAP server, press the
number in the ALE Mappings column for the appropriate SAP server.
4 To remove an ALE mapping from the DDIC cache, press the icon in the
Remove column.
Package Layout
All of the files relevant to the SAP Business Connector and its persistent state
information are in the sapbc/server/packages/SAP directory. The following table
describes the directories and files that make up the SAP package directory.
Directory Contents
pub, templates Contains files and images comprising the SAP Administration interface.
server.cnf
This file is created when you start the SAP Business Connector for the first time.
Some of the following statements can be added manually after installing SAP Business Connector.
Shut down the server and back up this file before you edit server.cnf.
As of SAP BC Release 4.6, you can change the values of the server.cnf parameters also
via the Server Administrator UI. Choose Settings -> Extended and select the parameters you
want to edit (see SAP BC Administration Guide 4.8, p.94ff. for details).
The following statements are added automatically, when SAP Business Connector is started for the first
time:
Maximal number of connections in one RFC
watt.sap.connection.poolSize
connection pool to one SAP System (default: 10)
Delay (minutes) until an unused connection to a SAP
watt.sap.connection.timeout
System is timed out (default: 5)
Time interval in seconds between checks (seconds)
watt.sap.connection.timeoutCheckPeriod
whether unused pooled connections have timed out
Delay (seconds) until requests waiting for a connection
watt.sap.connection.waitForPool
from a pool time out in the queue
Time interval (minutes) between checks of the listener.
It is checked whether the RFC Handle is still valid. If
watt.sap.listener.checkTime
the Gateway is running, any inactive Listener is
restarted at the latest after this interval.
Delay (seconds) until a listener responds at the latest to
watt.sap.listener.responseTime
an incoming request.
Change/add the following statements to the server.cnf file to modify its XML creation
mechanisms:
Version of RFC-XML (XRFC) sent. Valid versions: 0.9 and 1.0
watt.sap.rfcxml.version (default).
Version of illegal character escaping in IDoc-XML. Valid
watt.sap.idocxml.escaping
versions: 4.6 and 5.0 (default)
Flag that indicates if the SAP XML dialects should be rendered
watt.sap.xml.prettyPrint pretty printed. (default=true) Set the value to "false" to remove
all unnecessary white space and thus improve performance.
Used for overriding the SAP BC’s encoding of RFC-XML and
IDoc-XML documents. By default, the Business Connector
creates RFC/IDoc-XML documents with the encoding-attribute
set to an encoding corresponding to the SAP system codepage of
watt.sap.xml.encoding the SAP system, from which the RFC/IDoc has been received.
For example, if the SAP system is running under codepage 1100,
then the BC will use encoding=”iso-8859-1” in any XML
headers created from this data. To override this behavior, use the
watt.sap.xml.encoding parameter.
Change/add the following statements to the server.cnf file to increase performance of the message
store
This switch can be set to "true" or "false". If set to "true", there
will be no transaction management for incoming documents. The
documents will not receive an individual transaction ID and their
state cannot be monitored in the transaction list of the message
watt.PartnerMgr.routeOnly
store. Furthermore, the message body will not be stored on disk.
The "routeOnly" switch, when set to "true", will automatically
overwrite the setting of the "watt.PartnerMgr.noMsgStorage"
switch.
Tip:
This switch is offered mainly for compatibility reasons. It is
recommended to rather fine-tune transactional performance via
the other three switches.
Input Parameters
This key Must specify…
$client (optional) Client for the session. If no client is specified, the default client
is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This key Contains…
pub.sap.client:lockSession
Locks an RFC connection to your SAP BC session so that you will always exclusively use
this RFC connection for subsequent calls.
Input Parameters
This key Must specify…
serverName SAP system alias on which the session will be locked. The
name must match a configured SAP server alias on the SAP
Business Connector Server.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the user
specified in the SAP system alias settings is used.
Return Values
There are no return values
Example
This service locks a backend session so that the current SAP BC session has exclusive
access to that session. This allows executing one or several BAPIs within the backend
session and completing this LUW by triggering a COMMIT WORK command inside the
SAP System. The COMMIT WORK will cause a database commit and start the processing
of the posted data. This service only works with SAP Systems from 4.0A on, because
from that release on (some) BAPIs do not write data directly to the database but use the
posting engine inside the SAP System. The data will not be written to the database until
the client triggers a COMMIT WORK command. In order to call a BAPI which uses this
mechanism, it is required to perform the following steps on the SAP Business Connector:
1. Call the pub.sap.client:lockSession service in order to get an exclusive connection to the
SAP System.
2. Perform the BAPI calls.
3. Call the pub.sap.bapi:commit or pub.sap.bapi:rollback service
4. Call the pub.sap.client:releaseSession service in order to release the exclusive
connection to the SAP System and clean up used resources on the SAP Business
Connector and in the backend session.
pub.sap.client:releaseSession
Releases a locked session on a SAP server.
Input Parameters
This key Must specify…
serverName SAP system alias on which the locked session is located. The
name must match a configured SAP server alias on the SAP
Business Connector Server.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
There are no return values
Example1
The service will release a session after a commit work or rollback work command has
been triggered inside the SAP System. This service only works with SAP Systems from
4.0A on, since from that release on (some) BAPIs don't write data directly to the database
but use the posting engine inside the SAP System. In order to call a BAPI which writes
data, it is required to perform the following steps on the Business Connector:
1. Call the pub.sap.client:lockSession service in order to get a exclusive connection to the
SAP System.
2. Perform the BAPI calls.
3. Call the pub.sap.bapi:commit or pub.sap.bapi:rollback service
4. Call the pub.sap.client:releaseSession service in order to release the exclusive
connection to the SAP System and clean up used resources on the SAP Business
Connector and in the backend session.
Example2
You also need this service if you want to lock and change a certain database object. To do
this, please proceed as follows:
1. Call the pub.client:lockSession service in order to get an exclusive connection to an SAP
system.
2. Lock an object by calling a BAPI_*_ENQUEUE.
3. Make your changes by invoking other BAPIs.
4. Release the object by calling a BAPI_*_DEQUEUE.
pub.sap.client:invoke
Invokes an RFC function module in synchronous mode on a given SAP server.
Input Parameters
This service also needs the inputs (imports and tables) required by the function module.
This key Must specify…
serverName Server alias from the server list on which the function module
will be invoked.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This service returns the outputs (exports and tables) returned by the function module.
$rfctime Time (ms) spent within the RFC library to complete the
invocation.
$runtime Total invocation time (ms), including processing time within the
backend R/3 system.
Example
This service is used when you are directly calling an RFC on an SAP system without
using an outbound map. (When an outbound map is used, this service is invoked
implicitly.)
pub.sap.client:invokeTransaction
Invokes a function module via tRFC on a given SAP server.
Input Parameters
This key Must specify…
serverName SAP server alias for the SAP server on which you want to
invoke the function module. The alias must match a configured
SAP server alias on SAP Business Connector Server.
$queueName (optional) Name of the SAP system inbound queue. Specify a value in
case of a qRFC scenario
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This key Must specify…
$runtime Total invocation time (ms), including processing time within the
backend R/3 system.
$rfctime Time (ms) spent within the RFC library to complete the
invocation.
pub.sap.client:createTID
Call this service if you want to obtain a transaction ID (TID; which is a GUID) that
conforms to the format of SAP TIDs. The obtained TID can be used for
pub.sap.client:invokeTransaction and pub.sap.client:confirmTID.
The pub.sap.transport.ALE:OutboundProcess service performs the function of both the
pub.sap.client:createTID and pub.sap.client:invokeTransaction services. For IDocs it is
recommended that you use the pub.sap.transport.ALE:OutboundProcess or
pub.sap.client:sendIDoc services rather than invoking pub.sap.client:createTID and
pub.sap.client:invokeTransaction.
Input Parameters
This key Must specify…
serverName SAP system alias on which the TID is created. This name must
match a server list entry.
$queueName (optional) Name of the SAP system inbound queue. Specify a value in
case of a qRFC scenario
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This key Contains…
Example
This service is used in tRFC client scenarios, which require a transactional ID (TID)
uniquely identifying the transaction. See also pub.sap.client:confirmTID.
pub.sap.client:confirmTID
Confirms the transaction specified by the TID on the specified SAP system. This service
must be called after an invokeTransaction in order to clean up the transaction status
keeping entries on the target system.
Input Parameters
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
There are no return values.
Example
This service is used in tRFC client scenarios in order to confirm a transaction which has
been executed successfuly.
1. Invoke pub.sap.client:createTID. This service creates an SAP-conformant TID.
It is necessary to have one, otherwise you cannot invoke the function module with
pub.sap.client:invokeTransaction. If you have already obtained a TID, you should use
that one in order to guarantee that the transaction is executed only once.
2. Invoke pub.sap.client:invokeTransaction. This service invokes the given
function module as a tRFC on the SAP system specified by serverName. The TID
is passed as a parameter on this call.
3. Invoke pub.sap.client:confirmTID. Confirms that the transaction has completed.
Pass the same serverName and $tid value on this call.
pub.sap.client:getAttributes
Connects to the given SAP system and returns interesting information about this session.
Input Parameters
This key Must specify…
$client (optional) Client for the session. If no client is specified, the client
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
Record containing session information (RFC Attributes):
pub.sap.client:getFunctionInterface
Looks up the function interface definition of an RFC function module in the given SAP
system.
Input Parameters
This key Must specify…
$rfcname Function module for which the interface definition is looked up.
serverName Alias of the SAP system, in whose DDIC you want to look up
the function module definition. The name must match a server
list entry.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
Record list containing all parameter related information:
pub.sap.client:getStructureDefinition
Looks up the structure definition of an SAP structure in the given SAP system.
Input Parameters
This key Must specify…
serverName Alias of the SAP system, in whose DDIC you want to look up
the structure definition. The name must match a server list
entry.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
Record list containing all field related information.
tabLength Length of the structure when used in a table. This might differ
from the sum of all field lengths, as the number types have to
be aligned to memory segments.
pub.sap.client:sendIDoc
Sends an IDoc to a given SAP server.
Input Parameters
This key Must specify…
serverName SAP server alias of the SAP server to which you want to send
the IDoc. The alias must match a configured SAP server alias
on SAP Business Connector Server.
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library.
$queueName (optional) Name of the SAP system inbound queue. Specify a value in
case of a qRFC scenario
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This key Must specify…
$runtime Total invocation time (ms), including processing time within the
backend R/3 system.
$rfctime Time (ms) spent within the RFC library to complete the
invocation.
pub.sap.client:ping
Checks the response time of an SAP system.
Input Parameters
This key Must specify…
serverName Alias of the SAP system, which shall be pinged. The name
must match a server list entry.
$client (optional) Client for the session. If no client is specified, the client
specified in the SAP system alias settings is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values:
This key Must specify…
XRFC Services
pub.sap.rfc:encode
Converts the data of an RFC call to an XML string in a format specified by the SAP
RFC-XML (XRFC) specification.
Input Parameters
This service needs the function module’s input data (in case of a call) or output data (in
case of a response) to be present in the pipeline in Values/IData representation.
This key Must specify…
encodeTo This flag specifies whether the output should be a Java String
(xmlData) or a byte[] (bytes).
Return Values
This key Contains…
Example
Use this service for creating RFC-XML corresponding to the pipeline and forwarding it
to another BC or web server (for example, via HTTP). This is done in the XML
transport’s Outbound Process for function modules.
pub.sap.rfc:decode
Converts an RFC-XML (XRFC) document to an IData object that will be in the correct
format to be passed to an SAP system.
Input Parameters
The service searches the pipeline for input data in the following order: xmlData, bytes
and finally node. If one of these keys is found, the search stops and the found input will
be decoded. For example, if the pipeline contains two RFC-XML documents, node and
xmlData, then only xmlData will be decoded and node will not be processed.
This key Must specify…
node (optional) Document object representing the XRFC data (you will get a
node, e.g. when putting an XML file via FTP with extension
.xml).
Return Values
IData object corresponding to the RFC-XML document.
$encoding Specifies the encoding used in the input document's XML
header, e.g. iso-8859-1
Example
This service can be used when an RFC-XML document is posted to the server in a
variable.
pub.sap.rfc:createTemplate
Creates an RFC-XML (XRFC) template for the specified function module
Input Parameters
This key Must specify…
repServerName SAP server alias for the SAP server that is used as a
repository. The alias must match a configured SAP server
alias on the SAP Business Connector Server.
$rfcname Function module for which you want to create the template.
Return Values
This key Contains…
Example
Use this service to create templates for testing purposes. This service is used in the Lookup
screen.
IDoc Services
Due to the integration of the Java IDoc Class Library into SAP BC 4.8 some service
parameters in this part have changed. They may contain the additional parameter iDocList
(an IDocDocumentList object) that replaces or extends the parameters
IDOC_CONTROL(_REC_40) and IDOC_DATA(_REC_40).
pub.sap.idoc:encodeSDATA
Converts every SDATA field from a structured record to byte array. This service is
usually called prior to sending an IDoc to an SAP system via
pub.sap.client:invokeTransaction.
Note: starting with release 4.7 there is a new client service pub.sap.client:sendIDoc that
allows to send the iDocList directly. The encodeSDATA service is no longer necessary.
Input Parameters
This service requires the following input parameters to be present in the pipeline.
Note that this service handles both IDoc versions 2 and 3. The difference between the two
is that, for IDocs version 2, the service looks for IDOC_CONTROL and IDOC_DATA in
the pipeline. For IDocs version 3, it looks for IDOC_CONTROL_REC_40 and
IDOC_DATA_REC_40.
This key Must specify…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc.
or The SDATA field is a Values object containing the keys and
IDOC_CONTROL_REC values from the segment table (the name of the segment
40 table is specified by the SEGNAM field).
IDOC_DATA_REC40
Return Values
This key Contains…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc.
or The SDATA field is a 1000-byte field. At this point, the IDoc
IDOC_CONTROL_REC in the pipeline is ready for sending to an SAP system via
40 pub.sap.client:invokeTransaction.
IDOC_DATA_REC40
pub.sap.idoc:decodeSDATA
Converts the SDATA field from raw byte array to a structured record (with keys and
values corresponding to the segment table). This service was usually called immediately
after receiving an IDoc from the SAP system in a Java service, for example.
With Release 4.7, the service is only required if you receive an IDoc in the tables
representation from a sending system (e.g. in an Inbound Map for
IDOC_INBOUND_ASYNCHRONOUS).
Input Parameters
This service requires the following input parameters to be present in the pipeline.
Note that this service handles both IDoc versions 2 and 3. The difference between the
two is that, for IDocs version 2, the service looks for IDOC_CONTROL and
IDOC_DATA in the pipeline. For IDocs version 3, it looks for
IDOC_CONTROL_REC_40 and IDOC_DATA_REC_40.
This key Must specify…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc.
or This is state of the Values object that is passed to a Java
IDOC_CONTROL_REC service from the SAP system.
40
IDOC_DATA_REC40 At this point, the SDATA field of each segment consists of a
1000-byte field.
Return Values
This key Contains…
pub.sap.idoc:transformFlatToHierarchy
Reformats an IDoc from flat RFC format to hierarchical format which represents a
hierarchical structure of an IDoc-XML document that can be used for flow mappings.
Deprecated: use pub.sap.idoc:iDocToRecord instead.
Input Parameters
This service requires the following input parameters to be present in the pipeline.
Note that this service handles both IDoc versions 2 and 3. The difference between the
two is that, for IDocs version 2, the service looks for IDOC_CONTROL and
IDOC_DATA in the pipeline. For IDocs version 3, it looks for
IDOC_CONTROL_REC_40 and IDOC_DATA_REC_40.
This key Must specify…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc.
or The SDATA field is now an orderly Values object
IDOC_CONTROL_REC40 containing the keys and values from the segment table
IDOC_DATA_REC40 (the name of the segment table is specified by the
SEGNAM field).
conformsTo (optional) Name of the record structure of the IDoc. The record
structure is used as a template to discriminate between
records and record lists. Without conformsTo, all tables
in the hierarchical structure will be record lists.
Return Values
This key Contains…
pub.sap.idoc:transformHierarchyToFlat
Reformats an IDoc from hierarchical format to flat RFC format.
Deprecated: use pub.sap.idoc:recordToIDoc instead.
Input Parameters
This service requires the following input parameters from the Values object.
This key Must specify…
Return Values
This key Contains…
pub.sap.idoc.routing:registerService
This service registers a given service with the routing manager. The best way to use it is to
invoke it in a replication or startup service.
Input Parameters
This key… Must specify…
msgType The message type of the IDoc for which you want to register a content-
based routing or mapping. If the special value $default is used, a standard
(global) service will be registered.
Return Values
This key… Contains…
activated Flag that indicates whether the service could be activated as routing
service.
activeService Present only if activated==false. In this case it contains the service that is
currently active or $none if all registered services are deactivated.
pub.sap.idoc.routing:unregisterService
This service unregisters a given service from the routing manager.
Input Parameters
This key… Must specify…
msgType The message type of the IDoc for which you want to unregister a content-
based routing or mapping. If the special value $default is used, a standard
(global) service will be unregistered.
Return Values
wasActive Flag that indicates whether the unregistered service was the active routing
service.
pub.sap.idoc:encodeString
Converts an IDoc to flat file format equivalent to the format that is used by the file port of
an SAP system.
Note: When saving to a file, make sure the string is saved with correct encoding.
Input Parameters
This key… Must specify…
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library.
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc. The SDATA field has to
be a record containing the keys and values from the segment
or
table (the name of the segment table is specified by the
IDOC_CONTROL_REC40 SEGNAM field).
IDOC_DATA_REC40
Return Values
This key… Contains…
pub.sap.idoc:decodeString
Parses an IDoc flat file in the format that is used by the file port of an SAP system and
creates an IDoc object from it.
Input Parameters
This key… Must specify…
Return Values
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library.
pub.sap.idoc:iDocToRecord
Generates a boundNode from an IDoc object. The boundNode can then be used to
perform mappings in Flow language. This function is similar to the service
pub.sap.idoc:transformFlatToHierarchy.
Input Parameters
This key… Must specify…
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library.
conformsTo Name of the record structure of the IDoc. The record structure
is used as a template to discriminate between records and
record lists. Without conformsTo, all tables in the hierarchical
structure will be record lists.
Return Values
This key… Contains…
pub.sap.idoc:recordToIDoc
Complementary service to pub.sap.idoc:iDocToRecord.
Input Parameters
This key… Must specify…
Return Values
This key… Contains…
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library,
ready to be sent into R/3 via pub.sap.client:sentIDoc.
pub.sap.idoc:iDocToTables
Converts an IDoc object into table format, so that it can be sent to a SAP BC server 4.6
via B2B transport. (The BC 4.6 does not include the Java IDoc Class Library, so can’t
work with IDoc objects.)
Input Parameters
This key… Must specify…
Return Values
This key… Contains…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc. The SDATA field is
now an orderly Values object containing the keys and
or
values from the segment table (the name of the segment
IDOC_CONTROL_REC40 table is specified by the SEGNAM field).
IDOC_DATA_REC40
pub.sap.idoc:tablesToIDoc
Complementary service to pub.sap.idoc:iDocToTables.
Input Parameters
This key… Must specify…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables for the IDoc. The SDATA field
needs to be a record containing the keys and values from
or
the segment table (the name of the segment table is
IDOC_CONTROL_REC40 specified by the SEGNAM field).
IDOC_DATA_REC40
Return Values
This key… Contains…
IDoc-XML Services
pub.sap.idoc:encode
This Service converts an IDoc object to an XML document in a format specified by the
SAP IDoc-XML Specification.
Input Parameters
This service requires one the following input parameters to be present in the pipeline.
Note that this service handles both IDoc versions 2 and 3. The difference between the
two is that, for IDocs version 2, the service looks for IDOC_CONTROL and
IDOC_DATA in the pipeline. For IDocs version 3, it looks for
IDOC_CONTROL_REC_40 and IDOC_DATA_REC_40.
This key Must specify…
IDOC_CONTROL Both keys are Record list (Table) objects containing the
IDOC_DATA control and data tables of the IDoc.
or The SDATA field needs to be a Record containing the keys
IDOC_CONTROL_REC40 and values from the segment table (the name of the segment
IDOC_DATA_REC40 table is specified by the SEGNAM field).
encodeTo This flag specifies whether the output should be a Java String
(xmlData) or a byte[] (bytes).
Return Values
This key Contains…
Example
This service is most often used when you want to receive an IDoc from an SAP system
and convert it to XML.
pub.sap.idoc:decode
Service that converts an XML string in a format specified by the SAP-XML
Specification into an IDoc object ready to be sent into an R/3 system (using
pub.sap.client:sendIDoc).
Input Parameters
This service requires one of the following input parameters to be present in the pipeline.
It searches the pipeline for input in the following order: xmlData, bytes and finally node.
The first input found is processed and any additional inputs are neglected.
This key Must specify…
node (optional) Document object representing the IDoc-XML data. (You'll get
a node, e.g. when putting an XML file via FTP with extension
.xml).
Return Values
Note that this service handles both IDoc versions 2 and 3. If the tag for the IDoc control
header is “EDI_DC” in the XML, this service converts it into a version 2 IDoc. If the tag
for the IDoc control header is “EDI_DC40” in the XML, this service converts it into a
version 3 IDoc.
This key Contains…
iDocList Contains the IDoc(s) as object of the Java IDoc Class Library.
$encoding Returns the encoding used in the input document's XML header,
e.g. iso-8859-1
Example
This service is the first service called when you want to send an IDoc-XML document to
an SAP system. The following is a sequence of service calls that take an IDoc in XML
form, convert it to an IDoc object and then fire it into the SAP system:
1. Invoke this service (pub.sap.idoc:decode). This takes the input xmlData (the XML
String) and creates an IDoc object that is ready to be sent into the SAP system.
2. Invoke pub.sap.client:createTID. This service returns a transaction ID, which can be
used for sending the IDoc into the SAP system. Note: Store this transaction ID, so
that in case of errors you can later resend the IDoc using the same transaction ID.
3. Invoke pub.sap.client:sendIDoc. This service requires the IDoc object and the
serverName to send the IDoc to.
4. Invoke pub.sap.client:confirmTID in case the previous call was successful. This
cleans up the receiving system’s ARFCRSTATE table. Note: if the Business
Connector is the middle-tier in a multi-tier environment, the confirmTID step should
not be invoked here, but in a separate Service triggered explicitly by the first-tier
system! Otherwise duplicate postings may result. See also the Partner Manager
chapter about how to achieve end-to-end transactional security.
bXML Services
pub.sap.bapi:encode
Converts a BAPI call represented in the pipeline to an XML string in a format specified
by the SAP bXML specification.
Input Parameters
This key Must specify…
encodeTo This flag specifies whether the output should be a Java String
(xmlData) or a byte[] (bytes).
Return Values
This key Contains…
pub.sap.bapi:decode
Decodes bXML documents and generates a corresponding pipeline. The service searches
the pipeline for input in the following order: xmlData, bytes and finally node. The first
input found is processed and any additional inputs are neglected.
Input Parameters
This key Must specify…
node (optional) Document object, that represents the bXML data (you'll get a
node, e.g. when putting an XML file via FTP with extension
.xml).
$encoding(optional) Specifies the encoding used for the strings, e.g. iso-8859-1.
Return Values
No return values.
pub.sap.bapi:createTemplate
Generates a bXML document template for the definition of a BAPI in an SAP system.
Input Parameters
This key Must specify…
repServerName or SAP server alias for the SAP server that is used as a
serverName repository. The alias must match a configured SAP server
alias on the SAP Business Connector Server.
Note: one of the parameters must be specified. As
repServerName is primary, we recommend using this
parameter
Return Values
This key Contains…
BAPI Services
pub.sap.bapi:commit
Commits a currently pending LUW in the backend session, i.e. it persists the changes
being done during one or more preceding BAPI calls.
Note: You need to use pub.sap.client:lockSession/releaseSession to make sure the current SAP
BC session keeps an exclusive lock on one particular SAP system session.
Input Parameters
This key Must specify…
serverName SAP system used. This name must match a server list entry.
$client (optional) Client for the session. If no client is specified, the default client
is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
wait (optional) Flag indicating whether the call should wait until the database
commit is finished. This is necessary, if you want to use the
changed data immediately afterwards in further calls from the
SAP BC. Otherwise the following may happen: first SAP BC
call creates an order in the backend system and calls commit.
The commit work is running in a separate update work
process, and before it is finished, a second call from the BC
comes in trying to add an item to the above order. As the order
is not yet “visible” on the DB, the second call unexpectedly
Return Values
This key Contains…
pub.sap.bapi:rollback
Rolls back all changes in the current backend LUW. See also commit.
Note: You need to use pub.sap.client:lockSession/releaseSession to make sure the current SAP
BC session keeps an exclusive lock on one particular SAP system session.
Input Parameters
This key Must specify…
serverName SAP system used. This name must match a server list entry.
$client (optional) Client for the session. If no client is specified, the default client
is used.
$user (optional) Username for the session. If no user is specified, the default
user is used.
Return Values
This key Contains…
wm.PartnerMgr.gateway.admin:addRoutingRule
This service creates a new routing rule for the given sender/receiver/msgType triple. If a
routing rule for that key already exists, an exception is thrown. Any of the optional input
parameters supplied with the invoke are already added to the routing rule. If both
"transport" and "transportParams" are present, the Flow Service corresponding to this
routing rule is generated and thus ready to be used.
Input Parameters
This key Must specify…
transport The transport to use for sending the messages. The standard
Business Connector comes with the following Transports:
"FTP Outbound Service", "XML", "ALE (R/3 IDOC)", "RFC",
"Email Outbound Service", "BAPI", "B2B Service". Others may
be registered by add-on Packages.
flow (optional) Name under which the corresponding routing rule service
should be generated. Specify this parameter, if one of the
sender/receiver/msgType keys contains a parameter, which
cannot be used in a file name of the host's file system. If "flow"
is not specified, the default name
wm.PartnerMgr.flows.<sender>.<receiver>:<msgType> is
used for the generated Flow Service.
package (optional) Package into which the Flow Service should be generated. If
not specified, the "Default" package is used.
enabled "true" or "false". If set to "false", the routing rule will not be
used for routing incoming messages, even if the routing rule is
already functional.
aclgroup Protects the generated routing rule Flow Service with the given
ACL. Default is NONE.
Return Values
None.
wm.PartnerMgr.gateway.admin:editRoutingRule
Updates/completes fields of the routing rule given by the sender/receiver/msgType triple.
If the routing rule for that key does not exist, an exception is thrown. Any of the optional
input parameters supplied with the invoke are used to complete/override fields of the
routing rule. If both, the "transport" and "transportParams" of the routing rule are
complete, the Flow Service corresponding to this routing rule is (re-)generated and thus
ready to be used.
Input Parameters
This key Must specify…
transport The transport to use for sending the messages. The standard
Business Connector comes with the following Transports:
"FTP Outbound Service", "XML", "ALE (R/3 IDOC)", "RFC",
"Email Outbound Service", "BAPI", "B2B Service". Others may
be registered by add-on Packages.
enabled "true" or "false". If set to "false", the routing rule will not be
used for routing incoming messages, even if the routing rule is
already functional.
aclgroup Protects the generated routing rule Flow Service with the given
ACL. Default is NONE.
Return Values
None.
wm.PartnerMgr.gateway.admin:removeRoutingRule
This service deletes a routing rule.
Input Parameters
This key Must specify…
Return Values
None.
wm.PartnerMgr.gateway.admin:disableRoutingRule
Disables a routing rule, so that it is no longer used for routing incoming messages. But the
routing rule is not deleted, so that you can later enable it again, when messages for this
sender/receiver/msgType key should be routed.
Input Parameters
This key Must specify…
Return Values
None.
wm.PartnerMgr.gateway.admin:enableRoutingRule
Enables a previously disabled routing rule.
Input Parameters
This key Must specify…
Return Values
None.
wm.PartnerMgr.gateway.admin:listRoutingRule
Gives a sorted list of all routing rules that match the given selection filter. The filter
parameters may contain the wildcards "*" to match any number of characters and "?" to
match exactly one character. By preceding the filter with a "^", the filter will be
“inverted”. The search conditions are combined with a logical AND. Example: setting
"senderFilter" to A*? will display only those routing rules, whose sender starts with "A"
and has at least one more character after the "A".
Input Parameters
Return Values
This key Contains…
wm.PartnerMgr.gateway.admin:getRoutingRule
Reads the configuration of the given routing rule.
Input Parameters
This key Must specify…
Return Values
This key Contains…
transport The transport to use for sending the messages. The standard
Business Connector comes with the following Transports:
"FTP Outbound Service", "XML", "ALE (R/3 IDOC)", "RFC",
"Email Outbound Service", "BAPI", "B2B Service". Others may
flow Name under which the corresponding routing rule service has
been generated.
package Package into which the Flow Service has been generated
enabled "true" or "false". If set to "false", the routing rule will not be
used for routing incoming messages, even if the routing rule is
already functional.
lastChangedOn Time and date, when this routing rule was last changed.
wm.PartnerMgr.gateway.admin:listTransports
Returns a list of the currently registered transports.
Return Values
This key Contains…
transports A RecordList containing one entry for each transport, with the
name of the Transport and a URL to a Service for configuring
this transport (if any).
wm.PartnerMgr.xtn.admin:list
Returns a list of transactions, which can either be a new search in the Message Store, the
result of a previous search (i.e. the current selection), the next or previous page of the
current selection or the sorting of the current selection.
Input Parameters
This key Must specify…
Return Values
This key Contains…
maxNumber The currently used page size for displaying the search result.
wm.PartnerMgr.xtn.admin:get
Returns detail information for a single transaction.
Input Parameters
This key Must specify…
Return values
This key Contains…
wm.PartnerMgr.xtn.admin:getMessage
Returns the pipeline containing the actual message body. Note: this Service will only
work, if the storing of message bodies has not been disabled (i.e.
watt.PartnerMgr.noMsgStorage=true has not been added to server.cnf).
Input Parameters
This key Must specify…
Return values
Depending on transaction.
wm.PartnerMgr.xtn.admin:mapDocNumToTID
If the Business Connector has been setup for "IDocTrace" (watt.sap.monitorIDocs=true),
this Service can be used to find the transaction IDs of IDocs for which only the document
number (DOCNUM from IDoc control record) is known.
Input Parameters
This key Must specify…
sourceSystem The Logical System, from which these IDocs came from. This
is the value SNDPRN from the IDoc control record.
wm.PartnerMgr.xtn.admin:delete
Deletes one transaction from the Message Store.
Input Parameters
This key Must specify…
Return values
None.
wm.PartnerMgr.xtn.admin:deleteAll
Deletes the entire Message Store. (Be careful with this...!)
wm.PartnerMgr.xtn.admin:deleteSelection
Deletes the current selection, that was created with wm.PartnerMgr.xtn.admin:list.
Here is the way this should be used: first invoke wm.PartnerMgr.xtn.admin:list with the
inputs "mode=Update Search" and various search criteria. (For example, to delete all
confirmed transactions from supplier42, which were received before 2003-05-26, set the
following inputs:
mode Update Search
upperTime 2003-05-26 00:00:00
senderFilter supplier42
stateFilter Confirmed
) Afterwards invoke wm.PartnerMgr.xtn.admin:deleteSelection.
wm.PartnerMgr.xtn.archive:create
Allows archiving a certain selection of transactions from the Message Store, while the
Business Connector is running. The transaction’s status information and the message body
are put into a zip file and removed from the Message Store. The resulting zip archive can
later be loaded back into the Business Connector (or into another “display” Business
Connector) using the service using the service wm.PartnerMgr.xtn.archive:restore.
Input Parameters
This key Must specify…
ageInDays All transactions that are older than the given number of days
will be archived, if they also satisfy the remaining criteria. Can
be used instead of the olderThan parameter.
sender, receiver, Search filter which further allow to limit the selection of
msgType (optional) transactions to be archived. The following wildcards can be
state (optional) This filter allows selecting only transactions that are in a
certain status.
targetDirectory Specifies the directory, into which the resulting zip archive
(optional) should be saved. Default value:
<sapbc>\packages\WmPartners\pub\mailbox
zipFileName (optional) A name for the resulting zip archive. Default value:
TransactionArchive_yyyyMMdd_HHmmss.zip
Return values
None.
wm.PartnerMgr.xtn.archive:restore
This service reads the specified zip file and loads the transactions it contains back into the
Message Store. The zip file needs to be in the format created by the create service.
Input Parameters
This key Must specify…
targetDirectory Directory in which the service should look for the zip archive to
(optional) be restored. If none is specified, the service looks in
<sapbc>\packages\WmPartners\pub\mailbox.
deleteZipFile Specifies whether the zip file should be deleted after the
transactions have successfully been imported.
Return values
None.
wm.PartnerMgr.xtn.admin:shrinkStore
Shrinks the two files xtn.log and xtn_audit.log to their current minimum size,
removing space that has formerly been occupied by transactions that have meanwhile been
deleted or archived.
Note: This can only be done, if the BC is currently not processing any transactions!
Input Parameters
None.
Return values
None.
Transport Services
pub.sap.transport.ALE:InboundProcess
Receives an IDoc and forwards it to the Partner Manager.
Input Parameters
This service requires the following input parameters.
Note that this service handles both IDoc versions 2 and 3. The difference between the two
is that, for IDocs version 2 the service looks for IDOC_CONTROL and IDOC_DATA in
the pipeline. For IDocs version 3, it looks for IDOC_CONTROL_REC_40 and
IDOC_DATA_REC_40. Alternatively, it accepts an IDoc object in IDoc library format.
This key Must specify…
Code Meaning
0 Create
1 Execute
2 Rollback
3 Commit
4 Confirm
IDOC_CONTROL Record list (Table) object that contains the control and data
IDOC_DATA tables for the IDoc.
or
or
Return Values
There are no return values.
pub.sap.transport.ALE:OutboundProcess
Sends an IDoc to an SAP server.
It is recommended that you use this service for IDocs rather than invoking
pub.sap.client:createTID and pub.sap.client:invokeTransaction, which performs the same function.
This service does not invoke pub.sap.client:confirmTID.
Input Parameters
This service requires the following input parameters.
Note that this service handles both IDoc versions 2 and 3. The difference between the two
is that, for IDocs version 2 the service looks for IDOC_CONTROL and IDOC_DATA in
the pipeline. For IDocs version 3, it looks for IDOC_CONTROL_REC_40 and
IDOC_DATA_REC_40. Alternatively, it accepts an IDoc object in IDoc library format.
This key Must specify…
server SAP server alias for the SAP server to which you want to
send the IDoc. The alias must match a configured SAP
server alias on the SAP Business Connector Server.
IDOC_CONTROL Record list (Table) object that contains the control and data
IDOC_DATA tables for the IDoc.
or
IDOC_CONTROL_REC_40 The SDATA field is a Values object containing the keys and
IDOC_DATA_REC_40 values form the segment table (the name of the segment
table is specified by the SEGNAM field.)
or
Code Meaning
0 Create
1 Execute
2 Rollback
3 Commit
4 Confirm
Return Values
wm.PartnerMgr.gateway.transport.B2B:InboundProcess
Receives a message from a remote SAP Business Connector Server and forwards it to the
Partner Manager, which determines the Routing Rule to use to route the message based
on the sender, receiver, and message type specified in the input parameters. After
determining the Routing Rule to use, it invokes the Flow Service that processes the
matching Routing Rule.
It is recommended that you use this service as the receiving point when you are connecting two
Business Connectors. The ALE:InboundProcess could also be used, but it has the disadvantage
that it repeats the extraction of the sender/receiver/msgType parameters. These parameters are
already present in the pipeline sent from the originating SAP BC, so they don’t need to be
extracted again.
Input Parameters
This service requires the following input parameters from the Pipeline.
In addition to the parameters specified below, the input parameters must also include the
message to be routed through the Partner Manager. Use a key for the message that the outbound
transport expects.
Return Values
Depending on transaction and invoked outbound service.
wm.PartnerMgr.gateway.transport.B2B:OutboundProcess
Invokes a service on a local or remote SAP Business Connector.
If you want to invoke a service on a remote SAP Business Connector Server, the local SAP
Business Connector Server must have an alias defined for the remote server. For more
information about creating aliases for remote SAP Business Connector servers, refer to the SAP
Business Connector Administration Guide.
Input Parameters
This service requires the following input parameters from the pipeline.
This key Must specify…
Return Values
It returns the result of the service that is invoked.
The last service of this folder (wm.PartnerMgr.gateway.transport.B2B:confirmTID) is only used
internally by the gateway manager. Hands off!
wm.PartnerMgr.gateway.transport.EmailTransport:OutboundProcess
Sends a document via an e-mail message to the specified recipients.
This service is intended to be used only by the Partner Manager to route messages via e-mail
messages. If you want to send information via e-mail outside of the Partner Manager, use the
pub.client:smtp service.
Input Parameters
This service requires the following input parameters from the Values object.
This key Must specify…
Return Values
None.
wm.PartnerMgr.gateway.transport.FTPTransport:OutboundProcess
FTPs a document to an FTP server. The name of the document on the FTP server will
have the format, ftpfile<n>.data, where n is an increasing number that the FTP
transport process generates.
In case there is a $tid in the pipeline, the filename is <tid>.xml. You can overwrite
these default names if required.
This service is intended to be used only by the Partner Manager to route messages via FTP. If
you want to send information via FTP outside of the Partner Manager, use the pub.client:ftp
service.
Input Parameters
This service requires the following input parameters from the Values object.
This key Must specify…
data An IData object that contains the outbound document to
FTP. It contains the following fields:
Return Values
This key Contains…
returncode Return code from the FTP server. This is a three-digit
number that indicates the status of the FTP put command.
pub.sap.transport.RFC:InboundProcess
Receives an inbound RFC or an RFC-XML document that is to be routed through the
Partner Manager. To route an RFC through the Partner Manager, the SAP System must
add the SBCHEADER table to the RFC.
Input Parameters
This service requires one of following input parameters from the Values object.
This key Must specify…
SBCHEADER Array of records (key/value). For information about what to
include in the array of records, refer to “The SBCHEADER
Table” on page 4-25.
0 CREATED
1 EXECUTED
2 COMMITTED
3 ROLLEDBACK
4 CONFIRMED
Return Values
There are no return values.
pub.sap.transport.RFC:OutboundProcess
Invokes an RFC on an SAP server. This service can handle both RFC and tRFC calls.
Input Parameters
This service requires the following input parameters from the Values object.
0 CREATED
1 EXECUTED
2 COMMITTED
3 ROLLEDBACK
4 CONFIRMED
Return Values
There are no specific return values, but the pipeline contains the result of the invoked
function module (if the call was made synchronously).
pub.sap.transport.XML:InboundProcess
Can be called (e.g. using HTTP post) with arbitrary XML documents to pass them on to
the Partner Manager.
Input Parameters
This key Must specify…
Return Values
No specific values in the pipeline.
pub.sap.transport.XML:OutboundProcess
Use this service to post an XML document to a specified URL.
The XML transport is mainly used for posting XML documents to external Web servers.
If you want to communicate with another Business Connector or webMethods'
Integration Server, you can use the B2B transport.
Input Parameters
This service requires the following input parameters from the pipeline.
This key Must specify…
xmldata(optional) An XML document as string, only used if
transportParams/xmlType is "Arbitrary XML".
Return Values
The return values depend on the document that is posted. The return value is an IData
object representation of the response to the posted document.
pub.sap.transport.BAPI:InboundProcess
When posting bXML documents representing a BAPI of a Business Object to this
service, it will take care of passing the document to the Partner Manager.
Input Parameters
This key Must specify…
Return Values
A pipeline representing the response or an exception of the executed BAPI.
pub.sap.transport.BAPI:OutboundProcess
Executes a BAPI in an SAP system. This transport service can handle both asynchronous
and synchronous execution of a BAPI.
Input Parameters
This key Must specify…
server The SAP server alias for the SAP server on which to execute
the BAPI. The alias must match a configured SAP server alias
on the SAP Business Connector Server.
mode Allows restricting the way how the BAPI can be invoked:
• no restrictions: Will be executed as the client
requested
• synchronous only: Only synchronous call is allowed.
If client passes a $tid (indicating an asynchronous
call) an exception is thrown.
• asynchronous only: Only asynchronous call is
allowed. If client does not pass a $tid (indicating a
synchronous call) an exception is thrown.
Return Values
A pipeline representing the response or an exception of the executed BAPI.
XSLT Services
pub.sap.xslt.transformation:XSLTransformation
This service takes as input an XML source, a stylesheet name, and optional global parameters to be
used in the transformation. The service executes the necessary transformations based on the XSL
stylesheet and produces the output plus any output parameters.
Input
This key Must specify…
xmlString - String - The XML string to transform. Required if xmlRecord is not
provided. If both are provided, then only xmlRecord is
used.
inRecordDefName - Name of the record definition to use for parsing the source
String - XML record (xmlRecord). Parsing of the source XML
record is done according to this definition. Exceptions are
thrown when a required field is defined in the record
definition but not found in the source or when the source
XML record contains more than one root. Fields that are
found in the source XML, but not defined in the record
definition are ignored; no error is indicated.
Output
This key Contains…
transformedXmlString - String representing the transformed XML. This is the
String - default result from this transformation. However, if the
input parameter outRecordDefName is provided, then this
will be null.
Note: in order to have access to output parameters, the style sheet must first declare a
namespace for an object that will hold the parameters and define a global parameter
(output) for that object. This object is automatically created by the XSLT engine, so it is
not necessary to explicitly instantiate it and pass it in as an input parameter. To declare
the namespace, in the <xsl:stylesheet ...> instruction, include the following:
xmlns:Output="java://com.sap.xslt.extension.Output"
For XSLT 1.1-compliant stylesheets, the <xsl:script> tag should also be used:
<xsl:script implements-prefix="Output" language="java"
src="java://com.sap.xslt.extension.Output"/>
The object's put method can then be used to store desired output values. When the
XSLT processing is completed, the values stored in this object are put into the
pub.sap.xslt.transformation:clearTemplatesCache
This service removes all style sheets from the style sheets cache.
Input
None
Output
message
pub.sap.xslt.transformation:removeCachedTemplate
This service removes style sheet 'stylesheet' from the style sheets cache.
Input
This key Must specify…
Output
message
Demo Services
sap.demo:handleIDocXMLPost
Submit an IDoc-XML document to the ALE InboundProcess on a Business Connector.
Input Parameters
This key Must specify…
xmlData (String) The XML string of the IDoc document to be sent.
Required.
Return Values
None.
sap.demo:handleRfcXMLPost
Submit an RFC-XML to an SAP system to invoke the associated RFC function.
Input Parameters
This key Must specify…
serverName (String) The SAP server alias of the target SAP system. Required.
xmlData (String) The XML string of the RFC-XML document. Required.
$envelope bXML or RFC-XML, document type used for the post.
Return Values
This key Contains…
xmlData XML document representing the response of the function
module.
Note: This service is designed only for executing function modules that do not require
an explicit commit.
sap.demo:handlebXMLPost
Submits a bXML to an SAP system to invoke the associated BAPI.
Input Parameters
This key Must specify…
serverName The SAP server alias for the SAP server on which execute
the BAPI. The alias must match a configured SAP server
alias on the SAP Business Connector.
xmlData (String) XML document representing a BAPI request in bXML.
mode Allows to choose the way how the BAPI will be invoked:
• sync: synchronous execution
• async: asynchronous execution
• routing: apply routing info contained in the
document
Return Values
This key Contains…
xmlData XML document representing the response of the BAPI.
Note: This service is designed only for executing function modules that do not require
an explicit commit.
sap.demo:writeSAPXMLFile
This service will convert RFCs or IDocs coming from an SAP system to SAP-XML
(IDoc-XML or RFC-XML) and write the result to an output file in the 'sap/pub' directory.
To call it create a routing rule, choose the B2B transport and specify this service or call it
directly.
Input Parameters
None.
Return Values
None.
sap.demo:invokeBAPIReturningbXML
This service is used within handlebXMLPost.
Miscellaneous Services
wm.PartnerMgr.gateway.runtime:confirmTID
This service can be used in scenarios, where an external client sends XML messages to
the Business Connector, which are forwarded to an SAP system via tRFC, and where the
client wants to achieve "transactional behavior" from end to end. The call sequence in this
case should be as follows:
1. The client creates a 24 digit GUID (or calls pub.sap.client:createTID to obtain one
from the SAP system).
2. The client sends the document to one of the InboundProcesses (for example an
IDoc-XML to the pub.sap.transport.ALE:InboundProcess) and passes the TID along
in the header field "X-TID: <tid>". The Routing Rule, which processes this
message in the Business Connector, should have the "Forward ConfirmTID
Event" flag set to true.
3. If and only if the client receives a return code 200 from the SAP BC in step 2, it
calls wm.PartnerMgr.gateway.runtime:confirmTID like this:
GET /invoke/wm.PartnerMgr.gateway.runtime/confirmTID?$tid=<tid> HTTP/1.0
This achieves two things: The state in the Business Connector's Message Store is
set to "Confirmed", and the entry in the receiving SAP system's tRFC check table
(ARFCRSTATE) is cleaned up. This may be important for tRFC performance, if
the SAP system receives large numbers of documents.
4. If the client receives an error return code in step 2 or no response at all, it may
later resubmit the same document (using the same TID) without needing to fear
duplicate processing. Then, after one of the subsequent tries has finally
succeeded, the TID can be confirmed as described in step 3.
Note: if the document is sent another time after the confirmTID has already been executed,
this will lead to a duplicate document! Thus, confirmTID should be called only, if the
client knows, that the document has been processed ok, and if the client will therefore
never resubmit this document again.
Input Parameters
This key Must specify…
$tid The transaction ID
wm.PartnerMgr.xtn.Sweeper:sweepTRX
This service can be used to clean up the Message Store. For example, set it up in the
Scheduler with the following inputs:
Input Parameters
This key Must specify…
onState The state of the transactions to be deleted.
elapsedTime Time in minutes that the transactions have already been in
the given state.
maxTrxCount Maximum number of transactions to be deleted in one
execution of the Service.
sap:releaseSession pub.sap.client:releaseSession
sap.bapi:encode pub.sap.bapi:encode
sap.bapi:decode pub.sap.bapi:decode
sap.bapi.Browser:createTemplate pub.sap.bapi:createTemplate
sap.bapi.transaction:rollback pub.sap.bapi:rollback
sap.bapi.transaction:commit pub.sap.bapi:commit
sap.rfc:encode pub.sap.rfc:encode
sap.rfc:decode pub.sap.rfc:decode
sap.rfc:createTemplate pub.sap.rfc:createTemplate
sap.idoc:encode pub.sap.idoc:encode
sap.idoc:decode pub.sap.idoc:decode
sap.idoc:encodeSDATA pub.sap.idoc:encodeSDATA
sap.idoc:decodeSDATA pub.sap.idoc:decodeSDATA
sap.idoc:transformFlatToHierarchy pub.sap.idoc:transformFlatToHierarchy
sap.idoc:transformHierarchyToFlat pub.sap.idoc:transformHierarchyToFlat
sap.idoc.routing:inbound pub.sap.idoc.routing:inbound
sap.idoc.routing:inboundDefault pub.sap.idoc.routing:inboundDefault
sap.idoc.routing:outbound pub.sap.idoc.routing:outbound
sap.idoc.routing:outboundDefault pub.sap.idoc.routing:outboundDefault
sap.idoc.routing:registerService pub.sap.idoc.routing:registerService
sap.idoc.routing:unregisterService pub.sap.idoc.routing:unregisterService
Appendix F INDEX
A
administrative tasks
defining routing rules, 5-9
deleting routing rules, 5-18
displaying routing rules, 5-16
managing transactions in Message Store, 5-21
updating routing rules, 5-17
ALE (R/3 IDoc) transport, 5-13
ALE transport
create logical system, 7-2
B
B2B Service transport, 5-10
BAPI map outbound, 3-17
browser
post IDoc to an SAP system, 7-7
C
cache, DDIC
description, 10-13
removing function modules, 10-16
viewing contents, 10-13
changing routing rules, 5-17
configuration files, A-2
configure inbound (SAP-to-SAP BC), 4-7
connect to an SAP system, 3-12
connection service, D-2
creating
routing rules, basic procedures, 5-9
D
data dictionary cache. See DDIC cache
DDIC cache
description, 10-13
removing function modules, 10-16
viewing contents, 10-13
debugging IDoc mapping, 7-21
defining
routing rules, 5-9
definitions, 2-6, 3-16
deleting
routing rules, 5-18
transactions, 5-25
demo services, D-57
disabling routing rules, 5-18
displaying
routing rules, 5-17
transactions, 5-22
distribution model, 7-4
documentation
related manuals, 1-2
using effectively, 1-2
E
editing routing rules, 5-17
editing the routing service, 5-18
F
files in SAP package, A-2
Flow Service for routing rule
updating, 5-19
FTP Outbound Service transport, 5-12
updating routing rule flow, 5-20
function module
create, 4-20
example, 4-27
function modules
caching, 10-13
removing from DDIC cache, 10-16
viewing those cached, 10-13
H
how to
delete routing rules, 5-18
disable a routing rule, 5-18
edit routing rules, 5-17
purge the message store periodically, 5-26
view routing rules, 5-17
HTTP POST
IDoc, 7-7
RFC, 3-22
I
IDoc
send to SAP system, 7-7
services, D-17
versions, D-17
XML POST service, D-57
IDOC
mapping to other applications, 7-10
IDoc Java API, 8-2, D-60
L
Listener, 2-6
create, 4-7
test, 4-9, 4-12
lock SAP session, D-3, D-4
log file, A-2
logical system
define, 7-2
M
map inbound RFC, 4-20
MAP operation, in routing service, 5-19
map outbound BAPI, 3-17
map outbound RFC, 3-17
mapping fields from IDOCs, 7-10
Message Store
deleting transactions, 5-25
managing transactions, 5-21
viewing transactions, 5-22
message type value, 5-4
msgType parameter
O
ORDERS IDoc, 7-7
ORDRSP IDoc, 7-7
outbound RFC service, D-6, D-12
overview
Partner Manager, 5-2
routing rules, 5-2
P
Partner Manager
deleting transactions in Message Store, 5-25
managing transactions in Message Store, 5-21
overview, 5-2
processing when no routing rule, 5-15
transports, 5-10
viewing transactions in Message Store, 5-22
partner profile, 7-4
post IDoc from browser, 7-7
POST IDoc-XML, 7-5
POST RFC-XML, 3-22
post-processing service
overview of, 5-7
pre-processing services
description, 5-7
specifying, 5-10
product retrieval sample, 4-21
R
raw post
IDoc-XML, 7-5
RFC-XML, 3-23
receiver parameter
using a wildcard, 5-5
receiver value, 5-4
record definitions, creating for IDOCS, 7-13
request RFC, 3-15
restorePipeline, 7-21
RFC
send to SAP system, 3-22
XML
template, D-15
XML POST service, D-57, D-58
RFC destination
create, 4-2
RFC Listener
create, 4-7
test, 4-9, 4-12
RFC map outbound, 3-17
RFC request, 3-15
routing rule
dynamic routing, 4-25
routing rules
ALE (R/3 IDoc) transport, 5-13
B2B Service transport, 5-10
completing, 5-16
defining, 5-9
deleting, 5-18
disabling, 5-18
editing, 5-17
Email Outbound Service transport, 5-11
Flow Service that processes, 5-6
FTP Outbound Service transport, 5-12
match precedence, 5-5
message type value, 5-4
naming Flow Service that processes, 5-9
overview of, 5-2
post-processing service, 5-7
pre-processing service, 5-7
receiver value, 5-4
sender value, 5-4
specifying transports, 5-10
transports, 5-8
updating Flow Service that processes, 5-19
updating the routing service, 5-18
viewing, 5-17
when not defined, 5-15
XML transport, 5-13, 5-14
routing service
editing, 5-18
MAP operation, 5-19
S
SAP invoke service, D-5
SAP package directory files, A-2
SAP server
test connection, 3-12
savePipeline, 7-21
SBCHEADER table, 4-25
SDATA conversion, D-17
sender parameter
using a wildcard, 5-5
sender value, 5-4
services
demo, D-57
IDoc, D-17
services, creating from BAPIs, 3-16
settings, A-2
structure definitions
caching, 10-13
viewing those cached, 10-13
T
template
RFC-XML, D-15
terminology, 2-6, 3-16
TID confirmation service, D-7
TID creation service, D-7
transactions
deleting, 5-25
managing, 5-21
viewing, 5-22
transactions list, 5-24
transports
ALE (R/3 IDoc), 5-13
B2B Service, 5-10
description, 5-8
Email Outbound Service, 5-11
FTP Outbound Service, 5-12
specifying, 5-10
XML), 5-13, 5-14
tRFC
log, A-2
using, 8-4, 8-8
U
updating
Flow Service that processes routing rule, 5-19
updating routing rules, 5-17
V
Values format-to-XML conversion, D-14, D-26, D-27, D-28, D-29, D-53, D-54
viewing
routing rules, 5-17
transactions, 5-22
W
Web browser
post IDoc to an SAP system, 7-7
wildcards
definition of, 5-5
using as routing criteria, 5-5
X
XML
convert to IDoc, D-25
XML transport, 5-13, 5-14
XRFC Services, D-14