PI Overview1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 185

SAP PI architecture (Dual Stack)

SAP PI works on 2 Engines


ABAP stack
ABAP stack has IE and BPE, basically this stack takes care of major tasks like pipeline
processing, BPM processing etc.
This is the Integration Server and supports multiple administrative tasks and act as core
component.
Overall flow and objects are finally saved in ABAP stack.
ABAP Stack Adapters - IDOC, HTTP and PI.
Java Stack
Java Stack contains adapter engine which has almost all adapters
Java Stack Adapters - File, JDBC, JMS, SOAP, RFC, Mail etc.
It supports frontend administrative tasks, SLD, Runtime Workbench and more
Graphical and Java Mapping, Client tools ESR, ID, RWB, NWA

Understanding the Architecture

Enterprise Services Repository Used for the design and development of Integration
Scenarios.
Integration Directory Used Configure the scenarios using the interfaces defined in
Enterprise Service Repository. At design time to implement the routing logic and define the
communication parameters.
Integration Engine It is used at runtime to process the messages responsible for message
queuing and delivering.
System Landscape Directory This is used at design time to define various systems in the
landscape.
Advanced Adapter Engine This runs on the java stack and provides an environment for
running different adapters.
Business Process Engine Provides runtime environment for executing complex business
processes defined in BPM (Business Process Management).

From Dual Stack to Single Stack
The message processing capabilities of SAP PI started off with the use of dual stack functionalities of the
ABAP and Java installations. An attempt towards single stack (Java only) integration was first made with
the NetWeaver release of 7.1. This was in an attempt to reduce the hardware resources needed, the
internal communication as well as the DB access points and increase message processing performance
by by-passing the integration engine on the ABAP stack to aid local message processing on the adapter
engine.
These new capabilities could only support specific scenarios that do not need any capabilities that
purely reside on the ABAP stack such as certain adapters (i.e. IDoc- and HTTP-adapter) and ccBPM. This
changed the name of the Adapter Engine in the earlier releases to Advanced Adapter Engine (AAE), and
now to Advanced Adapter Engine Extended (AEX).
With the introduction of the AEX, almost all the capabilities that could not be supported initially when
the single stack initiative began are now supported or have been enhanced. This has also paved the way
towards process orchestration, in which the single stack of PI NetWeaver AEX can be co-installed with
BPM/BRM. This invariably supports all the features of dual stack installation in a more flexible and agile
way. Nevertheless, SAP affirmed that further releases of PI NetWeaver will continue to support the dual
stack until 2020 when there will be an extended maintenance of NetWeaver 7.3.




System Landscape Directory

What is SLD?
SLD is the central repository of information about the software and systems in the data
center expressed in a standard schema called the CIM (Common Information Model).
CIM was developed by DMTF (Distributed Management Task Force), an industry
consortium whose aim is to enable management of IT systems in distributed
environments using web standards.
SLD acts as the central information provider for NetWeaver system Landscapes.
Manages platform dependencies and software components.
Facilitates Installations, upgrades as well as transports.
Information provider for SAP XI/PI.
Reasons /Motivation for SLD implementations
Where can I get a consistent and up-to-date overview of SAP software installed in my
landscape?
Where can I get technical information about SAP products regularly updated?
How can I make sure that my central administration tools use the same, up-to date
landscape information?
How can I make sure that the names of Java development objects are unique internally
+ externally although I have several development teams?
Configuration of software development should be maintained centrally including
interdependencies!
Infrastructure data like hosts and ports of back-end systems should be stored
centrally!


Approach:
Provide one central provider of landscape information:

a) Catalog of installable software
All components that can theoretically be installed
b) Component information repository
List of installed software (including technical details)
c) Landscape description

Result:
a) Landscape data is gathered + updated automatically
No manual gathering (from SAP Service Marketplace + every system)
Data stored centrally + consistently (not in Excel sheets, for example)
b) Stored information can act as basis for different tools and services

SLD is a component of SAP NetWeaver and completely implemented with Java technology. Based on
proven industry standards of DMTF (Distributed Management Task Force):
Object-oriented
Extensible
Open:
3rd-party software as SLD data provider
3rd-party software as SLD data consumer

SLD path: configuration of SLD and data suppliers
Access it at http://<hostname>:<HTTP port>/sld




Information Stored in Software Catalog

Provides information about all available SAP software:
a) Available releases
b) Available support package levels
c) Dependencies
d) Provided by SAP
e) Basis for landscape description

Information Stored in SLD: Landscape Description

Provides information about installed systems:
a) Products and components
b) Installed versions and patch levels
c) Timestamp(last update)
d) Can be enriched individually(admin contact, description, )


How Does SLD get Landscape Description: Data?

SAP systems contain data suppliers that collect and send data to SLD:
a) Must be configured once per landscape element
b) After that, they send reliable and up-to-date data automatically:
At system startup
Periodically (batch job)

Information in SLD as foundation for SAP Application





The 3 dimensions of SLD

System Landscapes have three dimensions:
Solution Dimension what software processes are installed
Transport Dimension DEV, QA, PROD
Technical Dimension Tells us what products are installed on which hosts on particular
networks
SLD should capture all three dimensions of the System Landscape.


Catalogs

Two main areas of SLD are: The software catalog and the systems catalog.
The Software Catalog describes the installed products and also their constituent components.
The software catalog is delivered with content about all SAP products. Customers and Partners
can extend this catalog with information about software from other vendors. It describes the
component information, possible combinations and dependencies.
The Systems Catalog describes the systems in the data center from two perspectives: a logical
view (business systems) and a physical view (technical systems). It describes the concrete
implementation of the customer landscape.
Information from the software catalog is used in the ESR to organize development efforts and
Information from the systems catalog is used in the ID to drive the specific configuration of
Integration Scenarios.
SLD Functions

Importing/synchronizing PPMS data as XML file into Master Component Repository at the SAP
site. The Master Component Repository contains the up-to-date information about all SAP
products. This will be published on the Service Market Place and Customers can update their
individual component information. They can also add additional information about the 3
rd
party
products which are in operation into their individual component information.
The Landscape description contains information about all installed products/components at the
Customer site.
Applications and Tools can use information from the SLD as the central information provider.

Products and Software Components


Software products and their versions, SWC and their versions are the basis for the component
information.
Software Component: A SWC is a unit of software delivery that has its own support package
track. (Ex: SAP_HR, SAP_BASIS, etc.)
Product: A software product is composed of one or more software components.
(Ex: SAP R/3)
Product Version: Specifies a particular version of a product.
(Ex: SAP R/3 4.6c, 4.6d, 4.7)
Software Component Version: Represents a particular version of a SWC.
The relationship between a software product and its constituent components is described in the
SLD by an association called a software feature.

A product version consists of multiple software features. These features are implemented by
various SWC or SWC versions
The product SAP R/3 Enterprise has a product version SAP R/3 4.7
Various software components (or versions) fill the features of this software product. These
software components (or versions) are SAP Basis 6.20, SAP HR 4.70, and SAP Enterprise Retail
1.10.
The data for SWC and software products for SAP products is provided by the internal PPMS (SAP
Product and Production Management System).
SAP provides this master data for updating the local component information. The current data
can be added to the SLD using data import.
Defining third party products and software components is easy in SLD, because there are
wizards to guide you through the process.
Technical & Business Systems

Technical Systems are defined in the Systems catalog. Technical System corresponds to the
physical details of the system in which the software is installed.
Types of Technical System
Web AS ABAP
Web AS Java
Standalone Java
Third-Party
A Technical System may have multiple products installed on it.
Business systems are logical senders/receivers that exchange messages by using SAP XI and
these are entered in the SLD (System Landscape Directory)
Technical Systems are the basis for defining Business systems. SLD defines the association
between Technical and Business Systems.
The association between the Technical and Business systems depends upon the type of the TS
(Technical System).
For TS of type Web AS ABAP, each client is a Business System. This is similar to depicting each
client as a Logical system in ALE Configuration.
There are wizards to guide you through the process of creating technical and business systems.
You can launch these wizards from the main screen of the SLD.
SLD and ESR

All design/development work in the ESR (Enterprise Service Repository) is organized by SWC
version. This makes us understand the interfaces logically belong to a SWC and to a particular
version.
Before developments can begin, the SWCVs must be imported from the SLD to the Enterprise
Service Repository.
Additionally when we define integration scenarios in the ESR, the application components that
we assign in the scenario editor are assigned from product versions in the SLD.
Dependencies between SWCVs can be created in the SLD and these dependencies will
automatically be reflected in ESR.
SLD and ID


At configuration time a collaborative process is set up for a specific system landscape. The
configuration data is organized, structured, and saved in the ID (Integration Directory) in the
form of configuration objects.
A Service is used to address a sender/receiver of messages during the configuration time.
It is possible to address a particular Business System as a service.
A business system (BS) is an actual application system in a system landscape.
A business system (service) has information about the inbound/outbound interfaces and the
SWC versions of the business system.
Business system services are used when configuring internal company processes.

Routing Relations
Business
System
Sender Service
Integration Directory

Technical System
System Landscape
Directory
Business
System
Receiver Service
Business
System
Routing Relations in the ID point to the BS which are maintained in the systems catalog in the
SLD, and through appropriate association, to the technical systems.
Transport dependency also can be created in the SLD for the Business Systems defined.


Cache Refresh

The Enterprise Services Repository needs to communicate with the Integration Directory (for the
cache refresh mechanism) and the System Landscape Directory (to obtain physical channel
data).
The Business Systems create in SLD can be imported to ID before configuring the scenarios. Any
changes made to the Business system can leads to re-import the business systems into ID along
with SLD cache refresh.
Configuration data maintained in Integration Directory is replicated to the involved runtime
engines by a cache refresh mechanism.
SXI_CACHE transaction is used to update the runtime cache in the Integration Server.
The update of SLD cache in ESR and ID results to maintain the runtime data like Business
systems, SWCVs, etc. to improve the performance.
SAP NetWeaver Process Integration as SLD Client

Main SLD use cases for SAP NetWeaver PI:
1. SLD provides business system names:
Business systems are logical systems that function as sender or receiver within PI
SLD maps business system name to technical system so that PI can determine the receiver
of a message

2. SLD provides transport targets for content transports of PI:
For each business system, define which business system corresponds to it in other environment
(DEV, TEST, QA, PROD)
If you transport configuration objects, business systems from source environment will be
mapped to target environment during import

3. SLD provides information about software component versions.
4. SLD provides data of PI topology:
Systems and adapter engines for PI end-to-end monitoring
Addresses for transfer of adapter configuration data inside of PI

SAP PI Rely on SLD for following
a) PI caches SLD data
b) SLD access required if you develop or deploy PI transport
c) SLD access required during PI startup: At startup, PI loads SLD data into caches
d) SLD access might also be required during runtime: Such as for unexpected restart of PI system

Topology of SLD

Central Organization: One single SLD for entire customer enterprise network which entails into
Easy setup + low operation effort, No redundancy, consistent foundation but suffers few drawbacks
like High demand on SLD regarding availability and stability, Different user groups(developers,
administrators,) are working within the production SLD, Data of all systems visible/accessible.

Distributed Organization: Several distributed SLDs which have advantages like Availability
improved, Restricted views possible, Environments can be isolated but again this topology also
suffers some Drawbacks Higher operation effort may be Several CIM model updates required or
Possible synchronization
Enterprise Services Repository (ESR)

SAP PI is a middleware used to configure the data transmission from one system to another system.
During these data transformation and transmission process a set of object are created to map source
data to target data and further a set of configuration are done in order to route data from source system
to target system. ESR is workplace where in all objects created for data transformation from source
system to target system and ID is workplace where routing configuration of these data are done.

The Enterprise Services Repository stores the definitions and metadata of enterprise services and
provides an integrated modeling environment for defining enterprise services, data types, and other
design objects for SOA-based business processes in a standards-compliant manner. Using the ES
Repository, you can store all the necessary information for the integration of applications, for example
interfaces, data types, and mapping programs, in a central location.


Enterprise Service Builder ES Builder offers a modeling environment to create various models
in the Enterprise Services Repository (ES Repository). It provides a java based user interface for
designing and developing the data structures and mappings between structures

ESR Objects
Data Type: Data Types are the field element structure of a message .The Data Type is the most
basic entity to define the structure of XML elements. Data Types are based on XSD data types
Message Type: A Message Type is identified by a name and namespace. This becomes a root
element tag in the XML of the message payload.
Service Interface: A Service Interface represents the metadata description of the messages and
operations to be used at runtime. The Service Interface is the highest level representation of
XML metadata.
SAP PI- Mapping
Types of Mapping:
Message Mapping
Represents the mapping of messages
Supported by a graphical mapping editor
Structure and Value Mapping possible
Extensible via Java- User defined functions
XSLT Mapping
Interface descriptions are in XML
Portable
Extensible via Java enhancements
Java Mapping
Can import java archives for complex mapping logic
Uses JAXP for processing XML documents
Java and XSLT mapping runs on J2EE engine of WEB AS
ABAP Mapping
Mapping programs written in ABAP objects
Uses IXML functions to process the XML messages

Operation Mapping
Operation Mappings associate a Message Mapping to an outbound and inbound Service
Interface. This now begins to create the association needed for the Integration Builder to
ultimately route an incoming message to the correct mapping and target system.


Services Registry
Services Registry represents a registry for Web services. Located centrally within a SOA landscape, it
contains information about services provided in that landscape, with references to the services
relevant WSDL metadata and to the locations of the callable service endpoints.
Services Registry enables to discover and retrieve services and to use them in composite
applications.
That means applications make use of data and functions provided as services by underlying
applications and combine these into coherent business scenarios.
Integration Directory (ID)

In the Integration Directory -configure a business process that are modeled and specified in the ES
Repository.
This means the following: set up the business process for a specific system landscape. Here
specify the components that communicate with each other (usually business systems) and other
details of the communication. These other details can include,
For example, routing rules, which determine the receiver a message in a process is to be
forwarded to, or the configuration settings of the adapter used for the connection of non-SAP
protocols or systems
Business Component Used in cross-company processes where the Party cannot be fully
defined. They represent business or technical sub-units
Integration Process As a Business Process defined in the Repository are recipients of messages
(for process step triggering) or can send them, they are considered a Service and modeled here
Business System Business Systems as defined in the SLD (specific application system in the
system landscape) are represented here in the Directory
Business Service - We are created in Integration Directory.
Collaboration Agreements
Collaboration Agreements define the technical details for message processing (ex. Adapter
configuration) and security settings for sender / receiver partners. The primary building blocks are
Sender Agreements and Receiver Agreements
Sender Agreement: A Sender Agreement is used to transform an incoming message so it can be
processed by the Integration Engine. This allows the Integration to understand the protocol of
the incoming message (via the associated Channel) to processes it as needed
Receiver Agreement: A Receiver Agreement is used to transform an outgoing message so it can
be processed by the receiver. It is here the sender service is linked to a unique receiver
Communication Component / inbound Service Interface via communication channel
Logical Routing
Logical Routing relates the previously defined Service Interfaces in the Repository to potential
receivers and ultimately which Service Interfaces are specifically shared between partners. As seen
in the Roadmap, the primary building blocks are Interface Determination and Receiver
Determination
Interface Determination: An Interface Determination allows the association of an outbound
Service Interface from a sender to one or more inbound Service Interfaces of a single receiver
(and the related Operation Mapping).
Receiver Determination: Receiver Determination will link all available recipients of an outbound
Service Interface from a unique sender Service, the Interface Determination focuses on a single
sender / receiver pair for that same outbound Service Interface and all the related inbound





Interface Flow in SAP PI



Runtime Workbench (RWB)

The central monitoring of SAP Exchange Infrastructure (XI) offers you the option of executing
various monitoring activities. Primarily, you use the Runtime Workbench, the central tool for
accessing XI monitoring.
The Runtime Workbench gives you the option of navigating to the monitoring functions of the
Integration Engine, as well as integration with the Computing Center Management System
(CCMS), and the Process Monitoring Infrastructure (PMI) of SAP


Component Monitoring
In component monitoring the following engines will be displayed
Integration Engine
Business process engine
Mapping Program
Adapter Engine
Testing an interface using Runtime Workbench in PI (Integration engine)
Runtime Workbench (RWB) is used as a quick test tool for sending the payload directly to Integration
Engine in SAP PI.
Step 1. Get the payload in XML format as expected by Integration Engine. This can be the
payload from SXMB_MONI for an already tested scenario.
Step 2. Log on to PI Runtime Workbench (RWB) Click on Display button under Component
Monitoring as shown below.


Step 3. Click on Integration Engine.

Step 4. Click on Test Message as shown below.

Step 5. Provide Sender Service Name, Interface Name and Interface Namespace.
Select the Quality of Service (QoS) as applicable.
Paste the Payload to be sent.
Provide User Details and Click on Send.

And you can see the status as shown below.

Communication Channel Monitoring (Adapter Engine)
Go to Component Monitoring and click on Adapter Engine

Now click on Communication channel monitoring as shown in below


Now filter the existing channel s using the status of the channels by selecting the status type
present the status option

By selecting any of the option we can get the list of channels as follows


Message Monitoring
Go to Message monitoring tab and select the engine
i.e. Adapter engine or Integration engine

Filter the messages according to the requirement and based on the sender / receiver
components

Filter the message based on the status

Message details in message monitoring
To see the detailed information about the message, select the radio button for the message and
choose details
To view the individual versions of the message (as in transaction SXI_MONITOR ) choose
message content



PIPELINE Steps


Pipeline is the term used to refer to all steps that are performed during the processing of an XML
message.
A pipeline represents a fixed processing run for particular XML messages and differs from other
pipelines depending on the configuration of the Integration Engine. There are pipelines for a local
Integration Engine in the sender or receiver system, or for a central Integration Engine that is
configured as the Integration Server, for example.
The individual processing steps that an XML message must pass through when it is processed are
called pipeline elements. Each pipeline element calls exactly one pipeline service.
Pipeline services provide functions for processing XML messages. They read and can change
inbound XML messages, for example, the mapping or routing. They can also call processing
processes, for example functions to create business data in an SAP component. The service type,
number, and sequence are specified for each pipeline and cannot be changed.
The pipeline services are either part of the Integration Engine itself or originate from other areas of
the SAP Exchange Infrastructure. A pipeline service can be used by more than one pipeline element.




The pipeline consists of 6 steps (for a asynchronous message) that are executed for each new
message arriving

1. Receiver identification

2. Interface determination

(1 and 2 together means logical routing)

3. Message split, only takes place if there are more than one receiver)

4. Message mapping

5. Technical routing through the communication channel

6. Calling the appropriate adapter





Receiver Identification:
Determine which systems should participate in an exchange with the incoming message.

Interface Determination:
For each receiver system determine which interfaces should receive a message.

Message Branch
If multiple receivers are found, XI will instantiate a new message for each receiver.

Message Mapping
Call the mapping program to transform the me Message structure to the receiver format.

Technical Routing:
Bind a specific destination and protocol to the message.

Call Adapter: Send the transformed message to the adapter or proxy
Mapping Messages to Each Other Using
Mapping Objects
Purpose
In the Enterprise Services Repository (ES Repository), interface descriptions of function calls (interfaces) are
saved in XML format. The parameters of these interfaces determine the contents of the messages that are
exchanged between systems (see also: Interface-Based Message Processing).
A mapping refers to the mapping of operations or messages to other operations or messages. You often need
to work with mappings if you need to call functions whose interface at the receiver cannot or must not be
changed, or if the sender and receiver expect data in different ways in their message format.
You can define one or more mappings for an interface pair at design time, and save the mappings in the ES
Repository. At configuration time, you can then select the mapping that corresponds to a given collaborative
scenario. The Integration Engine transforms the message at runtime, in accordance with the saved mapping.
Ideally, no mapping is required. In other words, the sender and receiver interface parameters are identical.
Implementation Considerations
Mappings are an essential part of A2A and B2B scenarios. At design time mappings can be saved in the ES
Repository and then selected for a business process at configuration time (see: Defining Interface
Determinations). The Integration Engine executes the mappings configured in the Integration Directory at
runtime after receiver identification has taken place. If no mapping is required for a connection then the
Integration Engine skips the mapping step.
Features
At design time, you differentiate between the following:
Mapping Programs: Used to implement the mapping.
Operation Mappings: Used to register mapping programs for an interface pair (or a pair of operations for
a service interface). You can also enter multiple mapping-programs that are executed in succession.
Mapping Programs
The Enterprise Services Builder (ES Builder) supports the following:
The development of message mappings using a graphical editor integrated in the ES Builder. Java
classes are generated for use at runtime from a graphical description. You also have the option of
enhancing the standard functions with user-defined functions.
The import of XSLT or Java mappings as an archive:
XSLT (eXtensible Stylesheet Language Transformations)
You use XSLT to convert an XML document to another document. This is achieved by using
XSLT commands to search for tags in the source document and replacing them with other tags
or values in the target document. You can also call a Java method in an XSLT program.
Java program
The message is transferred to a Java program as an inbound stream and can be imported using
any parser (for example, SAX or DOM). The modified message is then transferred to an
outbound stream.
A Java program can also be a help program that in turn is used in another Java program or in
self-defined functions of a message mapping.
If, for example, XSLT mappings already exist or are to be developed using third-party tools, you can
import the mapping programs for use in your A2A or B2B scenario.

Overview
You can define mappings for a source and target operation based on operations from service interfaces and
message types in the ES Repository:

You can also define the corresponding mappings when the source or target operation is an IDoc,
an RFC, or another interface connected by an adapter.

The figure shows that you can reference message types for three different application cases for each
operation.
Request (asynchronous and synchronous communication)
The request is the message that the consumer sends - using an operation in the outbound-service-
interface - to a corresponding operation in the inbound-service-interface.
Response (synchronous communication only)
The response is the direct response that the consumer waits for after the request message has been
sent. The message is sent from the provider (inbound-service-interface) to the consumer (outbound-
service-interface).
Fault (asynchronous and synchronous communication)
Message that is either sent to the consumer (synchronous) or persisted for monitoring (asynchronous) if
an error occurs at the provider.
The arrows in the figure indicate the direction of message exchange at runtime: In the context of mappings, the
operation that sends a message is also referred to as a source operation, and the operation that receives a
message as a target operation. You can define mapping programs for mapping the message type of a source
operation to the message type of a target operation (depending on the type of operation for the request,
response, and fault message). The Enterprise Services Builder supports the following mapping programs for
this purpose:
Message mappings that you define using a graphical editor in the ES Builder. This is used to create a
Java source code for the runtime.
XSLT and Java mappings that you can import into the ES Repository as an archive.
XSLT and ABAP mappings that customers can implement using the ABAP Workbench (see Mapping
Development with the ABAP Workbench).
Essentially it is possible to create or import multiple mapping programs in the ES Repository for the same
message type pair (or the corresponding part of an imported or external interface).
Comparing Mapping Program Types
SAP recommends that you use message mappings. However, in exceptional cases it may be advisable to use
different mapping programs, for example, because you can apply XSLT or Java mapping programs from a
previous integration project.
Note the following regarding the speed at which the mapping program types are executed:
Handwritten Java programs by experienced Java developers are usually quicker than generated Java
source code from message mappings.
Message mappings can cope with significantly larger messages than XSLT. Whether an XSLT program
or a message mapping is quicker depends on the complexity of the mapping. Tests have shown that
even message mappings for larger messages are quicker than the equivalent XSLT mapping programs.
Experience has also shown that Java-based mapping programs are quicker than ABAP-based mapping
programs.
Operation Mappings
When defining mapping programs for request, response, or fault messages, the definition is first separated
from the operations that reference the corresponding message types. You can use the same message type for
multiple operations. The definition of a mapping program therefore remains decoupled from a specific interface
pair that you use later to implement the communication between the sender and receiver. Furthermore,
depending on the type of operation, there can be multiple mapping programs that can be applied for a specific
interface pair.
The operation mapping establishes the connection between operations by means of mapping programs:
An operation mapping specifies the corresponding mapping programs for request, response, or fault
messages for a selected pair of operations. You register mapping programs at design time by using an
operation mapping. In this respect, an RFC or IDoc is on the same level as an operation (more
information: Interfaces, Operations, and Message Types).
You can also specify multiple mapping programs to be executed one after the other in the case of
requests and responses for an operation mapping.
You can also define multiple operation mappings for the same pair of operations, to provide multiple variants in
the ES Repository. At configuration time, the customer or the consultant only accesses the operation mappings
and not the individual mapping programs. This reduces the configuration effort for an interface
determination in the Integration Directory.
Structure and Value Mapping
There are two types of mappings, regardless of the mapping technology that you use:
Structure mappings where the structure of an XML document is mapped to the structure of another XML
document.
Value mappings where the values of an XML document are mapped to the values of another XML
document.
Example
In the example below, data about a flight booking is exchanged using XML documents. The XML schema of the
source document provides more hierarchy nodes than the XML schema of the target document. Furthermore,
the target document schema does not use all the information that is provided by the source document schema.
Both structures can be mapped to each other by using a structure mapping.
An example of when a value mapping is required is for the passenger class on a flight. In the source document,
this information is coded by using a string, while in the target document, a decimal value is used. Another
example of a value mapping would be the date format.

Using the ES Builder graphical mapping editor, you can define structure mappings easily using Drag & Drop.
You can then use a function to assign fields to each other from source and target structures that require a value
mapping.





General Functions in the Source and Target Structures
Filter
To increase overall clarity, you have the option of reducing the number of fields displayed in the source structure, target
structure, and test environment to a specified subset. The following table gives you an overview of the possible filter
settings.
Filter Setting Source
Structure
Target
Structure
Test
Environment
Display Fields with Mapping Only X X
Display Fields Without Mapping Only X X
Display Directly Assigned Fields Only X
Display Indirectly Assigned Fields Only X
Display Selected Fields Only X
Display Used Fields Only X
Filter for Selected Fields in Target Structure
To display any number of target fields in the target structure, in the menu bar for the target structure, choose Display
Selection Column ( ).
The mapping editor displays an additional column in which you can select the fields you require. By using the where-
used list (see below), the mapping editor can also select any fields that the where-used list contains.
Differentiating Field Names on the Same Hierarchy Level
The field names of the source and target structure must be unique. The mapping editor supports identical field names on
the same hierarchy level in the following way:
Fields of the source and target structure can be qualified by namespaces
Attributes are differentiated from elements by a proceeding at sign (@) in the mapping editor.
Access Paths for Fields
For fields in the structure overview (on both the Definition and Test tab pages) you can copy the path for a field to the
clipboard by choosing the context menu option Copy Path. This also applies to fields in the data-flow editor.
Recursive Structures
The mapping editor does not fully support the mapping of recursive structures (data types that reference themselves). In
the structure overview, elements of this type are indicated by means of an icon ( ).
Due to their recursive nature, the substructures of these elements can theoretically be infinitely long. It is possible to
map these elements in the mapping editor in a rudimentary fashion by using the context menu to expand a specific
number of subnodes and then use them in target-field mappings.
Where-Used List (Source Structure Fields and Functions)
You can display the fields of the source structure or functions in a where-used list:
Position the cursor on a field to display a quick info that contains information about the target fields this
particular field is assigned to by means of a target-field mapping.
To display a where-used list for a particular field or function, choose Where-Used List in the context
menu. You can navigate directly to the target fields that a particular field or function is assigned to.
If a field or function is used for multiple target fields, you can easily filter it out of the target structure:
1. ...
1. 1. In the menu bar of the target structure, choose Display Selection Column ( ).
2. 2. Call the context menu for a source field or function.
3. 3. In the menu for the where-used list, choose Select All Fields (<Number of Usages>) in
Target Structure.
Special Functions: Target Structure
Navigating to Target-Field Mappings
If a field in the target structure is green or yellow, this indicates that an incomplete target-field mapping already exists.
Double-click a field to display it in the data-flow editor.
Target-Field Mappings for Particular Positions
To define target-field mappings for different positions of a target element that occurs frequently, the context menu for
the target structure has the function Duplicate Subtree (see: Duplicating Subtrees). You have the option of deleting any
duplicates that you create.
Disabling Fields
A mapping is complete when there is a target-field mapping for all obligatory target fields. In cross-system scenarios
where the values for such fields are not entered during mapping, but at a later point in time, this specification is too
restrictive. To disable a target field and all its subnodes, choose Disable Field in the context menu in the structure
overview. The mapping editor shows disabled fields crossed out. The check and the mapping runtime ignore disabled
fields.


Displaying the Status
Icon Types
Icon Meaning

Attribute

Element

Element with maxOccurs = unbounded

Variable
More information: Variables in the Target Structure
Icon Colors
Color Meaning
White Attribute or element not assigned
red Attribute or element must be assigned to complete the mapping
yellow Attribute or element has already been assigned but the corresponding mapping
in the data-flow editor is not complete
green Mapping to target field complete
Furthermore, collapsed target field names in the mapping editor are displayed in red if target field mappings for
subnodes of the marked field name are still missing.

Runtime Procedure
The mapping editor generates Java source code from the graphical description of the message mapping. This section
gives you an overview of how the generated Java source code processes an XML source structure at runtime.
Basics
In the mapping editor you assign the fields of two XML structures to each other. Note that at runtime no target structure
exists prior to the mapping. The target structure is only generated when the mapping is executed.
The message mapping must therefore generate the target structure at runtime. Two things determine how the target
structure looks after it has been generated:
The number and type of tags which exist in the source structure instance
How often the target fields are specified to occur in the target structure
Occurrence
In both cases, this in turn depends on the value for Occurrence that you specified in the type definition in the XSD editor.
The values for are mapped to the XSD attributes minOccursand maxOccurs. You can display these attributes in the
tabular tree view. minOccursspecifies the minimum number of times a tag must occur, while maxOccurs specifies
the maximum number of times a tag may occur. The root node occurrence is minOccurs=maxOccurs=1 in both the
source structure and target structure.

If the occurrence of a tag in the source or target structure is not explicitly specified, the mapping
editor makes this visible to the user. These default values correspond to the XSD specification
(minOccurs=1, maxOccurs=unbounded).
Contexts
XML structures are ordered hierarchically. Therefore, in an XML instance a field is always in a context of the higher-level
field. For example, in the following XML instance the <flat> fields are in the <street> context and the <city>
fields are in the <root> context.
<root>
<city>
<street>
<flat />
</street>
</city>
</root>
Processing Message Mappings
The message mapping processes the source structure and generates the target structure according to the target field
restrictions and according to the target field mappings linked to the target fields. The processing procedure is intuitive
for simple occurring fields. To understand the processing, you need to differentiate between two levels:
Mapping Fields Within a Context
Structure Mappings by Setting the Context





Mapping Fields Within a Context
The way in which a message mapping field maps within a context depends on whether it is a structure field or a value
field. Structure fields are elements with sub-elements that cannot have their own value. Attributes and elements with a
type (leaf nodes in the hierarchy) are value fields.
Mapping Structure Fields
The question of whether or not to generate structure fields depends on how often they occur in the target
structure and whether a target field mapping has been defined for the structure field. The following table
provides an overview of when you have to define target field mappings for structure fields according to the
schema definition of the target structure. The mapping editor shows these fields in red.
Target Field Mappings Required for Structure Fields in the Target Structure
Occurrence Conditions for Generation
n = minOccurs = maxOccurs > 0 Message mapping generates these structure fields automatically
because they have to occur n times in the target structure
independently of the target field mapping. You can nevertheless
assign a target field mapping to such structure fields (for example, by
using the standard function createIf() to select the correct source
structure field from a selection of several).
minOccurs = 0 The structure field is optional. Whether or not it is generated depends
on whether you have assigned a target field mapping to it (for example
a structure field of the source structure). Note the following:
If you assign a target field mapping to the structure field, you
have to do the same for obligatory sub-elements/attributes. If
you do not, the message mapping is incomplete (the mapping
editor indicates this by showing it in red).
If you want to generate optional structure fields it is not
sufficient to generate a target field mapping for sub-
elements/attributes. The message mapping suppresses
optional structure fields (including sub-nodes) without a target
field mapping.
The number of times that optional structure fields are generated is bounded
by maxOccurs and the target field mapping. The same rules apply here as
to value fields (see below).
0 < minOccurs < maxOccurs You have to define a target field mapping for these structure fields.
The number of times that these structure fields are generated depends
on minOccurs, maxOccurs and the target field mapping. The same
rules apply here as to value fields (see below).
For information on how to transfer structures from the source structure into other structures, see Structure Mapping by
Setting the Context.
Occurrence of Value Fields and Structure Fields
Even if a source field in accordance with an XML schema definition is not limited in how often it can occur, it only actually
occurs in the XML document for which the message mapping was executed. The target field attributes minOccurs and
maxOccurs then determine how often it occurs in the target structure. For the purpose of the statements below,
sourceElem is a source structure field and targetElem is a target structure field that is assigned to this field in the
mapping editor (without using functions):
The targetElem tag with minOccurs=<n> occurs a minimum of <n> times in the target structure. If
sourceElem does not occur a sufficient number of times in the source structure, the mapping runtime
throws an exception.
The targetElem tag with maxOccurs=<n> occurs a maximum of <n> times in the target structure. If
sourceElem occurs more frequently in the source structure, values are lost. If it occurs less frequently,
then an equal number of target and source fields are generated.

The mapping runtime ignores default values that are contained in the XSD schema for fields.
Generating Functions
The standard functions of the Constants function category do not have an input value. Therefore, they generate a
value for a target field instead of taking it from a source field. In addition to these functions, all functions (regardless of
whether they are standard or user-defined functions) that do not have input values are referred to as Generating
Functions.
If generating functions are assigned to a target field, the attributes minOccurs and maxOccurs determine how
frequently a value is generated:
If minOccurs = 0 the value of the function is generated once.
Otherwise, the value of the function is generated as often as is specified by minOccurs.

This applies regardless of the value set in maxOccurs. Even if maxOccurs = unbounded, the
mapping runtime will still only generate the value as often as is specified by minOccurs.
If generating functions are assigned to a function, it is the input queue with the most values for the current context that
determines how often the generating function generates a value (see also: Processing an Input Queue).





Structure Mapping by Setting the Context
In the default setting, each field is in the context of the higher-level field.

Fix and Foxy are in the first flat context, Jolly Jumper and Lucky Luke are in the second, and all four are in the first street
context. The first <street> field is in the first city context and so on.
Let us assume that you want to map this structure to the following list to include all those people from the first city and
the first street:
<personList minOccurs=1 maxOccurs=1>
<person minOccurs=0 maxOccurs=unbounded>

The root node (in this case <personList>) always appears exactly once. This is displayed
explicitly in the target structure.
You want to list all four people from the first street context (Fix, Foxy, Lucky Luke, and Jolly Jumper). Define a target field
mapping for <person>:
\personList\person=\root\city\street\flat\person
This XML instance produces the following result:
<personList>
<person> Fix </person>
<person> Foxy </person>
</personList>
It only generates Fix and Foxy from the first flat context. To understand why this is the case, we can look at the
processing:
2. ...
4. 1. The root node <personList> is generated because it is obligatory.
5. 2. The message mapping checks in the <personList> context whether there is a target field
mapping for \personList\personand whether there are values for this in the XML instance.
The mapped \root\city\street\flat\person field is in the first flat context.
6. 3. The message mapping generates fields in the target structure for Fix and Foxy in the first flat
context. Once the first flat context has been processed it is closed along with the
<personList>context in the target structure.
The transformation is completed with the last step because all target structure fields have been processed. The example
shows the following:
The <flat> structure node is implicitly assigned to the <personList> root node during mapping.
<personList> is generated as often as is predefined in the schema, therefore once (see also:
Mapping Fields Within a Context).
The list only includes Fix and Foxy because they are in a different context to Jolly Jumper and Lucky
Luke.
You can set the context individually for each field in the source structure in the Data-Flow Editor context menu. If you set
the <street> context for \root\city\street\flat\person, then prior to the mapping, all <person> fields
are appended to the next highest field, which is <street>. Depending on how you set the context in the source
structure, you will get the following results:
Structure Mappings Using Different Contexts of the <Person> Source Field
Context of
\root\city\street\flat\person
Results list
flat (default setting)
<personList>
<person> Fix </person>
<person> Foxy </person>
</personList>
street <personList>
<person> Fix </person>
<person> Foxy </person>
<person> Jolly Jumper </person>
<person> Lucky Luke </person>
</personList>
city <personList>
<person> Fix </person>
<person> Foxy </person>
<person> Jolly Jumper </person>
<person> Lucky Luke </person>
<person> Asterix </person>
<person> Obelix </person>
</personList>
root <personList>
<person> Fix </person>
<person> Foxy </person>
<person> Jolly Jumper </person>
<person> Lucky Luke </person>
<person> Asterix </person>
<person> Obelix </person>
<person> Valerian </person>
</personList>

The removeContexts() standard function assigns the fields assigned to it to the root node. You
will get the same effect if you assign the root context to this type of field.

The higher-level context of an attribute is the element to which it is assigned. The above
statements relating to fields also apply to attributes.
Technically speaking, the XML instance is imported into the queues before the target field mappings are processed. The
contexts are separated in the queue by a context change. You can address these queues directly in advanced user-
defined functions.





Processing an Input Queue
The message mapping runtime uses queues (see also: Advanced User-Defined Functions):
There is a queue for each field in the source structure.
Standard and user-defined functions process the input queues. The result of a calculation is written to a
results queue.
The results queue for a function can in turn be an input queue for further functions.
Finally, there is also a queue for the target field. The restrictions for the target fields determine which of
the values for the target field queue are written to the target structure.
If you have created an XML instance in the test environment editor, you can display the various queues in the data-flow
editor.
Input Queues of Varying Lengths
If the source structure contains elements with an occurrence value greater than 1, then one context in a queue may
contain multiple values. Provided that the input queues have the same number of values for each context, it is clear how
the function processes the values:

However, in the following example, the input queues for the concat function have a different number of values in the
contexts that belong together. If, as in this case, an input value is missing in a queue, the message mapping runtime
simply uses the last value that it read from the queue in question.

The same applies for generating functions (constants, for example) that only generate one value if they are connected
with a function: If another input queue has more than one value in a context, the mapping runtime simply uses the value
generated by the generating function again.





Standard Functions
General
Values of elements or attributes of the XML message (the payload ) are technically speaking a string. Therefore, all
standard functions that operate on field values expect string arguments and return a string value. Nevertheless,
the transferred value can of course have a different semantic data type, namely, the one that you specified when you
defined the schema for the payload for the field. Standard functions exhibit the following standard behavior:
Depending on the standard function, data type conversions are used to ensure that the values are
transferred in a format suitable for the function (using a cast). If the value cannot be interpreted, the
mapping runtime triggers a Java exception.
If-clauses evaluate conditions that return Boolean values. Standard functions that return Boolean values
return the string true or false. Standard functions that expect Boolean values interpret the values 1
and true (not case-sensitive) as true and all other values as false.

See also: Runtime Behavior
Overview of Functions
Data-flow objects for standard functions are structured as follows:
Most data-flow objects have two or three inbound channels on the left-hand side, and one outbound
channel on the right-hand side.
If-functions are shaped as rhombuses or triangles.
There are also conversion functions with one inbound and outbound channel and functions that return a
value without any input.
Standard functions that require additional specifications are indicated with a star ( ). To call the dialog
for Function Parameters, double-click the data-flow object.
The following figure provides an overview of all the different forms of data-flow objects:

To illustrate how the individual functions are used, the input boxes in the figure above have the variables X, Y, Z or I,
and the result variable is either R or O. All standard functions in the tables below are described using these input and
output variables. In the data-flow editor, other data-flow objects that are connected to the functions using the
connecting boxes either return the input values or receive the result of the operation. You can combine the functions in
any way you require (provided that the values transferred to a function can be interpreted).
Function Category: Arithmetic
You can only enter numerical values for this category (this includes values with digits after the decimal point). If the value
cannot be interpreted as a digit, then the system triggers a Java exception. Otherwise, all calculations are executed with
the precision of the Java data type float. The format of the result value depends on the result:
If the result is a value with digits after the decimal point, these remain unchanged.
Exception: If a zero follows the decimal point, then this is cut off. This means that the result of the
calculation 4.2 0.2 is 4 and not 4.0.
Also note that Java values of type float are converted to the second system before the calculation. The result is
calculated there and then this result is converted back to decimal format. The conversion may result in decimal places in
the dyadic format that are periodically repeated and then automatically cut off. In the decimal system, this can result in
inaccurate results (example: 2.11 + 22.11 = 24.220001). If the number of positions after the decimal point is to be
restricted to two, for example, in the case of values for a currency, you can format the values after the calculation by
using the standard function FormatNum.

If the particular usage case requires more detailed results, you can also select the decimal system as the
basis for the calculations. The Java class BigDecimal is used for internal purposes. For more details see
SAP Note 958486.
Function Name Function
add R = X + Y
subtract R = X - Y
equalsA R = true, if value X equals value Y, otherwise R = false. The values are interpreted
numerically, therefore the value 1.5 is the same as 1.50.
abs O = Absolute value of I
sqrt R is the square root of X
sqr R is the square of X
sign R = 1, when X is a positive number
R = 0, when X equals 0
R = 1, when X is a negative number
neg R = -X
1/x R is the reciprocal of X
power R = X
Y

less true, when X < Y, otherwise false
greater true, when X > Y, otherwise false
multiply R = X * Y
divide R = X / Y
max R = Maximum of values X and Y
min R = Minimum of values X and Y
ceil O = The smallest possible integer value (up to minus 'infinite) that is not smaller than the
argument I. Corresponds to the Java function java.lang.Math.ceil().
floor O = The largest possible integer value that is not larger than the argument I. Corresponds to
the Java function java.lang.Math.floor().
round O = Integer value that is closest to the value of argument I. Corresponds to the Java function
java.lang.Math.round().
counter O = Number of calls for this target-field mapping where you specify the initial value and the
increment of the counter in the function parameters.
FormatNum Converts I according to a pattern that you define using the function parameters. The possible
patterns are the same as in the Java class java.text.DecimalFormat.
Function Category: Boolean
All functions in this category expect Boolean input values (see above).
Function Name Function
And R is true if X and Y have the value true. Otherwise, R is false.
Or R is true if X or Y have the value true. Otherwise, R is false.
Not
O is false if I has the value true
O is true if I has the value false
Equals Compares both Boolean values X and Y and returns true if both are equal, otherwise false.
Non-Boolean values are interpreted as false (see above).
Use the functions equalsS or compare from the Text category to compare strings.
notEquals R = Not(Equals(X,Y))
if
If condition X is fulfilled (returns true): R = Y
If condition X is not fulfilled (returns false): R = Z
ifWithoutElse If condition X is satisfied (returns true): R = Y. Which Else value the function should
return depends on various different factors (see detailed documentation).
Function Category: Constants
Since these functions do not have any input values, they are generating functions.
Function Use
Constant O gets any string constant that you can enter in the dialog for the function parameters.
CopyValue For a frequently occurring element, copies the value at a defined position in the source
structure to the assigned target field.
sender O gets the name of the sender business system. Test_Sender_System is output when you
test the message mapping in the Integration Builder.
receiver O returns the name of the receiver business system. Test_Receiver_System is output
when you test the message mapping in the Integration Builder.
Function Category: Conversions
Function Use
FixValues Executes a value mapping using a fixed value table that you complete using the
function parameters. The table is saved together with the most current message
mapping and can only be used once.
Value mapping Executes a value mapping for the value I entered. In the function parameters,
assign the both input value I and source value O to a representation in the value-
mapping table. In this way, you can assign source and target structure fields to a
representation. You complete the value-mapping table on the configuration
maintenance screen in the Integration Builder. Since these entries are not available
at design time, the mapping result is just an estimate when you test the message
mapping. See also Value Mapping

The runtime interface for value mappings has changed for XI
3.0. However, XI 2.0 message mappings that call the Value
Mapping function still function using the old runtime interface.
To use the function parameters in the new runtime interface,
choose XI 3.0 Interface.
In the function properties for the standard function Value mapping, in the fields
Agency and Schema, enter the key for the source or target value. These values can
have any values. However, you can also refer to the fields SenderParty,
SenderService, ReceiverParty or ReceiverService. The mapping runtime
replaces these values at runtime with the values from the corresponding fields in
the message header of the message for which a value mapping is being executed.

In the field Agency you can also enter the name of a business
system. When transporting value mappings from one
Integration Directory to another, the Integration Builder sees if
you have entered a business system as the agency and
converts it during the transport (see also: Configuring
Groups and Transport Targets).
Function Category: Date
The following functions enable you to define the date format for the source or target format using the dialog for the
function parameters.

The format adheres to the convention as defined in the standard Java class
java.util.SimpleDateFormat. The function parameters dialog provides you with a wizard
that you can use to enter the most frequently used date formats.
Function Use
currentDate Returns the current date using O. This function is a generating function.
DateTrans Converts date format I to another date format O.
DateBefore R = true, when date X comes before date Y, otherwise false
DateAfter R = true, when date X comes after date Y, otherwise false
CompareDates R = 1, when date X is after date Y
R = 0, when date X is the same as date Y
R = -1, when date X is before date Y
Extended Settings
It is not only date formats that are country-specific; the count for weekdays and calendar weeks is also country-specific.
You can specify the relevant conventions for these in the function parameters:
First Weekday
Specifies which day of the week is recorded as the first weekday. In the United States, for example, the
first weekday is Sunday, while in France, it is Monday. The count begins at 1. The mapping runtime sets
this attribute using the Java method setFirstDayOfWeek(). For more information, see the Java
documentation under
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setFirstDayOfWeek(int).
Minimum Number of Days Required in First Week
Specifies how many days the first week of the year must have for it to be considered the first calendar
week. The mapping runtime sets this attribute using the Java method
setMinimalDaysInFirstWeek(). For more information, see the Java documentation under
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setMinimalDaysInFirstWeek(int).
Using the checkbox Calendar Is Lenient, you can control whether invalid dates trigger exceptions or not. If the
checkbox is checked, the mapping runtime permits a date such as February 942, 1996, which is then interpreted as the
941st day after February 1, 1996. An exception is not triggered. The mapping runtime sets this attribute using the Java
method setLenient(). For more information, see the Java documentation under
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setLenient(boolean).
Function Category: Node Functions
Function Use
createIf If there are structuring elements in your target structure that do not exist in the
source structure, insert them using this function. Using condition I you can control
whether the element is inserted or not. You connect the element in the target
structure using O.
removeContexts Removes all higher-level contexts of a source field. In this way, you can delete all
hierarchy levels and generate a list.
replaceValue Replaces the value I with a value that you can define in the dialog for the function
parameters.
exists O = true, if the source field assigned to inbound channel I exists in the XML
instance. Otherwise, false.
SplitByValue Inserts a context change for an element.
collapseContexts Deletes all values from all contexts from the inbound queue except for the first
value. Empty contexts (= ResultList.SUPPRESS) are replaced by empty strings. Only
one queue remains, which consists of contexts that contain just one value each.
Finally, all internal context changes are deleted, so that all values belong to one and
the same context.
useOneAsMany Replicates a value of a field occurring once to pair it as a record with the values of a
field occurring more than once.
sort Sorts all values of the multiply-occurring inbound field I within the existing or set
context. The sorting process is stable (the order of elements that are the same is not
switched) and it sorts the values in O(n*log(n)) steps. Using the function
parameters, you can specify whether values are to be sorted numerically or
lexicographically (case-sensitive or non case-sensitive) and in ascending or
descending order.
sortByKey Like sort, but with two inbound parameters to sort (key/value) pairs. The sort
process can be compared to that of a table with two columns.
Using the first parameter, you pass key values from the first column,
which are used to sort the table. If you have classified the key values
as numeric in the function parameters, they must not be equal to the
constant ResultList.SUPPRESS. See also: The ResultList Object
Using the second parameter, you pass the values from the second
column of the table.
If there is a discrepancy between the number of keys and values, the mapping
runtime triggers an exception. The function returns a queue with the values sorted
according to the keys.
mapWithDefault Replaces empty contexts in the inbound queue with a default value, which you
specify in the function parameters.
Example:
If Default is the default value and
A|B1,B2| |C| |D
is the inbound queue,
mapWithDefault returns the following outbound queue:
A | B1,B2 | Default | C | Default |D.
The function corresponds to the following combination of standard functions:
If(
[]field,
exists([]field),
Constant([value=default]))
formatByExample This function has two inbound queues, which must both have the same number of
values. To generate the result queue, the function takes the values from the first
queue and combines them with the context changes from the second queue.
Function Category: Statistics
The functions of this function category are designed for source fields that occur more than once in the source structure
(maxOccurs = i > 1).
Function Use
sum R = Sum of values X
1
to X
i
of a context.
average R = Average of values X
1
to X
i
of a context
count R = Number of fields in a context (i)
index R = Index i of X
i
. In the function parameters, you specify the following: the
initial value of i, the increment, and whether the index value is to be
reinitialized at the beginning of every new context, or whether it is to have the
same value for the entire source structure.
Function Category: Text

In position specifications, the 0 position corresponds to the first character in the string.
Function Use
substring Returns a substring O for a string I. Use the dialog for the function properties to
specify the position of the substring. Example: substring(Hello, 0,1) = H, means
that the substring from Startindex 0 to Endindex 1 (not including position 1) is
shown.
concat R = Linking of strings X and Y (without blanks).
Example: X = Mrs.; Y = Miller; R = Mrs.Miller. Use the dialog
for the function properties to insert a separator in the string.
equalsS R = true, if string X equals string Y, otherwise R = false.
indexOf
(2 input parameters)
R = first position at which string Y is found in X and 1 if Y does not occur at
all.
indexOf
(3 input parameters)
R = first position from position Z at which string Y is found in X and 1 if Y
does not occur at all.
lastIndexOf
(2 input parameters)
R = last position at which string Y is found in X and 1 if Y does not occur at
all.
lastIndexOf
(3 input parameters)
R = last position from position z at which string Y is found in X and 1 if Y
does not occur at all.
compare Compares string X with string Y:
R = 0, when the strings are equal
R = positive number i, when X is lexicographically larger than Y
R = negative number i, when X is lexicographically smaller than Y
i specifies the difference between the two strings lexicographically.
The function acts in the same way as the compareTo() method of the JDK class
java.lang.String.
replaceString X: String in which something is to be replaced
Y: String to be replaced in X
Z: String to replace Y
R = String in which each occurrence of Y in X is replaced by Z.

X = "sparring with a purple porpoise"
Y = p
Z = t
R = "starring with a turtle tortoise"

length O = Length of string
endsWith R = true when Y is the last string in X; otherwise false.
startsWith
(2 input parameters)
R = true when Y is the first string in X; otherwise false.
startWith
(3 input parameters)
R = true when Y matches X from position Z; otherwise false.
toUpperCase Converts all lower case letters in I to upper case letters.
trim Removes all white space characters (spaces, tabs, returns) at the start and end of a
string. Acts the same as the trim() method of the JDK class java.lang.String.
toLowerCase Converts all upper case letters in I to lower case letters.






Repairing Target-Field Mappings After Structure Changes
Use
For each target-field mapping, the mapping editor remembers the XPath expression that can be used to find a field in the
source or target structure. If the source or target structure changes, existing target-field mappings may become invalid
because the mapping editor can no longer find fields in target-field mappings created prior to the structure change. This
may be the case for the following reasons, for example:
The name of an element has changed
A new hierarchy level has been added to the structure of a data type
A message mapping for a 1:1 transformation is to be enhanced for a m:n transformation (more
information: Multi-Mappings)

A message-mapping target structure looked as follows in a previous release:
<PersonData>
<name>
<familyName>
<gender>
<street>
<city>
<zip>
In the current release, the elements street, city and zip are to be reassigned to a new
element address. The element name was also renamed:
<PersonData>
<firstName>
<familyName>
<gender>
<address>
<street>
<city>
<zip>
The mapping editor only recognizes the old structure for the target-field mappings of street,
city, zip and name that were defined in the previous release. If you do not want to have to
define these target-field mappings again, you must replace the XPath expressions they contain.
In this case, the mapping editor displays a warning for all fields that it can no longer find. To replace the XPath
expressions in the affected target-field mappings, in the mapping editor, choose Reload with Improvements ( ).
Prerequisites
The Reload with Improvements ( ) function is only visible in the mapping editor if at least field used in a target-field
mapping could not be found when the message mapping was opened.
Procedure
3. ...
7. 1. In the ES Builder, open the message mapping that references a changed source or target
message. The mapping editor displays a warning for any fields in target-field mappings that can no
longer be found.
8. 2. Choose Reload with Improvements ( ). The mapping editor opens a dialog box in which
you can replace the XPath expressions in the target-field mappings.
9. 3. The mapping editor displays two XPath expressions in the upper part of the dialog box:
The XPath expression for the field that could not be found
The XPath expression of the next higher-level field
If the new structure has an additional hierarchy level, it may be easier to reset the path of the next
higher-level field in all target-field mappings. By doing so, the path for the lower-level fields will be
automatically correct and you do not then need to replace each one individually.

The following target structure was previously used for a 1:1 transformation:
<PersonName>
<firstName>
<familyName>
Now it is to be used for a 1:n transformation. Consequently, you have changed the occurrence
value for the target message on the Signature tab page from 1 to 0..unbounded. The structure
of the target message now looks as follows:
<messages>
<message1>
<PersonName>
<firstName>
<familyName>
In this case, you simply need to replace the XPath expression /PersonName with
/messages/message1/PersonName in each case. These expressions are then automatically
correct for the lower-level fields firstName and familyName.
Proceed as follows:
If you want to replace the XPath expressions at a later date, choose Skip All.
If none of the XPath expressions displayed can be replaced by an XPath expression in the new
structure, choose Skip.
To reassign one of the XPath expressions displayed, first select it. In the structure that is
displayed, select the field that you want to belong to the XPath expression selected above and
choose Move.
10. 4. If in the last step you have replaced numerous XPath expressions that use the same prefix,
the XPath expressions that have already been replaced are displayed in the lower part of the
mapping editor window.
Result
The target-field mappings for fields whose XPath expressions you successfully reassigned are available again in the
mapping editor. Check that the message mapping still functions with the new assignments.






Mapping Templates
Use
Just like you can reuse data types in different message types, you can also save parts of message mappings as Mapping
Templates and reuse them elsewhere. Once you have saved a mapping template it serves as a copy template that you
can then load into other message mappings and modify to fit your requirements.
The same applies to the mapping templates themselves: You can save parts of mapping templates as mapping templates
and reuse them in mapping templates or message mappings. To simplify the documentation, the text below does not
mention explicitly that the statements made for message mappings are equally valid for mapping templates. However,
you can replace message mapping with mapping template anywhere in this section, and the respective statement is
still valid.
Features
You can define mapping templates for structure mappings of the following structures:
Data Types
Complex types in IDocs and RFCs
Complex types in external definitions
The types that you reference from mapping templates can be located in any software component version.
Activities
Defining Mapping Templates
You can create mapping templates again and load the structures as usual by using input help in the
mapping editor.
You can save mapping templates in a message mapping:
...
1. a. Select a type element in the source and target structure (the element must
reference a non-built-in XSD data type).
2. b. Choose Save Mapping Template from either the target structure context menu
or from the object toolbar.
3. c. Enter a name for the new mapping template and then create it.

Just saving the sub-structures of a message mapping as a mapping template in this way is not
sufficient for the mapping editor to be able reference it (you would normally use the template in
another message mapping). After you have saved the template you then need to load it into the
message mapping (see below).
Apart from multi-mappings, you have all the functions of a normal message mapping available to you for a mapping
template.
Using Mapping Templates
You can use mapping templates in message mappings from any software component version:
4. ...
11. 1. In the mapping editor, select a type element in the source and target structure (the element
must reference a non-built-in XSD data type).
12. 2. Choose Load Mapping Template from either the target structure context menu or from the
object toolbar.
13. 3. If mapping templates are available for the types in the source and target fields, you can select
them in the dialog window that is then displayed.
Displaying Mapping Templates Used
To display all the mapping templates used in a particular message mapping, choose Message Mapping Mapping
Templates Used.






User-Defined Functions
What is UDF?
User Define Function is a Java source code which is generated for the message mapping as a
Java method.

When do we use UDFs
If the standard functions for a target-field mapping do not fulfill your requirements, or if the
graphical representation becomes unclear due to the complexity of the mapping, you have the
option of creating your own user-defined functions. A user-defined function is only visible in
the message mapping in which you created it. You can insert the function in the data-flow editor
by using the function category User-Defined, just like a standard function.

Prerequisites
You have created a message mapping and have loaded an XML structure for both the source
and the target structure.

Types of UDFs

Simple functions, which can process individual field input values for each function call.
Simple functions therefore expect strings as input values and return a string.

Advanced functions, which can process several field input values for each function call.
You can import either all field values of a context or the whole queue for the field in an
array before calling the function.

Advanced User-Defined Functions

Advanced user-defined functions can access more than just individual field values. Instead, you
can import a complete context or an entire queue for a field as an array before your function is
called. This enables you, for example, to perform calculations on all field values of a context as
well as to divide up the contexts themselves further by inserting context changes.

Integration
When the instance for a source structure is parsed, a message mapping works by using
queues.

There is a queue for each hierarchy level. A queue can have the following entries:
Possible Queue Entries
Value Meaning
(empty string) This is a queue for a structure field. In the queue there is an
entry with an empty string each time the field appears in the XML
instance. In the example above there is such a queue for <A
/> and <root />.
(string) Value of a value field
ResultList.CC Constant that shows a context change
ResultList.SUPPRESS Constant that causes a field and its sub node to be ignored
during processing
You can create special structure mappings by adding or removing context changes. The
standard functions SplitByValue and removeContexts() work by this principle.
See also: Structure Mappings by Setting the Context.
Features
Advanced user-defined functions can import either just one context into the input arrays, or
complete queues. Make your selection by selecting or deselecting the Save Entire Queue in
Cache checkbox in the function editor.
Working with Contexts or Queues
Information in Cache Implications
Context Advanced functions that only import one context do not have an
identifiable context change. You can of course insert a context
change into the results list.
Queue Since one or more entire queues are imported in this case, this
option is more memory-intensive and is not suitable for very
large messages.
The input arrays do not contain the context change at the start and end of the context (or of the
queue). These context changes are implicitly always available and cannot be identified or
deleted from the user-defined function.

Activities

...
1. Create an advanced user-defined function, see User-Defined Functions.
2. Process the values from the input arrays in the Java source text and create a results
list by using the ResultList object.

Sample Examples

UDF Execution Type - Context and Queue.
Many a time when we try to write the UDF in mapping, main question arises is, which execution
type we can use? This blog will try to solve this question.
When we create any UDF we can see, three cache execution methods,
1) Value 2) Context 3) Queue.
Value is used to process individual input values of a field for each function call.
Context and Queue are used to process multiple input values of a field for each function call.
Let's see how the concept of Context and Queue is differing from each other.
Following is Source and Target
structure.

Fig.1
Following data is used to test the mapping.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_SendData xmlns:ns0="urn:ltil:firstPI7Job">
<Employee>
<Data>
<Id>10</Id>
<Name>SAP</Name>
</Data>
<Data>
<Id>20</Id>
<Name>SAP</Name>
</Data>
<Data>
<Id>30</Id>
<Name>PI</Name>
</Data>
<Data>
<Id>40</Id>
<Name>XI</Name>
</Data>
<Data>
<Id>50</Id>
<Name>XI</Name>
</Data>
</Employee> // (this will lead to context change)
<Employee>
<Data>
<Id>20</Id>
<Name>SAP</Name>
</Data>
<Data>
<Id>40</Id>
<Name>PI</Name>
</Data>
<Data>
<Id>50</Id>
<Name>PI</Name>
</Data>
</Employee>
</ns0:MT_SendData>
Following is the UDF, which is identifying Context Change node and instead of that send
"DATA" as constant value in a queue.


Fig.2
The UDF having Execution Type Context.


Fig.3
If we use above UDF then according to the udf logic Context Change after value '50' must be
converted into value as "DATA".But as we can see in below Figure the Context Change has
remained as it is. So above UDF is not worked for type =Context.




Fig.4
As per requirement, Employee nodes should be generated equal to Id nodes in source data.
Following is the output with above UDF, in which Employee nodes in target are not generated
sufficiently as per our logic.


Now for same UDF we change Execution Type to Queue.

Fig.5
If we use above UDF then according to the udf logic Context Change after value '50' must be
converted into value as "DATA".And if we see in below figure it is happening.

Fig.6
All nodes of Employee could display here.


Some more examples:
1. Create a Header Node UDF
//Advanced User defined function for setting the header segment on target side.
This functions checks for nonempty payload data to the header node on the target side.
public void createHeaderNode(String[] Row,ResultList result, Container container)
{
if ( Row.length > 0 )
result.addValue("");
}
2. Create a Detail Node UDF
//Advanced User defined function for setting the detail node on target side.
This function loops such that 1 header node and (length-1) detail nodes are created.
public void createDetailNode(String[] Row,ResultList result,Container container)
{
if (Row.length > 1)
{
for (int i = 0; i < Row.length - 1; i++)
result.addValue("");
}
}
2. To Get Queue Values:
3. Advanced UDF to output the queue values. a corresponds to the Data in the incoming
XML.

public void removeHeaderData(String[] a,ResultList result,Container container)
{
for (int i = 1; i < a.length; i++) {
result.addValue(a[i]);
result.addValue(ResultList.CC);
}
}
Filters data using 2 values with OR Condition UDF :
UDF which would filter the string array items of a based on a OR condition specified in the IF
statement, to populate the target field with the array items of b.
a bcorresponds to IDOC Field QUALF.
c,d corresponds to constants
public void filterValue2(String[] a, String[] c,String[] d,ResultList result,Container container)
{
boolean flag = false;
for ( int i =0; i<a.length;i++)
{
if (a[i].equals(c[0]) || a[i].equals(d[0]))
{
result.addValue(b[i]);
flag = true;
break;
}
}
if (flag == false)
result.addValue("");
}
Repeating Last Item UDF :
Advanced UDF which would repeat the last item in the Queue...
public void repeatLast(String[] a,ResultList result,Container container)
{
int i = 0;
for (; i< a.length;i++)
{
result.addValue(a[i]);
}
i = i - 1;
result.addValue(a[i]);
}
simple udf
UDF for Setting up the Decimal format:
Simple udf which would format the input value setting decimal point and padding zeros to the
left of the input value upto the required length.
UDF for Calculating Current Time:
Simple UDF for calculating the current time using the calendar class.
[Refer get Timestamp Function to know about calendar class].

get Time Function returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented
by the Date object..

UDF for Decimal Format Conversion:
Simple UDF to format the given input explicit with 2 decimal places...
public String decimal Format(String input,String dLength,Container container)

Example Scenario:
In the scenario employee details, are collected on the basis of department Id. The Employee Ids
were generated on the basis of employee details and department Id. I have taken a simple file-
to-file scenario to demonstrate this concept. A file, which consists of department Id and
Employee data, is sent to PI and the combination of department Id and Employee details
facilitates the generation of Employee Id.
Before configuring this scenario, I was not able to understand UDF Execution's type context. I
had written a UDF for this scenario and come to know the exact use of UDF Context type. I
would like to share my experience with fellow PI consultants.
Scenario: -
The file is placed on ftp. File adapter picks it up. File contains employee data and department
data. Employees are distributed in different departments. Each department has its own ID.
Based on the department Id, employee Id can be generated. The Employee Id generation logic
is implemented in message mapping of PI. In message mapping I have defined a UDF. It
checks the department Id and generates the Id for each Employee that belongs to the
department.
Below are Source and Target structures.


Fig.1

Following is the sender data file, which contains,
Department: Consist of Department records.
Employee: Consist of Employees records.


Fig.2

As we can see department Id consist of value 10. Hence, we need to send all the Employees
and for each Employee, we have to generate Employee Id as, 1001,1002,1003,1004 etc.
depending upon Department Id.
Department Id 10 has four Employees, so the Employee Id would be generated as
1001,1002,1003 and 1004.
Department Id 20 has three Employees, so the Employee Id would be generated as 2001,2002
and 2003.
For IR part create Data type, Message Type, Service Interfaces, Operation Mapping by normal
method.
Also configure ID part for file-to-file scenario.

When we create any UDF we can see, three cache execution methods,
1) Value.
2) Context.
3) Queue.
Value is used to process individual input values (i.e. like a single variable) of a field for each
function call.
Context and Queue are used to process multiple input values (i.e. like a string array) of a field
for each function call.
Let's see the concept of Context type in UDF.
UDF Logic:
Following is the UDF that contains logic to generate Employee Id.
UDF logic is mainly dependant on Context Change node. Only by Context Change we can
identify how many Employees are there in each Department.
As shown in Fig.4, This UDF requires input.
1. employee: Employee records. (Context of this input is on Department Header)
2. departmentId: Department records.
Importance of Context Change node for this requirement:
There are number of Departments and each Department has number of employees. Therefore
employees can be classified on the basis of their department. Context Change node
distinguishes employees based on their Department.
Working of UDF in case of Context:
Context: When Execution type is Context the Context Change node is not considered as data
node. But it is considered as a separation layer between two Departments. In the UDF, logic is
maintained only for one group of data (e.g. Only Employees under Department Id 10). This logic
automatically gets executed to other groups (e.g. for Employees under Department Id 20)
also.
Comparison between Context and Queue Type:
For Context type the function getEmployeeId (UDF name - Class) is called as many times as
Context Change node occurs in the data. As shown in fig. 5, Context Change node occurs twice
so the function will be call two times.
For Queue type the function getEmployeeId is called only once. Context Change is considered
data node. For detail explanation refer blog no. 12232
E.g.
As we have seen in Fig.2 and Fig.5,
Department no. 10 has four Employees.
Department no. 20 has three Employees.
For this data UDF logic works as follows.
At the beginning of code, Counter for Employee Id is initialized to Department Id.
When Department Id is 10, then 10 is assigned to counter, after applying arithmetical operation
the Counter is initialized to 1000. (10 * 100)
When Department Id is 20, then 20 is assigned to counter, after applying arithmetical operation
the Counter is initialized to 2000. (20 * 100)
Here, only 1
st
element of Department Id is considered from each group. Groups are defined
depending on separation of Context Change node. See the fig.3
In for loop, Counter is incremented and returns the same value for each Employee. This logic is
executed only for 1
st
group of data. As soon as Context Change node is encountered, logic gets
applied to next group of data from the start of UDF.
As we have seen in Fig.2 the first Department, with Dept Id 10, consists of four employees. The
UDF logic executes only for four nodes and generates Employee Id as 1001,1002,1003,1004.
Once the 4
th
Id is generated, context change node is encountered and there is no further
generation of Employee Ids for Dept Id 10.
If any data node is present after the Context Change node then the UDF logic is executed once
again. In our case, data node is there for Department Id 20, so the getEmployeeId function is
called again. The counter gets initialized and produces Employee Id as 2001,2002,2003 for
three employees from Department Id 20.
So the output will look like the one shown in Fig.5
This is possible only if the UDF logic could detect the Context Change node. The context
change node is significant only if the UDF execution type is context.
Lets see the practical example of this.


Fig.3

Execution Type: Context

Fig.4

As you can see the first cluster have 4 values (i.e. 1001, 1002, 1003, 1004). Then there is a
context change and hence the next value is reinitialized to 2001 depending upon Employee Id.
This is possible only if the UDF execution type is context.


Fig.5

Output:


Fig.6

Conclusion:
The context type of the UDF can be used in case if you want to segregate data of one group to
other group. So we can generalize that whenever the context change node has a significant
impact on the UDF logic, context type of UDF can be utilized.





IDOC and RFC
1. How can you check the Idoc metadata IDX2
2. Where message type exchange data is defined in ALE process : Distribution model/BD64
3. Without using distribution model its possible to exchange message type between one
system to another : True
4. BAPI and Idocs both can be used in case of synchronous scenarios : False
5. these are the main transactions are used in the while creating the idocs.

we30:idoc creation
we30:segment creation
we81:message type
we82:link message with idoc type.
we02:to status of idocs.

6. How to reprocess Idocs , transaction codes to be used : We02, BD87
We02 : to edit the errored Idoc
Bd87 : Reprocess the edited corrected Idoc

7. Can we attach more than one messages with One IDOC?
Ans :yes, we can attach more than one message types to one idoc.
For example sendor wants the records on both material and
purchase at same time then we need to add two message types
to one idoc.

8. Suppose their is one sender and we have three receivers.While generating an IDOC will
it generate 3 IDOCs for three receivers? Explain in detail how the flow goes from
outbound to inbound systems?
Ans : in SALE we maintain the Sendor as well as three Receivers
(how many receivers to send the same idoc),
and assign the sendor in sendor system as well as assign
receivers in receivers system(sale-->assignment) three
receivers.

maintain the RFC destination on sendor side and all
receiver side also (sm59).

maintain the port for sendor and three receivers.

maintain the sendor and all receivers for a same message
type in distribution model.(bd64)

maintain the partner profiles for sendor and all receiver
side also (we20).

execute the outbound program(idoc generation)like BD12 for
DEBMAS message type .

check out the status using we02 or we05.

9. When to use Idoc adapter in sender agreements / when do we create sender agreement
for Idoc communication
Ans: Whenever there is multiple Idoc involved in message exchange between two
system then the concept of sender agreement comes for Idoc scenarios .
10. Where Idoc packaging size is defined?
Ans: Idoc packaging size is defined while defining partner profile

11. Transaction code to monitor Idoc in SAP PI?
Ans: We05
12. How do you get output from IDOC?
Data in IDOc is stored in segments; the output from Idoc is obtained by reading the data
stored in its respective segments.
13. Idoc stands for : Intermediate document
14. Idoc is so called because
Ans: a) Message-orientedData is also stored in application, only in other formats (the
application documents).
b) AsynchronousData can be stored in IDocs before an application document is
created.
15. Outbound processing of IDoc includes:
Ans : Posting the application document
Generating the corresponding outbound IDoc
Finding the partner and port
Transfer of the IDoc to the external system via the port
16. Inbound processing includes:
Ans : Receiving IDoc data from an external system via an inbound port
Creating the inbound IDoc
Find the correct processing type via the partner profiles.
Creating the application document
17. IDoc record types include:
Ans: Control record.
Data records which store the application data in segment and describe the hierarchy of
these segments.
Status records which determine the defined processing steps of the IDoc. As a result,
the number of status records for an IDoc increases as processing continues.
18. When Idoc can be duplicated at Outbound processes or Inbound processing? :
Outbound Processing
19. When the IDocs can be deleted?
Ans: When they are achieved.
20. In outbound processing, how Idoc are created?
Ans: In outbound processing, Idocs are always generated by the Idoc Interface or by the
application
21. In inbound processing, how Idocs are created?
Ans: Idocs are always generated by the Idoc interface.

22. What is Process code?
Ans: This process code always identifies a function module for idoc processing.
23. What is partner profile?
Ans: Partner profiles specify which messages are sent to which users, using which method and
how they are processed. Partner must be entered in the partner profile before Idocs can be
sent successfully.
24. What is port in Ale configurations?
Ans: The port is part of the outbound partner profile. Technical communication parameters
are entered in the port definition. Inbound ports do not require such parameterstheir
technical parameters are defined by the external sending system.

25. Where all the Idocs get stored after creation?
Ans: EDIDC stores control/header record.
EDIDD/EDID4 stores data records.
EDIDS stores status records.

26. Where to see idoc in inbound side whether it is received in receiver system or not?
Ans: BDM2: For viewing Sending system Idoc
Number and Corresponding receiving System Idoc number...
Status also you can get from this Tcode.

WE02: note down the Corresponding Idoc number and check

27. Why there is need of receiver Idoc adapter while sender is XI to some SAP backend?
Ans: Sender Communication Channel and sender agreement not required for IDoc, HTTP
adapters. These two adapters reside in ABAP Stack which means in Integration Engine.
The reason is that R/3 can directly send Idocs to XI via ALE layer using RFC destination
specified in SM59. This IDoc after reaching XI is converted in IDoc-XML. This is done
when we specify IDoc metadata IDX2 in XI. It is then used in IR for mapping.

Now for the receiver side, when IDoc-XML is created after mapping program run is sent
to R/3. Before that, it has to
be converted into IDoc. This conversion is IDoc-XML to IDoc is done by IDoc Receiver
adapter.

Both the sender and receiver IDoc transmission is done by the RFC communication
channel.

In case of the sender IDoc, partner profile configuration in the sender system will tell for
a particular IDoc type which port should be used. This port will have the details of the
RFC channel to be used to deliver the IDoc.

However, in case of SAP XI/PI system we don't configure partner profile and hence we
need a way to tell which port & RFC destination should be used to deliver the IDoc and
hence we define a receiver agreements and adapter. This is just used as a reference at
runtime and unlike the other adapter; this receiver IDoc adapter does not process any
message over Adapter engine.
28. What is the name space of an IDOC? (choose the correct answer)
Ans: a) urn:sap-com:document:sap:idoc:messages
b) urn:sap-com:document:idoc:sap:messages
c) urn:sap-com:sap.document:idoc:messages
d) urn:sap-com:document:idoc:messages
29. Which transaction is used to configure a port to retrieve the Idoc Metadata?
Ans: IDX1

30. What adapters dont need Sender Agreement?
Ans: HTTP, IDOC.
31. An Idoc has been sent by a sender system to XI, but the idoc is not received at the XI
system which of these could be true/false
Ans: The destination system from the sender system to XI is not configured correctly.
32. IDOC adapter supports the following QoSs?
Ans: EOIO

33. What is the name space of an RFC? (choose the correct answer)

Ans: urn:sap-com:document:sap:rfc:functions
34. Does EOIO is supported by RFC?
Ans: NO
35. R/3 systems on or below 4.6C can communicate with PI either through RFC or Idoc but
not proxy.
Ans: True
36. IDOC adapter resides within the Integration Server (ABAP)
Ans: True
37. PCK does not support IDOC & Plain Http adapter
Ans: True
38. RFC and IDoc meta data can be modified within XI (True/False)
Ans: False

39. How can the RfcAdapter be started and stopped?
Ans: The RfcAdapter is implemented as a J2EE Service and thus this service has to be
started and stopped. This will affect the whole RfcAdapter and can be done from the
J2EE Engines Visual Administrator. When you are connected to the J2EE Engine chooses
the tab 'Cluster' and opens the appropriate server node in the tree. Then open the
'Services' node. There you can see the entry 'SAP XI Adapter: RFC'. When you open the
context menu on this entry you can start and stop the service

40. Is there a special handling of the '/' character in the names of function modules?
Ans: As the '/' character can cause conflicts within XML documents it is escaped with the
sequence '_-'. A RFC sender channel will do the escaping of '/' to '_-' and a RFC receiver
channel will do the opposite. This only will be done for the RFC-XML document.


41. Can there be multiple function module calls within one transaction for RFC sender
channels?
Ans: RfcAdapter will only support transactions (sometimes also called LUW) with one
call. If an attempt is made to place a second call within one transaction an exception is
raised. This is done because within XI there is no transactional context between
messages and each RFC call is wrapped into one message.

42. Can the RFC-Metadata-Repository be different from the RFC-sender/-receiver channel
in terms of Unicode?
Ans: The RFC-Metadata-Repository has to match the sender/receiver channel in terms
of Unicode. It is not possible to mix a Unicode sender/receiver channel with a non-
Unicode metadata repository (or vice versa).


43. RFC parameters are based on data types that are defined in the Data Dictionary
Ans: True

44. RFC adapter provides support for sRFC, tRFC and qRFC
Ans: False ( it doesnt support qRFC)

45. Following are the Limitation for the RFC Adapter
a) Call-Back, No RFC-GUI-Debug
b) Digital Signatures are not supported
c) Not released for external systems
d) No qRFC
e) All of the above

Ans: All of above

46. File, RFC, JMS, JDBC, MarketPlaces are Technical Adapter
Ans: True
47. Digital signatures are supported in RFC adapter
Ans: False
48. All systems that send an RFC via RFC adapter requires an RFC connection using SM59
Transaction
Ans: True
49. Program Id defined in RFC adapter should be same in RFC destination in transaction
code SM59
Ans: True
50. You can mix Srfc & Trfc at the application level without BPM in case of RFC adapter
Ans: True

51. Why we need to create RFC destination from PI to R/3?
Ans: PI (process integration) itself acts as middleware for creating connection between A2A
OR B2B scenarios. PI provides single point of integration. Actually we need some
interface to send the business documents (data) from SAP to any legacy system and RFC is
nothing but a Remote Function Call is a type of interface that can be called from the legacy
system itself. So we use RFC in SAP system and we pass the data to RFC that would be called
from the Legacy system or PI to get the same data.


PROXY

1. Message Interface is the starting point for proxy generation : True
2. What is created whilst generating an ABAP proxy?
Ans: Class
1. Proxy generation uses which development approach
Ans: Outside in
3. What all the functionalities of a proxy
a) Convert ABAP/Java data structures in to XML messages
b) Convert XML messages in to ABAP/Java data structures
c) Establish Connectivity with the Integration Server
d) All the above
Ans: All of the above
4. Which proxy object is generated for outbound interfaces and what are they called as
Ans: Classes/Client Proxies
5. Which of the following are true about Proxies and Proxy generation?
a) Proxies are created in the system from message types using the proxy generation
functions. : False
b) Proxies are executable interfaces in the application system. : True
c) Java proxies are generated on the application server with transaction SPROXY: False
d) ABAP proxies are generated from the web services description language description
of the interface in integration repository :True
e) Proxy generation converts non-language-specific-interface descriptions in web
services description language into executable interfaces: True
6. Which adapter type stands for proxy communication using the integration engine
Ans: XI adapter
7. ABAP Proxy can be created with SAP Web AS 6.20 greater than or equal to : True
8. ABAP proxies are created in transaction : SPROXY
9. ABAP Proxy Runtime Communicate using XI or Web Services. : True

Configuring the Sender File/FTP Adapter
Use
You need to configure the sender file/FTP adapter to be able to send the content of files to the
Integration Server or the PCK. This only applies to files that are not read-only.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use the Module
tab page in the module processor to specify generic modules, which give the adapter additional
functions.
Condition for Sender Agreement
The adapter determines the payload of the XI message according to how it is configured. However, the
message header information is determined from the corresponding sender agreement for the
communication channel.
The following conditions apply to the adapter for the definition of the sender agreement:
The communication channel defined here must have exactly one sender agreement.
At least the interface name and the sender service must be qualified in the sender agreement. All
other fields are optional in accordance with the general rules for defining sender agreements.
Accessing File Names
If you are developing a module for the sender file/FTP adapter and want to access the file name in the
module, see SAP Note 819761.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type FILE.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
Using FTPS (File Transfer Protocol using SSL/TLS)
The application of FTPS follows specification RFC 4217.
The SAP Java Cryptographic Toolkit is deployed.
The CA certificate used to sign the server certificate must be added to the TrustedCAs keystore view.
Activities
To configure the adapter, specify the following:
Transport Protocol
The file can be selected from either a file system (File System (NFS)) or from a File Transfer Protocol
(FTP) server.
Message Protocol
To send the file content to the Integration Engine or the PCK unaltered, choose File.
If you want to send the Integration Engine or the PCK a text file with complex data structures that
are to be converted into an XML document, choose File Content Conversion and make the
required entries for conversion under Content Conversion Parameters (see below).
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
File Access Parameters
Source Directory
Specify the directory where the files to be processed are located.
You can either specify the entire path name or a name relative to the working directory of the
Adapter Engine. In all platforms (including Windows), use a forward slash (/) to separate directory
names in accordance with Java specification.
File Name
Specify the name of the file that you want to process. The name can contain placeholders (*, ?
(placeholders for exactly one character)) so that you can select a list of files for processing.
Advanced Selection for Source File
If you want to set an exclusion mask for the File Name specified above, or if you want to specify
multiple directories using a file name mask and exclusion mask, set the Advanced Selection for
Source File indicator.
Specify an Exclusion Mask for the file name specified above.

You want to process all files that have the extension '.txt', but want to exclude all files that
begin with the letter 'a'. To do this, enter *.txt for File Name, and a*for Exclusion Mask.
You can enter additional specifications for source directories, file names, and exclusion
masks in the table. This data is processed in addition to the details specified above.
FTP Connection Parameters
Use of the file transfer protocol follows the specification RFC 959. If you have selected the transport
protocol File Transfer Protocol (FTP), enter the following:
Server
Enter the host name or IP address of the FTP server.
Port
Specify the port number of the FTP server. The default is the standard port for the FTP server (21).
Data Connection
Active
In active mode, the server establishes a data connection from its data port, port 20, to an
end point chosen by the client.
Passive
In passive mode, the client establishes a data connection to the port required by the
server.

The default setting is a passive data connection. Only change this setting if you have a
specific reason.
Timeout (secs)
If no data is transferred between the client and the FTP server in the time interval specified here,
the adapter interprets this as an error and terminates the transfer.
Connection Security
None
The FTP protocol is used without encryption.
FTPS (FTP Using SSL/TLS) for Control Connection
The FTP control connection is protected using TLS/SSL (Transport Layer Security (BC-SEC)/Secure Sockets
Layer (BC-SEC)). File transfer is unencrypted.
FTPS (FTP Using SSL/TLS) for Control and Data Connection
All communication with the FTP server is encrypted and uses TLS/SSL.
If you selected FTPSfor Connection Security, then enter the following details:
Command Order
Specifies the sequence of commands used to authenticate and secure the connection.
Retain the default setting. Only adjust the sequence of commands to match those
expected of the FTP server if you encounter problems with the FTP connection. For
information about the correct setting, see the documentation for the FTP server.
Use X.509 Certificate for Client Authentication
Set this indicator if the adapter, in contrast to the FTP server, is to use X.509 certificate and
public-key cryptography to authenticate itself. The corresponding key/certificate pair must
previously be saved in a keystore view of the J2EE server by using the Visual Administrator.
Enter the Keystore and the X.509 Certificate and Private Key. To do this, you can use the
input help.
To logon with the user name anonymous and the password anonymous, set the Anonymous
Login indicator. Otherwise, enter the following:
User Name
Enter a valid user name for the FTP server.
Password with confirmation
Connect Mode
Permanently
An existing connection to the FTP server is used permanently.
The connection is reestablished automatically if it is closed by the server.
Per File Transfer
A new connection to the FTP server is established for each file transfer.
Transfer Mode
Set the FTP connection transfer mode to Textor to Binary.
Processing Parameters
Parameter Entry
Quality of Service Specifies how the Integration Engine/PCK
should process a message.
Best Effort
(synchronous processing)
Exactly Once
(asynchronous processing with
guaranteed execution exactly once)
Exactly Once In Order (asynchronous
processing using queues, in other words
guaranteed execution exactly once and
maintaining the sequence of successive
messages).
Specify the Queue Name.
Poll Interval (secs) Number of seconds that the adapter must wait
if no files are found for processing.
Poll Interval (msecs) Additional waiting time in milliseconds.
If Poll Interval (secs) is set to null, processing
times will be short and close to real time.
If Poll Interval (secs) and Poll Interval (msecs)
are set to null, the adapter is only called once.
Retry Interval (secs) Specify the number of seconds that the
adapter is to wait before a file processed with
errors is processed again.
If the value is set to null, then the adapter is
canceled if an error occurs, even if a value
greater than null is specified for Poll Interval
(secs).

If no value is specified, the value
from Poll Interval (secs) is used.
Processing Mode Archive
Files that have been successfully processed are
moved to an archive directory.
To add a time stamp to a file name,
select the Add Time Stamp indicator.
The time stamp has the format
yyyMMdd-hhMMss-SSS_. The time
stamp ensures that the archived files are
not overwritten and it enables you to
sort them according to the time that
they were received.
Under Archive Directory enter the name
of the archive directory.
If you want to archive the files on the
FTP server, set the Archive Files on FTP
Server indicator. If you do not set the
indicator, the files are archived in the
Adapter Engine file system.
Delete
Successfully processed files are deleted.
Test
Files are not processed.
This mode should only be used to test the
configurations of file/FTP adapters or the
Integration Engine/PCK. It is not suitable for
production operation.
Set to Read-Only
Successfully processed files are given this
attribute. Only recordable files are processed.
This selection is only available for the File
System (NFS) transport protocol.
Process Read-Only Files
(Transport Protocol File System (NFS))
Set the indicator if you want to also transfer
files that are locked by other applications.
Only set this indicator if you are sure that no
data will be lost.
Processing Sequence
(Transport Protocol File System (NFS))
If you used placeholders when specifying the
file name, define the processing sequence of
the files:
The default value is By Name. Files are
processed alphabetically by file name.
If you select By Date, files are
processed according to their time stamp
in the file system, starting with the
oldest file.
File Type Specify the document data type.
Binary
Text
Under File Encoding, specify a code page. The
default setting is to use the system code page
that is specific to the configuration of the
installed operating system. The file content is
converted to the UTF-8 code page before it is
sent.
Permitted values for the code page are the
existing Charsets of the Java runtime.
According to the SUN specification for the Java
runtime, at least the following standard
character sets must be supported:
US-ASCII
Seven-bit ASCII, also known as ISO646-
US, or Basic Latin block of the Unicode
character set
ISO-8859-1
ISO character set for Western European
languages (Latin Alphabet No. 1), also
known as ISO-LATIN-1
UTF-8
8-bit Unicode character format
UTF-16BE
16-bit Unicode character format, big-
endian byte order
UTF-16LE
16-bit Unicode character format, little-
endian byte order
UTF-16
16-bit Unicode character format, byte order

Check which other character sets
are supported in the
documentation for your Java
runtime implementation.

XML text documents generally
contain their own code page
description and should be treated
as Binary data type.
Additional File(s)
(Transport Protocol File System (NFS))
Set the Additional File(s) indicator if you want
to transfer additional files. For more
information, see: Specifying Additional Files.
Adapter-Specific Message Attributes
To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific
Message Attributes indicator.
To apply the following attributes in XI message headers, set the corresponding indicators:
Name Technical Name
File Name FileName
Directory Directory
File Type FileType
File Encoding
You can only set this indicator if the File Type is
text, and if the File Type indicator above is
already set.
FileEncoding
Source File Size SourceFileSize
Source File Timestamp SourceFileTimeStamp
Source FTP Host
You can only set this indicator if the transport
protocol is set to File Transfer Protocol (FTP).
SourceFTPHost
The attribute namespace for the adapter is http://sap.com/xi/XI/System/File.
Run Operating System Command Before/After Message Processing
Command Line
An operating system command specified here is executed before or after the message processing
of a file that was found in a run. The default value is an empty character string (no command).

When the operating system command is called, the file name currently being processed
can be specified with the following placeholders:
%f (file name)
%F (absolute file name including path)
Timeout (secs)
This specifies the maximum runtime of the executing program in seconds. When this time interval
is exceeded, the adapter continues processing. The executing program continues to run in the
background.
Terminate Program After Timeout
Set this indicator if the adapter is to terminate the executing program when the timeout is
exceeded.
The adapter writes the output (STDOUT and STDERR) for the operating system command in the system
trace.

Message processing is independent of any errors that occur during the execution of a
configured operating system command.
Content Conversion Parameters
If you have selected File Content Conversion as the message protocol, you can convert a text file that
contains complex structures into an XML source format in this mode. The file contains various row
formats in logical structures. For more information, see Converting File Content in the Sender Adapter.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Advanced Mode
To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
Msecs to Wait Before Modification Check
Enter the number of milliseconds that the adapter must wait before it checks whether the files have
been changed.
This parameter is not available if you have selected File Content Conversion as the Message Protocol
and then made an entry under Recordsets per Message that splits an input file into several messages.
Table
Specify the additional parameter names and parameter values in the table.

Additional parameters are published in SAP Note 801926.





Specifying Additional Files
File List
If you have selected the transport protocol File System (NFS) and have set the Additional Files(s)
indicator, you can enter the additional files that are to be included in the XI message as attachments.
Enter a name for each additional file in the File List. You can choose any name. Separate the names of
the additional files with a comma (<Additional file1,additional file2, ...,additional fileN>).
The specified names are used as the names of the additional attachments in the XI message and as the
keys of the parameters.
Rules for Additional Files
All additional files must be in the source directory.
The way that the files to be transported are grouped together is defined by the file names. All
file names must be identical except for a defined part (such as the suffix).
Additional files can only be transported unaltered without conversion options.
Messages with additional attachments require a receiver that can process them.
Additional files are located in the message as an attachment under the name assigned in the File
List.

Entries in the table fields are only submitted when you leave the field. Therefore, it is
particularly important to confirm your last entry in the table by choosing Enter before you
save the entries.
Parameters for Additional Files
Name Value
<Additional FileN>.namePart The name of the additional file is determined
from the file name that was assigned for the XI
message under File Name.
Specify which part of the original file name
must be replaced to find the additional files
.txt=.pdf

If, as a result of the configuration, the file
invoice.txt was found, then this specification
means that the system searches for the file
invoice.pdf.
<Additional FileN>.optional YES
The entry is ignored and the message is sent to
the Integration Server/PCK without the system
finding the additional file.
NO
If the file is not found, then processing is
terminated with an error message.
<Additional FileN>.type Specifies the file type of the additional file:
BIN (Binary file)
TXT (Text file)
<Additional FileN>.encoding If the file type of the additional file is TXT (text
file), you can specify the name of the
codepage to be used. The same rules apply as
in the File Type section in Configuring the
Sender File/FTP Adapter.














Converting File Content in a Sender Adapter
If you have selected File Content Conversion as the message protocol, you can convert a text file that
contains complex structures into an XML source format in this mode. The file contains various row
formats in logical structures.
File Structure
The system expects a file with one or more logical structures (recordsets). An unlimited number of
recordsets (either one, multiple, or all recordsets in the file) can be sent to the Integration Server/PCK as
separate messages.
A recordset can contain multiple types of substructures identified by logical names. There can be a fixed
or variable number of substructures in a recordset. The structure of these substructures must be fixed
and corresponds to the description of the row structure logic in the table below. A sub structure must
always be shown in exactly one line of the text document.
The document has the following structure:
<documentName>...
<recordset>
<NameA>
<field-nameA1>field-value</field-nameA1>
<field-nameA2>field-value</field-nameA2>
<field-nameA3>field-value</field-nameA3>
</NameA>
<NameB>
<field-nameB1>column-value</field-nameB1>
<field-nameB2>column-value</field-nameB2>
<field-nameB3>column-value</field-nameB3>
</NameB>
</recordset>
...
<recordset>
...
</recordset>
</documentName>...
Enter the following:
Document Name
Specify the name of the XML document. The document name is inserted in the message
as the main XML tag. This is mandatory for the mapping.
Document Namespace
The namespace is added to the name of the document. This is mandatory for the
mapping.
Document Offset
Specify the number of lines that are to be ignored at the beginning of the document. This
enables you to skip comment lines or column names during processing. If you do not
make an entry, the default value is zero lines.
Recordset Name
Specify the name of the structure: It is included in the XML schema.
Recordset Namespace
The namespace is added to the name of the structure.
Recordset Structure
Enter the sequence and the number of sub structures as follows:
<NameA,nA,NameB,nB,...>. Therefore, nA=1,2,3,... or * (for a variable, unlimited
number, including 0).
Recordset Sequence
The start and end of recordsets containing a variable number and arrangement of
structures are determined as follows:
Ascending: The sequence of the recordset structures is assumed to be unique. A
new recordset is started as soon as an earlier structure occurs.
Variable: The sequence of the recordset structures is assumed not to be fixed. A
new recordset is only started when another structure occurs that is defined with a
fixed number. If all structures are defined as variable the system interprets the
entire document as a single recordset.
Recordsets per Message
Specify the number of recordsets to be grouped together in a message. This specification
is optional. The default value is *. In the default setting, all recordsets are included in a
message.
If the number of recordsets in a document is greater than the number specified, then the
adapter creates multiple messages from a document. The last message might then
contain fewer recordsets than specified.

If you specify Exactly Once as the quality of service (see below), each of these
messages (that is to say, each part of a document from which a message is created)
is sent to the Integration Server/PCK exactly once. This is also true if the application
is interrupted while creating the messages and restarted again later.
Key Field Name
If you specified a variable number of substructures for Recordset Structure, in other
words, at least one substructure has the value *, then the substructures must be
identified by the parser from their content. This means that a key field must be set with
different constants for the substructures. In this case, you must specify a key field and the
field name must occur in all substructures.
Key Field Type
Specify the key field type to be used to compare the predefined values. This entry is used
if the key field name is defined.
Set the parameters for all the specified recordset structures NameA, NameB, and so on in the following
table:
Parameters for Recordset Structures
Parameter Name Description
ignoreRecordsetName
A <Recordset> element is inserted in the XML
structure for each recordset structure. This level is
not always required, particularly if the recordset only
contains one structure definition.
If you set the parameter to true, the <Recordset>
element is not inserted.
NameA.fieldFixedLengths
If you make a specification here, the system expects a
character string that contains the lengths of the
structure columns as arguments separated by
commas.
If you also specify a separator for the columns, you
must not add its length to the length of the columns.

This entry is mandatory if you have not
made an entry for
NameA.fieldSeparator.

NameA.fieldFixedLengthType
Specifies the form in which the entries under
NameA.fieldFixedLengths are counted:
char (default value)
The number of characters is counted.
byte
The byte length of the characters is counted.
NameA.fieldSeparator
If you make a specification here, the system expects
that the structure contains the specified character
string (one or more characters) as a separator
between the individual columns.
If you have not made an entry for fieldFixedLengths,
this is the only specification to identify the individual
columns in a row.
If you made a specification for fieldFixedLengths, the
extra length of the separator is taken into account,
but no further consistency checks are performed.
NameA.enclosureSign
Specify a string that acts as a text delimiter. Text
enclosed by such delimiters is transferred to the
target structure unmodified, although the default
setting is to remove all text delimiters. Separators
within such texts are ignored.
This parameter is optional. The default setting is an
empty value (no text delimiter).
NameA.enclosureSignEnd
If the text delimiters for the beginning and end of the
text are different, specify the text delimiter for the
end of the text here.
If you do not make an entry here, then the entry from
NameA.enclosureSign is used instead.
NameA.enclosureSignEscape
Specify a string that replaces the text delimiter if it
occurs within a text that it delimits.
When the text is transferred the string is replaced by
the value specified in NameA.enclosureSign.
NameA.enclosureSignEndEscape
Specify a string that replaces the text delimiter for
the end of the text if it occurs within a text that it
delimits.
When the text is transferred the string is replaced by
the value specified in NameA.enclosureSignEnd.
NameA.enclosureConversion
Specify YES if the text delimiter is to be
removed when the files are transferred or if
the escape character is to be replaced. This is
the default value.
Enter NO if the character is to be transferred
unaltered.

If you specify xml.enclosureSign= and
xml.enclosureSignEsc=, text enclosed
in quotation marks is transferred
unchanged and the quotation marks are
removed.
If the escape character for a quotation
mark () occurs in the text itself, it is
replaced by the quotation mark during
the transfer.
NameA.endSeparator
If you want to define an additional string as a
separator after the last column in a row, then specify
it here. The system skips this separator when it
processes the last column (otherwise the system
would treat it as part of the last column).
NameA.beginSeparator
If you want to define an additional character string as
a separator before the first column in a row, make a
specification here. The system skips this separator
when it processes this column (otherwise the system
would treat it as part of the first column).
Special Characters in the String for Separators
In all strings for separators
(NameA.fieldSeparator,
NameA.beginSeparator,
NameA.endSeparator), you can specify non-
printable ASCII characters. These characters can
each be inserted individually in the string in the
form 0xHH (including the quotation marks),
where HH represents the character encoded as
a hexadecimal value.
Inserting Strings for Separators in the XML
Document:
The separators specified with
NameA.beginSeparator and
NameA.endSeparator can also be inserted as
fields in the structure of the generated XML
document. To do so, specify field names with
the following specifications:
NameA.addBeginSeparatorAsField=<fieldname>
and/or
NameA.addEndSeparatorAsField=<fieldname>
The strings, together with the specified field
name, are then inserted either at the start or
the end of the structure, as they were specified
in NameA.beginSeparator and
NameA.endSeparator. The definition of special
characters also needs to be included. Special
characters cannot be converted since
characters of this type are not permitted in XML
documents.
NameA.fieldNames
Specify the names of the structure columns: The
input format depends on the following:
If you have specified a value for
NameA.fieldFixedLengths, then a string is
expected containing the names of the file
columns as arguments separated by commas.
This also applies if you have also specified a
value for NameA.columnSeparator.
If you only specify a value for
NameA.fieldSeparator, the system expects a
string containing the names of the file columns
in the same format as the file rows. This means
that the same separator and any additional
strings you specify for NameA.endSeparator
and/or NameA.beginSeparator are expected.
NameA.keyFieldValue
Specify the value of the key field for the structure.
This specification is mandatory if the key field name is
set. Otherwise, the specification is ignored.
NameA.fieldContentFormatting
Specify trim to remove all the leading and
subsequent blanks for a value found. This is the
default.
Specify nothing to ensure that the value
remains unaltered.
NameA.keyFieldInStructure
If the key field of the substructure is to be
added to the XML document, enter add. This is
the default.
If the key field is to be ignored, enter ignore.




Configuring the Receiver File/FTP Adapter
Use
You need to configure the receiver file/FTP adapter to save XML messages from the Integration
Server/PCK in files.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, on the Module tab
page in the module processor, you can specify generic modules, which give the adapter additional
functions.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type FILE.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
Using FTPS (File Transfer Protocol using SSL/TLS)
The application of FTPS follows specification RFC 4217.
The SAP Java Cryptographic Toolkit is deployed. See also: Deploying the SAP Java Cryptographic
Toolkit
The CA certificate used to sign the server certificate must be added to the TrustedCAs keystore view.
See also: Key Storage Service
Activities
To configure the adapter, specify the following:
Transport Protocol
The file can either be put in a file system (File System (NFS)) or on a File Transfer Protocol (FTP) server.
Message Protocol
File
The document sent from the Integration Server/PCK is saved directly as a file.
If you want to convert an XML document to a text file, choose File Content Conversion and make
the required entries for conversion under Content Conversion Parameters (see below).
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
File Access Parameters
Specify the Target Directory in which the documents are to be saved.
You can enter variables for the target directory. The variables must be enclosed by % characters.

/c:/temp/local/%var1%
If the adapter is to create the target directory, if it doesn't already exist then set the indicator
Create Target Directory.
If the indicator is not set and the target directory doesn't already exist the adapter returns an
error.
Specify the File Name Schemethat the system is to use to save the first incoming document.
You can enter variables for the file name scheme. The variables must be enclosed by % characters.
See also Variable Substitution below.
FTP Connection Parameters
Use of the file transfer protocol follows the specification RFC 959. If you have selected the transport
protocol File Transfer Protocol (FTP), enter the following:
Server
Enter the host name or IP address of the FTP server.
Port
Specify the port number of the FTP server. The default is the standard port for the FTP server (21).
Data Connection
You can choose from the following settings:
Active
In active mode, the server establishes a data connection from its data port, port 20, to an
end point chosen by the client.
Passive
In passive mode, the client establishes a data connection to the port required by the
server.

The default setting is a passive data connection. Only change this setting if you have a
specific reason.
Timeout (secs)
If no data is transferred between the client and the FTP server in the time interval specified here,
the adapter interprets this as an error and terminates the transfer.
Connection Security
None
The FTP protocol is used without encryption.
FTPS (FTP Using SSL/TLS) for Control Connection
After the connection is established, the FTP control connection is protected using TLS/SSL (Transport
Layer Security (BC-SEC)/Secure Sockets Layer (BC-SEC)). Data is transferred unencrypted.
FTPS (FTP Using SSL/TLS) for Control and Data Connection
All communication with the FTP server is encrypted and uses TLS/SSL.
If you selected FTPS for Connection Security, then enter the following details:
Command Order
Specifies the sequence of commands used to authenticate and secure the connection.
Retain the default setting. Only adjust the sequence of commands to match those
expected of the FTP server if you encounter problems with the TLS connection. For
information about the correct setting, see the documentation for the FTP server.
Use the X.509 Certificate for Client Authentication
Set this indicator if the adapter, in contrast to the FTP server, is to use X.509 certificate and
public-key encryption to authenticate itself. The corresponding key/certificate pair must
previously be saved in a keystore view of the J2EE server by using the Visual Administrator.
Enter the Keystore and the X.509 Certificate and Private Key. To do this, you can use the
input help.
To logon with the user name anonymous and the password anonymous, set the Anonymous
Login indicator. Otherwise, enter the following:
User Name
Enter a valid user name for the FTP server.
Password with confirmation
Connect Mode
Permanently
An existing connection to the FTP server is used permanently.
The connection is reestablished automatically if it is lost on the server side.
Per File Transfer
A new connection to the FTP server is established for each file transfer.
Transfer Mode
Set the FTP connection transfer mode to Textor to Binary.
Put File
If the file is to be created on the server immediately, select Directly.
If the content is to be gathered in a temporary file first before the final file is put on the server,
choose Use Temporary File.
Processing Parameters
Various options exist for creating the files:
File Construction Mode
Mode Selection
Create The file is created. The document received last
is saved in each case.
Set the Overwrite Existing File indicator if you
want to overwrite the existing file. If you do
not set the indicator, processing is stopped
until the created file is processed.

You can only set the indicator if
you have selected Use
Temporary File under Put File.

Append The file is written when the inbound document
is attached.
Add Time Stamp A new file is created for each document. Each
file is extended with a time stamp with the
format yyyyMMdd-HHmmss-SSS. The time
stamp is added as the last part of the name
before the extension.
This mode guarantees that no file is
overwritten. In this way, files that originate
from the same adapter configuration can be
sorted.
Add Message ID A new file is created for each document. The
file name is extended by the message ID
generated by the Integration Server/PCK. The
ID has the format: xxxxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx.
The message ID is added as the last part of the
name before the extension. This mode
guarantees that no file is overwritten.
Add Counter A new file is created for each document. The
file name is extended with a counter, which is
inserted before the file name extension (for
example, default002.file). This selection is only
available for the File System (NFS) transport
protocol.
Make specifications for Counter Definition:
Prefix
Specify one or more characters that you
want to add before the counter in the
file name.
Format
Specify the first counter to be used. It
must be a valid integer number. Leading
zeros are permitted.
Step
Specify the counter increment.
Mode
Specify when the counter is to be added.
After First File
The counter is added when the
file name is used unaltered for
the first time.
Immediately
The counter is added with the
first document.
Under Write Mode, specify whether the target file is to be written directly in the specified
directory. If an additional step is to be added using a temporary file, choose Use Temporary File.
You can specify a naming schema for the temporary file under Temporary File Name Schema.
This schema is used to determine the prefix and extension of the temporary file; to ensure a
unique file name, a time stamp is also added to the name during processing.

The schema xitemp.tmp, for example, results in the file name xitemp<timestamp>.tmp.
Specify the document file type.
Binary
Text
Under File Encoding, specify a code page. The default setting is to use the system code
page that is specific to the configuration of the installed operating system.
The content of the message is then converted to the corresponding code page before the
message is saved as a file.
Permitted values for the code page are the existing Charsets of the Java runtime. According
to the SUN specification for the Java runtime, at least the following standard character sets
must be supported:
Java Runtime Character Sets
Character Set Description
US-ASCII Seven-bit ASCII, also known as ISO646-US, or
Basic Latin block of the Unicode character set
ISO-8859-1 ISO character set for Western European
languages (Latin Alphabet No. 1), also known
as ISO-LATIN-1
UTF-8 8-bit Unicode character format
UTF-16BE 16-bit Unicode character format, big-endian
byte order
UTF-16LE 16-bit Unicode character format, little-endian
byte order
UTF-16 16-bit Unicode character format, byte order

Check which other character sets are supported in the documentation for your Java
runtime implementation.
Variable Substitution (Target Directory/File Name Scheme)
If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme.
Enter the names of the variables and references in the table.
Enter each variable that you reference in the Target Directory and File Name Scheme fields
without the surrounding percentage sign under Name of Variables in the table.
The variables can refer to attributes of the message header or elements of the message payload.
If the variables are to refer to an attribute of the message header, add the prefix message:
to the name of the variable under Reference. You can specify the following attributes of the
message header:
sender_party, sender_service, receiver_party, receiver_service, interface_name,
interface_namespace,
message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-
cbf10a126331)
message_id_hex (message ID in hexadecimal format, for example
9fbe1ff19a0d11d98665cbf10a126331)
For example, if you want to specify the interface name from the message header in the
target directory or in the file name scheme, enter message:interface_name as the
reference.

If one of the message attributes contains characters that are not permitted in a file name,
for example \, /, :, *, ?, ", <, >, |, then these characters are replaced by an underscore ("_").
If the variable refers to an element in XML schema, add the prefix payload: to the
information under Reference. The reference then comprises a pseudo path description in
the form of a comma-separated list with the schema namea,na,nameb,nb,....
namea,nameb,... corresponds to the element name and na,nb,... corresponds to the
occurrence of the element name at the respective level in the document.
The description begins at the root of the document and ends at the respective element.

To reference the element that is in bold in the example, the following expression is used:
payload:root,1,e1,1,e2,2
The parser searches for the first occurrence of the root element at the first level. It then
searches for the first occurrence of e1 at the second level and for the second occurrence of
e2 at the third level. The content of the last element (Example Value) is set as the value
for a specified variable.

<?xml version="1.0" encoding="UTF-8" ?>
<root>
<dummy>
<e1>
<e2>Data_1</e2>
<f/>
<g attr="abc">text</g>
<e2>Data_2</e2>
</e1>
</dummy>
<e1>
<e2>illegal/value</e2>
<f/>
<g attr="abc">text</g>
<e2 attr="fghij">Example Value</e2>
</e1>
</root>
To disable the check the adapter performs for the element data, set the Disable Security Checks
indicator.
Otherwise, the adapter checks whether the element data contains characters that could lead to
security risks in the file system environment. The check includes the characters /, \, and ...
Adapter-Specific Message Attributes
A configured variable substitution (see above) is performed after the attributes are transferred from the
message header.
To evaluate adapter attributes in the message header of the XI message, set the Use Adapter-
Specific Message Attributes indicator.
If you want missing message attributes to trigger error messages, set the Fail If Adapter-Specific
Message Attributes Missing indicator. If the indicator is set and the header for adapter-specific
message attributes or one of the set attributes is missing from the message, this leads, in
asynchronous cases, to a delivery exception in the audit log of the message. In synchronous cases,
the sender of the message is notified.
If you do not set the indicator, and message attributes are missing, the adapter accesses
information from the adapter configuration.
To evaluate the following attributes in the XI message header, set the corresponding indicators:
Name Technical Name
File Name FileName
Directory Directory
File Type FileType
File Coding
You can only set this indicator if the file type is
text, and if the file type indicator above is
already set.
FileEncoding
Temporary Name Scheme for Target File Name
You can only set this indicator if the target file
is written using a temporary file.
TargetTempFileName
The attribute namespace for the adapter is http://sap.com/xi/XI/System/File.

Run Operating System Command Before/After Message Processing
Command Line
An operating system command specified here is executed before or after a file has been
successfully processed. The default value is an empty character string (no command).

When the operating system command is called, the file name currently being processed
can be specified with the following placeholders:
%f (file name)
%F (absolute file name including path)
Timeout (secs)
This specifies the maximum runtime of the executing program in seconds. When this time interval
is exceeded, the adapter continues processing. The executing program continues to run in the
background.
Terminate Program After Timeout
Set this indicator if the adapter is to terminate the executing program when the timeout is
exceeded.
The adapter writes the output (STDOUT and STDERR) for the operating system command in the system
trace.

Message processing is independent of any errors that occur during the execution of a
configured operating system command.
Content Conversion Parameters
If you have selected File Content Conversion as the message protocol, you can create a text file from an
XML document in this mode. For more information, see File Content Conversion Specifications in the
Receiver Adapter.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Advanced Mode
To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
Specify the parameter names and parameter values in the table.

Additional parameters are published in SAP Note 801926.



Converting File Content in the Receiver Adapter
If you have selected File Content Conversion under Message Protocol, you can convert a table in XML
format to pure text format in this mode. The expected XML structure contains the structure as nodes
filled with any number of elements without additional subnodes.
The expected document structure usually looks like this:
<root>...
<nameA>
<value1>value</value1>
<value2>value</value2>
<value3>value</value3>
</nameA>
<nameB>
<value4>value</value4>
</nameB>
...
</root>...
You can use any element names you like. There can be any number of different substructures under the
root element, which can be mapped to different CSV structures.
File Structure
The specifications described below are used to construct a text file from the XML document.
Recordset Structure
Enter the substructures using the pattern NameA,NameB,....

If you want to convert all substructures using the same parameters, you only have to
specify one structure. The specifications are automatically applied to all substructures.
If you specify more than one structure, the list must contain all the structures occurring in
the document. The list must be complete, otherwise a processing error will be triggered at
runtime.
Set the parameters for all the specified recordset structures NameA, NameB, and so on in the following
table:
Parameters for the Recordset Structure
Parameter Name Meaning
NameA.addHeaderLine Specify whether the text file will have a header line with
column names. The following values are permitted:
0 No header line
1 Header line with column names from the XML
document
2 As for 1, followed by a blank line
3 Header line is stored as NameA.headerLine in the
configuration and is applied
4 As for 3, followed by a blank line

This specification is only permitted if exactly one
structure is defined.
NameA.headerLine Specify the header line that is generated in the text file if
NameA.addHeaderLine has the value 3 or 4. This specification
is mandatory in this case.
NameA.fieldFixedLengths Specify a character string containing a list of fixed column
widths that are separated by commas and determine the
number and the length of columns generated in the text file.
If you do not make any specification for
NameA.fieldSeparator, the specification
NameA.fieldFixedLengths is mandatory.
NameA.fixedLengthTooShortHandling Specify how you want the system to respond when column
widths in the actual document exceed those defined in
NameA.fieldFixedLengths. The following values are
permitted:
Error
Error means that processing of the document is
terminated.
Cut
Cut means that a value is shortened to the maximum
permitted length.
Ignore
Ignore means that the system applies the value
completely, regardless of it being too long. Subsequent
columns are moved correspondingly.
NameA.fieldSeparator If you specify a character string here, it is added as a separator
to all columns except the last. You can also specify this string
in addition to NameA.fieldFixedLengths.
If you made no specification for NameA.fieldFixedLengths,
this is the only specification to identify the individual columns
in a row.
If you made a specification for NameA.fieldFixedLengths, the
length of the separator is not taken into account.

You must specify at least either
NameA.fieldFixedLengths or
NameA.fieldSeparator.
If you have only specified NameA.fieldSeparator, the
structures of the XML document can have differing numbers
of elements that are added to each other separately in the
text file by the value from NameA.fieldSeparator. If you
specify NameA.fieldFixedLengths this is not possible since the
number of columns is defined when the column widths are
given.
NameA.endSeparator If you enter a character string here, the system adds it to the
last column as a closing character. You can also make this
specification in addition to NameA.fieldFixedLengths. To
include a line break following the closing character, you must
explicitly define it by attaching nl (including the quotation
marks) to the string.
The default value is a line break (no explicit separator after
the last column; instead the structures are arranged line-by-
line).
NameA.beginSeparator If you specify a character string here, the system places it
before the first column. You can also make this specification in
addition to NameA.fieldFixedLengths.
The default value is an empty character string (no separator
before the first column).




Special Characters in the String for Separators:
In all strings for separators (NameA.fieldSeparator, NameA.beginSeparator, and
NameA.endSeparator), you can specify non-printable ASCII characters. These characters
can each be inserted individually in the strings in the form 0xHH (including the quotation
marks), where HH represents the character coded as a hexadecimal value. A line break can
be entered using the character nl (including the quotation marks); nl stands for new line.
The special character 0 is not a separator character.


Fixed Column Width of the Text Document:
NameA.absoluteRowWidth=<noOfColumns>
If the separators do not contain any line breaks, the text document is generated as a single
line of text. To restrict the width of the text, use this parameter. <noOfColumns>
represents the maximum number of columns in this case. This parameter also functions
together with the specification of a line break for xml.endSeparator.
This value requires NameA.addHeaderLine=0 to be specified.






Configuring the Sender JDBC Adapter
Use
You need to configure the sender JDBC adapter to be able to send content from databases to the
Integration Server or to the PCK.
Adapter Work Method
You must add an indicator that specifies the processing status of each data record in the
adapter (data record processed/data record not processed) to the database table.
The UPDATE statement must alter exactly those data records that have been selected by the
SELECT statement. You can ensure this is the case by using an identical WHERE clause.
(See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
Processing can only be performed correctly when the isolation level for transaction is set
to repeatable_read or serializable.

SQL statement for query: SELECT * FROM table WHERE processed = 0;
SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
processed is the indicator in the database.

Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, on theModule tab page
in the module processor, you can specify generic modules, which give the adapter additional functions.
Condition for Sender Agreement
The adapter determines the payload of the XI message according to how it is configured. However, the
message header information is determined from the corresponding sender agreement for the
communication channel.
The following conditions apply to the adapter for the definition of the sender agreement:
The communication channel defined here must have exactly one sender agreement.
At least the interface name and the sender service must be qualified in the sender agreement.
All other fields are optional in accordance with the general rules for defining sender agreements.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameterstab page you have selected the adapter type JDBC.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
Activities
Transport Protocol
The transport protocol is JBDC 2.0.
Message Protocol
JDBC
Subsequent versions may permit additional values.
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Connection Tab Page
Database Connection
Specify the following to establish the database connection:

Field Entry
JDBC Driver Java class of the JDBC driver that the JDBC
adapter must load to be able to access the
driver.
The specification varies according to the JDBC
driver; see documentation from the respective
provider.
Connection Address with which you can establish a
database connection using the JDBC driver.
The specification varies according to the JDBC
driver; see documentation from the respective
provider.
User Name User for the database to be read.
Password Password for the database to be read,
including confirmation.
Processing Tab Page
Specify the following processing parameters:

Parameter Entry
Quality of Service Specifies how the Integration Server/PCK
should process a message.
Best Effort
(synchronous processing)
Exactly Once
(asynchronous processing)
Exactly Once In Order
(Asynchronous processing using queues. This
means execution exactly once following the
sequence of successive messages)
Specify the Queue Name.
Poll Interval (secs) Number of seconds that the adapter must wait
if no files are found for processing.
Poll Interval (msecs) Additional waiting time in milliseconds.
If Poll Interval (secs) is set to null, processing
times will be short and close to real time.
If Poll Interval (secs) and Poll Interval
(msecs) are set to null, the adapter is only
called once.
Retry Interval (secs) Number of seconds that the adapter is to wait
before a SQL statement processed with errors
is processed again.

If no value is specified, the value
fromPoll Interval (secs) is taken
instead.
Query SQL Statement You have the following options:
Specify a valid SQL SELECT statement
to select the data to be sent from the
specified database.
Specify an SQL EXECUTE statement to
execute a stored procedure, which
contains exactly one SELECT statement.
The expression must correspond to the SQL
variant supported by the relevant JDBC driver.
It can also contain table JOINs.
Document Name The document name is inserted in the
message as the main XML tag. The default
value isresultset.
Document Namespace The namespace is added to the document
name.

See the example below.

Update SQL Statement You have the following options:
Enter a valid SQL statement that is to
be applied to the database once the
data (determined from the Query SQL
Statement) has been successfully sent to
the Integration Server/PCK.
It must be an INSERT, UPDATE, or
DELETE statement.
In place of the SQL statement, you can
also enter <TEST>. Once the data
determined from Query SQL
Statement has been successfully sent,
the data in the database remains
unaltered.
This is recommended if the data has not
only been read, but also changed by a
stored procedure entered under Query
SQL Statement.
Run Operating System Command
Command Line
Specify an operating system command that is to be executed following successful database
operations.
Timeout (secs)
This specifies the maximum runtime of the executing program in seconds. When this time interval
is exceeded, the adapter continues processing. The executing program continues to run in the
background.
Terminate Program After Timeout
Set this indicator if the adapter is to terminate the executing program when the timeout is
exceeded.
The adapter writes the output (STDOUT and STDERR) for the operating system command in the system
trace.

Message processing is independent of any errors that occur during the execution of a
configured operating system command.
Advanced Tab Page
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Advanced Mode
To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
Transaction Isolation Level
There are different levels of database transactions known as isolation levels. The isolation level
determines how transactions running in parallel influence each other. The options correspond to the
JDBC constants:
Default (default setting of the respective database)
None
read_uncommitted (weakest setting)
read_committed
repeatable_read
serializable (strongest setting)

You must only lower the isolation level where necessary and as far as necessary. To avoid
data inconsistencies in the database when the isolation level is lowered, ensure that
multiple database transactions cannot access the database simultaneously.
Database Auto-Commit-Enabled (No Transaction Handling)
Set the indicator if you want to deactivate the logical unit of work, which the JDBC adapter requires to
guarantee that the data in the database is consistent.
This option is required for JDBC drivers that do not support transactions. To avoid data inconsistencies in
the database when the isolation level is lowered, ensure that multiple database transactions cannot
access the database simultaneously.

Do not set this indicator if the JDBC driver supports transactions, that is, if a corresponding
error message is not displayed in normal operation.
Disconnect from Database After Processing Each Message
Set this indicator if the database connection is to be released and reestablished before every poll
interval.
Remove Empty Tags
Set this indicator if you want to remove the empty tags from the resultset of the sender adapter and
thereby help reduce the size of XML documents.

If this indicator is not set, the resultset looks as follows:
<resultset>
<row>
<column-name1>column-value</ column-name1>
<column-name2></column-name2>
<column-name3>column-value</ column-name3>
<column-name4></column-name4>
</row>
<row>
<column-name1>column-value</ column-name1>
<column-name2></ column-name2>
</row>
</resultset>

If this indicator is set, the resultset looks as follows:
<resultset>
<row>
<column-name1>column-value</ column-name1>
<column-name3>column-value</ column-name3>
</row>
<row>
<column-name1>column-value</ column-name1>
</row>
</resultset>
Table
Specify the parameter names and parameter values in the table.

Additional parameters are published in SAP Note 801367.
Example
The system converts the table resulting from the query SQL statement into a valid XML document and
sends it to the Integration Engine. The document looks like this:
<resultset>
<row>
<column-name1>column-value</ column-name1>
<column-name2>column-value</ column-name2>
<column-name3>column-value</ column-name3>
</row>
<row>
<column-name1>column-value</ column-name1>
<column-name2>column-value</ column-name2>
<column-name3>column-value</ column-name3>
</row>
</resultset>






Configuring the Receiver JDBC Adapter
Use
You need to configure the receiver JDBC adapter to convert XML messages from the Integration Server
or the PCK into database table content.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, on the Module tab page
in the module processor, you can specify generic modules, which give the adapter additional functions.
Prerequisites
...
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type JDBC.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
JBDC 2.0
Message Protocol
XML SQL format
Table values can be inserted, updated, or deleted in one or more tables. In the database, stored
procedures can be called using transfer parameters. In the case of synchronous queries, results
from database queries or return values of stored procedures can also be transferred.
Native SQL String
An arbitrary SQL statement is expected as the message content. This statement is transferred
unaltered to the database for processing.
Depending on the message protocol you selected, the adapter expects special XML document formats in
the message from the Integration Server or the PCK. For more information about the document formats,
see: Document Formats for the Receiver JDBC Adapter.
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Connection Tab Page
Database Connection
Specify the following to establish the database connection:

Field Entry
JDBC Driver Java class of the JDBC driver that the JDBC
adapter must load to be able to access the
driver. The specification varies according to
the JDBC driver; see material from the
respective provider for exact details.
Connection Address with which you can establish a
database connection using the JDBC driver.
The specification varies according to the JDBC
driver; see material from the respective
provider for exact details.
User Name User name for logging on to the database.
Password Password for logging on to the database,
including confirmation.
Processing Tab Page
Maximum Concurrency
Enter the number of messages to be processed in parallel by the receiver channel. For example, if you
enter the value 2, then two messages are processed in parallel. Default value is 1 and this means only
one message can be processed at a time by the receiver channel.
XML Schema Interpreter
Field Entry
Key Tags Mandatory Set the indicator to specify that there must be
conditions in the key tag.
Interpretation of Empty String Values Specify how empty text fields are to be
handled.
NULL value
In the case of INSERT and UPDATE
statements, empty fields are handled
like NULL fields (do not exist) and are
not inserted in the database.
Empty string
In the case of INSERT and UPDATE
statements, empty texts are inserted in
the columns.
Exactly-Once Handling
Persistence Explanation and Further Entries
Local As in the other adapters, Exactly
Oncemessages are handled by default using
status information in the J2EE server. All
adapter error statuses and program
terminations initialized externally are also
handled in this mode.
However, this does not include external
program terminations during a database
commit. In this case, the status of message
processing is unclear since it can only be
changed once the database commit has been
completed.
However, this kind of situation is identified
when the application is started and editing of
the message terminated during processing can
be controlled using Conflict Resolution.
This specification is only effective for handling
errors that occur when a message is being
processed for a second time after initial
processing remained in the unclear status
described above.

Conflict Resolution
Error
If an error occurs when processing
again, this is reported to the caller
system whenError is selected.
Redo
However, if the error occurs because the
message was saved in the database
when it was first processed and it is still
located there, processing can be
completed for the sender system using
the value Repeat(note that the database
interface normally triggers the
error duplicate insert if at least one of
the table fields was defined as a primary
key). Otherwise the sender system will
continue to send the message and the
error will continue to occur.
Database Nevertheless, there is still a gap in exactly
once processing: if there is no primary key
field in the database table or if the data is
already being processed by another
application and it is then deleted, when the
first attempt at message processing is
interrupted by an irregular termination of the
J2EE server immediately after the database
commit, a message can be duplicated.
This problem can only be solved if message
processing and status information
management take place in the same database
so that the processing steps have the same
commit cycle.
In the database where the write-to tables are
located you must create an additional table
with two columns for this purpose. To define
the table, specify the following:
Database Table Name
Specify the name of the table.
Key Column Name
Enter the key in this table column.
Value Column Name
Enter the key value in this table column.
SQL Syntax Parameter
Escape Symbol for Apostrophe
The apostrophe character () is a reserved character in SQL syntax and is therefore replaced by an
escape character if it occurs within value strings. This replacement character can be database-
specific. Typical replacement characters are \ or (default value). If a character occurs that is
invalid for the database being used, the adapter triggers an error message (an SQL exception)
concerning the SQL syntax that is generated by the database.
Column Name Delimiter
Depending on the database being used, column names can be enclosed by a special delimiter
character, for example, if the names can contain special characters (such as ). This character can
be specified at this point. The default setting is no delimiter character. If a character occurs that is
invalid for the database being used, the adapter triggers an error message (an SQL exception)
concerning the SQL syntax that is generated by the database.
Run Operating System Command
Command Line
Specify an operating system command that is to be executed following successful database
operations.
Timeout (secs)
This specifies the maximum runtime of the executing program in seconds. When this time interval
is exceeded, the adapter continues processing. The executing program continues to run in the
background.
Terminate Program After Timeout
Set this indicator if the adapter is to terminate the executing program when the timeout is
exceeded.
The adapter writes the output (STDOUT and STDERR) for the operating system command in the system
trace.

Message processing is independent of any errors that occur during the execution of a
configured operating system command.
Configuring the Receiver IDoc Adapter
Use
You need to configure the receiver IDoc adapter to convert Integration Server contents from IDoc-XML
to native IDoc format and to forward the IDocs to an SAP system or subsystem by using the standard
tRFC IDoc interface. The IDoc control record is completed by the IDoc adapter.
If a sender system expects acknowledgment messages from an IDoc adapter, then you also need to
define a corresponding receiver agreement and a receiver IDoc adapter for this system.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication
channel.
A communication channel with a receiver IDoc adapter can be created automatically for business
systems that are defined in the System Landscape Directory. See also: Creating Communication
Channels Automatically.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type IDoc.
Activities
To configure the adapter, specify the following:
Transport Protocol
IDoc is already specified.
Message Protocol
IDoc is already specified.
Adapter Engine
The Integration Server is already specified.
RFC Destination
Enter the RFC destination of the receiver system.
Segment Version
Specify which segments of the IDoc types are to be sent to the receiver system. Enter a three-figure
reference for the release. Any incorrect entries here will result in a runtime error.
If you leave this field empty, the last version will always be used.

The metadata for Release 6.40 is available. The receiver system must only contain the
segments for Release 3.0A. Enter 30A.
Interface Version
Specify which function module must be called in the receiver system to transfer the data in the relevant
format. Function module calls for both interface versions are placed in the tRFC queue.
You can choose from the following versions of the technical IDoc interface:
SAP Release 3.0/3.1
INBOUND_IDOC_PROCESS
This function module is used for IDoc types with short names (for example, eight characters).
SAP Release 4.0 or Higher
IDOC_INBOUND_ASYNCHRONOUS
This function module is used for IDoc types with long names (for example, 30 characters).
Port
Specify the port that the IDoc adapter uses to receive the IDoc metadata. The port definition uses an
RFC destination to receive the IDoc structure by RFC.
SAP Release
To convert the data from IDoc XML to IDoc format, the receiver IDoc adapter requires the IDoc
metadata. If the IDoc metadata is not available, it will be loaded from the receiver system.
Specify the current release of the receiver system.
Queue Processing
If the function module IDOC_INBOUND_IN_QUEUE is to be used, set the relevant indicator. It is used for
IDocs that are serialized by queues (quality of service is EOIO). This module is only available in SAP Web
AS 6.40 and higher. If it is not available, the function module IDOC_INBOUND_ASYNCHRONOUS is called.
The indicator only takes effect in SAP systems Releases 4.0 and higher. Calls for the queue processing
function module are placed in the qRFC queue.
Apply Control Record Values from Payload
If you set the indicator, the conversion of communication parties to the IDoc partner is only possible for
systems that are not logical systems.
If you do not set the indicator, all combinations of communication parties and services are handled as
services without party.
If the IDoc XML structure contains a control record during outbound processing on the Integration
Server, it is rejected and created again by the IDoc adapter. If you want to include additional values in
the control record, set the indicator and provide an appropriate mapping for the values. See also: Fields
of the IDoc Control Record
Take Sender from Payload
If you want to take the sender of the message from the payload and not from the configuration
information in the Integration Directory, set this indicator.
If you do not set the indicator, the information is taken from the configuration in the Integration
Directory.
Take Receiver from Payload
If you want to take the receiver of the message from the payload and not from the configuration
information in the Integration Directory, set this indicator.
If you do not set the indicator, the information is taken from the configuration in the Integration
Directory.

If you set both of the above indicators, you do not require a heading mapping and do not
need to set the alternative identifiers.
However, you must ensure that the SNDPRN, SNDPRT, RCVPRN, and RCVPRT fields are set
in the IDoc control record.
Setting the senders and receivers of a message from the payload simplifies configuration
and speeds up processing.

If the sender and receiver are not set correctly in the payload, the resulting error is only
visible in the receiving system.
Restoring Original Partners for Acknowledgments
If you set the relevant indicator, the original partners from the IDoc request message are used for
acknowledgments. This means you no longer have to maintain the alternative identifiers (for party
conversion) in the Integration Directory.

Configuring the Sender JMS Adapter
Use
You need to configure the sender JMS adapter to send JMS messages to the Integration Engine or the
PCK.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, on the Module tab page
in themodule processor, you can specify generic modules, which give the adapter additional functions.
Condition for Sender Agreement
The adapter determines the payload of the XI message according to how it is configured. However, the
message header information is determined from the corresponding sender agreement for the
communication channel.
The following conditions apply to the adapter for the definition of the sender agreement:
The communication channel defined here must have exactly one sender agreement.
At least the interface name and the sender service must be qualified in the sender agreement.
All other fields are optional in accordance with the general rules for defining sender agreements.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type JMS.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
SonicMQ JMS Provider
WebSphereMQ (non-JMS)
Access JMS Provider with JNDI
(Read) JMS Provider Administered Objects from File
Access JMS Provider Generically
Message Protocol
JMS 1.x
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Source Tab Page
Depending on the transport protocol you have selected, you make specifications for the respective JMS
provider. See the relevant JMS-provider documentation for details about the individual parameters. See
also:JMS-Provider-Specific Settings
Processing Tab Page
JMS Settings
Parameter Entry
Transaction
al JMS
Session
If you want to use a transactional JMS session, set the indicator. Following processing of a
message, a transactional session ends either with a COMMIT, or in the case of an error,
with a ROLLBACK.
JMS Queue
User
User for accessing the JMS queue
JMS Queue
Password
Password (with confirmation) for accessing the JMS queue
JMS
Message
Selector
You use the JMS message selector to specify conditions that a JMS message in the
specified JMS queue must meet in order to be processed by the sender adapter.

For more information about the JMS message selector,
seejava.sun.com/j2ee/sdk_1.3/techdocs/api/index.htmlunder javax.jms an
d Message.

Correlation Settings
Define which algorithm is to be used to create the message ID of a new XI message. The prerequisite for
selecting an ID is that it is a GUID (globally unique identifier) according to ISO-11578.

If the message ID is not a GUID, message processing will fail. This can cause message
duplicates if the ID is not unique. Furthermore, if the GUID does not conform to ISO-11578,
this can trigger a GUIDFormatException.
Set XI Message ID (MessageID) To:
GUID (Recommended Value)
JMSMessageID (Uniqueness Is JMS-Provider-Dependent)
JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)
JMSProperty (Uniqueness Is JMS-Sender-Dependent)
Enter the JMS Property Name. This value is set for the XI message ID.
If the JMSCorrelationID or JMSProperty are not set in the JMS message, a message ID is generated
automatically.
If you have selected JMSMessageID, JMSCorrelationID, or JMSProperty and entered a JMS
message ID in these fields, you should see the Remove 'ID:' Marker from JMSMessageIDindicator.
Set the indicator.
This is necessary because the JMS specification stipulates that each JMS message ID starts with
'ID'. However, this conflicts with ISO-11578.
Set XI Conversation ID (ConversationID) To:
No value
If you choose this setting, the XI conversation ID is not set.
JMSMessageID (Uniqueness Is JMS-Provider-Dependent)
JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)
JMSProperty (Uniqueness Is JMS-Sender-Dependent)
Enter the JMS Property Name. This value is set for the XI message ID.
Stored JMSCorrelationId of request
The saved JMSCorrelationID of the request is used.
For more information about the ConversationID, see: Parts of an XI Message, under ConversationID and
RefToMessageID.
XI Settings
Parameter Entry
Mapping of Message If you want the JMS payload to contain the
entire message, choose Entire Message = JMS
Payload.
If you only want the JMS payload to contain the
payload of the message, choose Message
Payload = JMS Payload.
Quality of Service Specifies how the Integration Engine/PCK will
process a message.
Exactly Once (asynchronous processing
with guaranteed execution exactly once)
Exactly Once In Order (asynchronous
processing using queues, in other words
guaranteed execution exactly once and
maintaining the sequence of successive
messages).
Specify the Queue ID.
Specify the Processing J2EE Cluster Server
(Cluster ID).
This specification stops queue-jumping in
the JMS queue. The valid cluster ID is
located on the J2EE server
Administrator underServer.

If you do not enter the cluster ID,
the EOIO channel is activated
automatically on a different
working node. This configuration
ensures node failover by the
adapter in a clustered
environment.
Time Period for Duplicate Check for EO(IO)
(secs)
To check for duplicate messages, IDs must be
saved in the database. To prevent the database
from getting unnecessarily large, these IDs
must be deleted after a certain amount of time.
Specify in seconds the time period after which
you want IDs to be deleted (after one day, for
example, if you check message monitoring
daily).
Error Handling Settings
Parameter Entry
Wait Time After Message Error (msecs) Enter the number of milliseconds that the
adapter must wait when a processing error
occurs before further messages are processed.
In transactional processing, it can make sense
to specify a certain time period, for example,
because messages with errors remain in the
queue following a ROLLBACK.
Wait Before Reconnect (msecs) Specify a period of time after which an attempt
will be made to reestablish a connection
following a connection error on the JMS side.
The time period must be specified in
milliseconds. No attempt is made if the value is
set to -1.

Your JMS provider must support
the registration of an
ExceptionListener for this.

Advanced Tab Page
Adapter-Specific Message Properties
To store adapter attributes in the message header of the XI message, select Set Adapter-Specific
Message Properties.
To apply the following attributes in XI message headers, set the corresponding indicators:
Name Technical Name
JMS Message Correlation ID DCJMSCorreleationID
JMS Message Delivery Mode DCJMSDeliveryMode
JMS Message Destination DCJMSDestination
JMS Message Expiration DCJMSExpiration
JMS Message ID DCJMSMessageID
JMS Message Priority DCJMSPriority
JMS Message Redelivered Flag DCJMSRedelivered
JMS Message ReplyTo Destination DCJMSReplyTo
JMS Message Time Stamp DCJMSTimestamp
JMS Message Type DCJMSType
Used JMS Message Selector DCJMSMessageSelector
Used JMS Message Queue DCJMSMessageQueue
JMS User DCJMSUser
If you want to set additional JMS message attributes, select Specify Additional JMS Message
Properties (10 Maximum).
In the table, enter the names of the JMS message properties whose values are to be included in
the message header of the XI message.
The technical names of the additional attributes are DCJMSMessageProperty0,
DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
You can enter more than 10 properties in the table, but only the first 10 are taken into account.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/JMS.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Additional Parameters
To make additional settings or replace the default settings, enter the parameters and values in the table.
You can set the following parameters, for example:
Name Value
JMSMessageClass com.ibm.jms.JMSMessage
JMS.Message.method.setStringProperty java.lang.String XAppId, java.lang.String
myapp
You can set additional JMS parameters for all JMS providers.

Configuring the Receiver JMS Adapter
Use
You need to configure the receiver JMS adapter to be able to convert XI messages from the Integration
Server or the PCK into JMS messages.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use
the Module tab page to specify generic modules in the module processor, which give the adapter
additional functions.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type JMS.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
SonicMQ JMS Provider
WebSphereMQ (MQ Series) JMS Provider
Access JMS Provider with JNDI
(Read) JMS Provider Administered Objects from File
Access JMS Provider Generically
Message Protocol
JMS 1.x
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Target Tab Page
Depending on the transport protocol you have selected, make specifications for the respective JMS
provider. See the relevant JMS-provider documentation for details about the individual parameters. See
also: JMS-Provider-Specific Settings
Processing Tab Page
JMS Settings
Parameter Entry
Transactional JMS Session If you want to use a transactional JMS session,
set the indicator. Following processing of a
message, a transactional session ends either
with a COMMIT, or in the case of an error,
with a ROLLBACK.
Delivery Mode of Message Producer Specify the quality of service of the message
producer. You have the following options:
Persist JMS Messages in the JMS
Provider
Do Not Persist JMS Messages in the
JMS Provider
JMS ReplyTo Queue Name Specify the name of the queue to which the
responses are to be sent.
JMS Message Expiration Period (msecs) Specify the expiry period of the JMS message
as a JMS parameter in milliseconds.
JMS Message Priority Specify the priority of the JMS message.
JMS Queue User User for accessing the JMS queue
JMS Queue Password Password (with confirmation) for accessing the
JMS queue
Correlation Settings
Define the correlation settings.
Set JMSCorrelationID To:
XI Message ID (MessageID) (default value)
XI Reference ID (RefToMessageID)
XI Conversation ID (ConversationID)
No Value
Store JMSCorrelationID of Request
Set the indicator if you want to save the JMS correlation ID of the request.
Set this JMSProperty
Enter the JMS Property Name.
Specify which value the JMS property is to have:
XI Message ID (MessageID) (default value)
XI Reference ID (RefToMessageID)
XI Conversation ID (ConversationID)
No Value
XI Settings
Parameter Entry
Mapping of Message If you want the JMS payload to
contain the entire message,
choose Entire Message = JMS Payload.
If you only want the JMS payload to
contain the payload of the message,
chooseMessage Payload = JMS Payload.
Handling of Pending XI Messages The adapter is able to identify whether the
connection has been terminated between the
JMS commit and the commit in the database
of the Adapter Framework. The adapter
identifies the resulting duplicate data record.
You can choose from the following settings:
Throw Exception (Message Retry
Possible Later) (Default)
Bypass Pending Warning and Send
Message to JMS (Duplicates Possible)
A duplicate data record is created if the
JMS commit is executed, but not the
commit in the database of the Adapter
Framework. If you select this option, you
must make sure that this message has
not yet been received in the JMS
environment.
Mark Message as Delivered (Message
Loss Possible)
The message is lost if the JMS commit
has not yet been executed. If you select
this option, you must make sure that
this message has already been received
in the JMS environment.

For an example of how this
parameter is used, see below
underExample.
Time Period for Duplicate Check for EO(IO)
(secs)
To check for duplicate messages, IDs must be
saved in the database. To prevent the
database from getting unnecessarily large,
these IDs must be deleted after a certain
amount of time.
Specify in seconds the time period after which
you want IDs to be deleted (after one day, for
example, if you check message monitoring
daily).
Send XI Delivery Acknowledgment Back
(Adapter Is Endpoint)
If the JMS receiver is an application, the JMS
adapter should send a delivery
acknowledgment. Set the indicator.
Error Handling Settings
Parameter Entry
Wait Time After Message Error (msecs) Enter the number of milliseconds that the
adapter must wait when a processing error
occurs before further messages are processed.
In transactional processing, it can make sense
to specify a certain time period, for example,
because messages with errors remain in the
queue following a ROLLBACK.
Wait Before Reconnect (msecs) Specify a period of time after which an
attempt will be made to reestablish a
connection following a connection error on
the JMS side.
The time period must be specified in
milliseconds. No attempt is made if the value
is set to -1.

Your JMS provider must support
the registration of an
ExceptionListener for this.
Reconnection if Exception Text Starts with

If the JMS provider does not call the
ExceptionListener registered by the JMS
adapter when a connection error occurs, you
can force the connection to be reestablished
by setting this parameter.
If a JMS exception is thrown when sending a
message, the free text contained here is
compared with the specified string and once
the period of time specified in Wait Before
Reconnect (ms) has passed, an attempt is
made to reestablish the connection.

Only set this parameter if your
JMS provider does not support
the registration of an
ExceptionListener.
Advanced Tab Page
Adapter-Specific Message Properties
To evaluate adapter attributes in the message header of the XI message, choose Use Adapter-Specific
Message Attributes.
To evaluate the following attributes in XI message headers, set the corresponding indicators:
If you want missing message attributes to trigger error messages, choose Fail on Missing
Adapter Message Properties. If the indicator is set and the header for adapter-specific message
attributes or one of the set attributes is missing from the message, this leads to a delivery
exception in the audit log of the message.
If you do not set the indicator, and message attributes are missing, the adapter accesses
information from the adapter configuration.
Name Technical Name
JMS Message Correlation ID DCJMSCorreleationID
JMS Message Expiration DCJMSExpiration
JMS Message Priority DCJMSPriority
JMS Message ReplyTo Destination DCJMSReplyTo
JMS Message Timestamp DCJMSTimestamp
If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties
(10 Maximum).
In the table, enter the Name and Java Type of the JMS message properties whose values are to
be included in the message header of the XI message.
Under Java Type, you define the JMS Java message type for the attribute in the created JMS
message. The following are possible entries:
boolean
byte
short
int
long
float
double
String
The technical names of the additional attributes are DCJMSMessageProperty0,
DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
You can enter more than ten properties in the table, however, only the first ten are taken into
account.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/JMS.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Additional Parameters
To make additional settings or replace the default settings, enter the parameters and values in the table.
You can set the following parameters, for example:
Name Value
JMSMessageClass com.ibm.jms.JMSMessage
JMS.Message.method.setStringProperty java.lang.String XAppId, java.lang.String
myapp
You can set additional JMS parameters for all JMS providers.
Example
Below is a typical procedure for handling pending messages:
...
1. The default setting for the parameter of the receiver JMS adapter is Throw Exception.
2. You see the following exception in the message or adapter monitor:
The channel is configured to throw a recoverable, temporary error for this warning (default).
Decide whether you want to bypass this message. If so, set the Pending Handling channel
parameter to 'Bypass' and restart the message afterwards.
3. Make sure that no further messages are sent through this communication channel by
deactivating the corresponding sender channel.
4. Check whether the message or messages have arrived in the JMS environment.
a. If the message has arrived in the JMS environment, select Mark Message as
Delivered (Message Loss Possible).
b. If the message has not arrived in the JMS environment, select Bypass Pending
Warning and Send Message to JMS (Duplicates Possible).
c. Choose Repeat in message monitoring.
If some messages have arrived in the JMS environment and some have not, you must
perform the procedure twice and resend the respective messages in each case.
5. Reset the parameter in the communication channel to Throw Exception.
6. Activate the corresponding sender communication channel.

Configuring the Sender Mail Adapter
Use
You configure the sender mail adapter to convert e-mails to XI messages.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use
the Module tab page to specify generic modules in the module processor, which give the adapter
additional functions.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type Mail.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
You use IMAP4 (Internet Message Access Protocol) to retrieve e-mails from a folder of an e-mail
server.
You use POP3 (Post Office Protocol Version 3) to retrieve e-mails from an e-mail server.
Message Protocol
XIALL
In this mode, the content of the RF C822 e-mail matches the content of the XI message. The XI
message is a multipart MIME message with a SOAP envelope as its first part. See also: Messages,
under XI Message Protocol.
XIPAYLOAD
In this mode, the content of the e-mail is put in the payload of the XI message. If you do not set
the Use Mail Package indicator, the information about the sender (From), receiver (To), and
subject of the e-mail is lost.
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
General Tab Page
Connection Parameters for Mail Server
Field Entry
URL Enter the address of the mail server, for
example imap://imapserver/XIInBox.
Configure User Authentication If user authentication is required, set the
indicator and specify the following:
Simple
CRAM-MD5
Make the following entries:
Specify the user for accessing the
server.
Enter the Password and a confirmation.
Poll Interval (min.) Time interval after which e-mails are called on
the server.
Delete Messages Once Read If you have selected IMAP4 as the transport
protocol, you can specify here whether the
messages are to be deleted on the e-mail
server after reading.
You can then specify a Folder for Deleted
Messages on the server.
Generate Fetch Report If you want to generate a report for every
adapter poll procedure, set the indicator.
An XI message with the following information
is generated:
Interface namespace:
http://sap.com/xi/XI/Mail/30
Interface Name: FetchReport
Mail Attributes for Message Protocol XIPAYLOAD
If you have selected XIPAYLOAD as the message protocol, you must make the following additional
specifications under Mail Attributes:
If you want to put the entire e-mail message including the header information (From, To,
Subject) in the payload, set the Use Mail Package indicator. See the example below. The header
information is included in an XML mail package format.
Specify whether you want to encode the content of the e-mail. You have the following options to
do this:
None
base64
Quoted-Printable
If you want to forward e-mail attachments in XI attachments, set the Keep
Attachments indicator.
You use the PayloadSwapBean module to replace the application payload with one of the
attachments.
Security Parameters for Message Protocol XIPAYLOAD
If you want to decrypt and validate encrypted and digitally signed e-mails in the corresponding
sender agreement in the Integration Server or in the PCK, set the S/MIME indicator. See
also: Security Settings for the Sender Mail Adapter

To do this, you must have set the Keep Attachmentsindicator.
In addition, enter the following parameters and values in the table in Advanced Mode:
XI.ReceiverParty
XI.ReceiverService
The values you enter here must match the values for Receiver Party and Receiver Service in
the corresponding sender agreement.
Specify the Persist Duration. This specification is not currently used, but will be used in the future
for security archiving.
Further Parameters for Message Protocol XIPAYLOAD
XI Parameters
Specify the Interface Namespace and the Interface Name.
Processing Parameters
Select the quality of service.
For Exactly Once In Order, enter the Queue Name.
See: Quality of Service
Advanced Tab Page
Adapter-Specific Message Attributes
To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific
Message Attributes indicator.
The following attributes are added to the XI message header if the sender makes them available, and if
the Variable Transport Binding indicator is set.
Description Technical Name
User of mail account SUser
Mail header 'From' field SHeaderFROM
Mail header 'To' field SHeaderTO
Mail header 'Subject' field SHeaderSUBJECT
Mail header 'Cc' field SHeaderCC
Mail header field for reference to mail to
which this message replies
SHeaderIN-REPLY-TO
Mail header field SHeader-REPLY-TO
Mail header field for mail client program SHeaderX-MAILER
Mail header field for delivery
acknowledgement
SHeaderDISPOSITION-NOTIFICATION-TO
Mail header field for priority SHeaderPRIORITY
Mail header field for message importance SHeaderIMPORTANCE
To use further header fields, set the relevant indicator. You can then store the following attributes and
their values in the XI message header:
Description Technical Name
Variable Header XHeaderName1
Variable Header XHeaderName2
Variable Header XHeaderName3
The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Advanced Mode
To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.
Specify the additional parameter names and parameter values in the table:
For the security settings, enter values for the receiver party and receiver service here.
In the table, set the parameter IMail.AssumeXMLContent = true. The text of the message is then
interpreted as XML and is copied unchanged to the mail package. If this parameter is not set, the
information is copied from the content type of the MIME header. If the type specified there is
application/xml or text/xml, the text of the message is copied as XML; otherwise it is copied as
text.
Example
XI payload with mail package:
<?xml version="1.0" encoding="UTF-8"?>

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Subject</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Reply_To />
<Content_Type>text/plain</Content_Type>
<Content>
This is the content.
</Content>
</ns:Mail>

Configuring the Receiver Mail Adapter
Use
You configure the receiver mail adapter to convert XI messages to e-mails.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use
the Module tab page in the module processor to specify generic modules, which give the adapter
additional functions.
Prerequisites
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type Mail.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
SMTP
You use SMTP (Simple Mail Transfer Protocol) to transfer e-mails to an e-mail server.
IMAP4
You use IMAP4 (Internet Message Access Protocol) to put e-mails in a folder of an e-mail server.
Message Protocol
XIALL
All information of the XI message is put in the message text of the e-mail. The content of the XI
message is the same as the content of the RFC822 mail message.
XIPAYLOAD
The payload of the XI message is used to create the mail message.
If the payload is in mail package format, the header information is also used for the e-mail.
If mail package format is not used, the header information is obtained from the adapter
configuration described below.
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
General Tab Page
Connection Parameters for Mail Server
Field Entry
URL Enter the address of the e-mail server:
For SMTP: smtp://mailserver, for
example
For imap: //imapserver/XIOutBox, for
example
Configure User Authentication Choose the Authentication Method.
Plain
CRAM-MD5
If the server expects a logon, set the indicator.
Enter the User for logging on to the
server.
Enter the Password and confirm.
Send Delivery Status Notification For transport protocol SMTP you can
select Send Delivery Status Notification.
Under To, enter the e-mail address of the
recipient of the delivery status notification.
Mail Attributes for Message Protocol XIPAYLOAD
If you have selected XIPAYLOAD as the message protocol and have a mail package document as
the XI payload, select Use Mail Package.
If the XI payload is not available as a mail package document, make the entries for mail attributes
(From, To, Subject).

For the format, see Example below.
Specifications for mail attributes:
Under From, specify the e-mail address from which the message is sent.
Under To, specify the e-mail address that will receive the message. If you enter more than
one address, you must separate them with a semicolon.

If you have specified an IMAP server under URL, the message is saved in the specified
folder but is not sent to the receiver specified under To.
Under Cc, specify the other e-mail addresses to which the e-mail is to be sent.
These addresses are visible to the receiver.
Under Bcc, specify the other e-mail addresses to which the e-mail is to be sent.
These addresses are not visible to the receiver.
Enter the Subject of the e-mail message.
Specify whether you want to encode the content of the e-mail message. You have the
following options:
None
Base64 (default value)
quoted-printable
If you have selected XIPAYLOAD as the message protocol and you want to forward XI
attachments in the e-mail attachments, select Keep Attachments.
You use the PayloadSwapBean module to swap the application payload with one of the
attachments.
See: PayloadSwapBean
Security Parameters for Message Protocol XIPAYLOAD
To encrypt e-mails and give them a digital signature in the corresponding receiver agreement in
the Integration Server or in the PCK, set the S/MIME indicator.
More information: Security Settings for Receiver Mail Adapter

To do this, you must have set the Keep Attachmentsindicator.
Specify the Persist Duration. This specification is not currently used, but will be used in the future
for security archiving.
Advanced Tab Page
Adapter-Specific Message Attributes
To process adapter attributes in the message header of the XI message, select Use Adapter-Specific
Message Attributes and Variable Transport Binding. The following attributes in the message header are
available for processing:
Meaning Technical Name
User TServerLocation
Authentication Keys TAuthKey
Mail header 'from' field THeaderFROM
Mail header 'to' field THeaderTO
Mail header 'Cc' field THeaderCC
Mail header 'Bcc' field THeaderBCC
Mail header 'subject' field THeaderSUBJECT
Mail header field for reference to mail which is
being replied to
THeaderIN-REPLY-TO
Mail header 'reply to' field THeaderREPLY-TO
Mail header field for mail client program THeaderX-MAILER
Mail header field for delivery
acknowledgement
THeaderDISPOSITION-NOTIFICATION-TO
Mail header field for priority THeaderPRIORITY
Mail header field for message importance THeaderIMPORTANCE
To set fields that are not in the table, select Variable Header. You use these fields to forward additional
header information.
The technical names for the fields are XHeaderName1, XHeaderName2, XHeaderName3. The
parameters are embedded in the mail header under the names you enter here.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/Mail.
Authentication Keys
If authentication is required for the receiver system, you can enter a password with confirmation for
each key value. This means that you do not need to write passwords in the enhanced message header.
To enter or display the respective authentication key, select View Authorization Keys. You can enter and
confirm passwords for each authentication key value (TAuthKey).
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Advanced Mode
To specify additional parameters for the adapter configuration, select Advanced Mode.
Specify the additional parameter names and parameter values in the table.
To prevent the content disposition header being generated automatically, enter the parameter
name OMail.AddContentDisposition with value false.
If the content disposition header was generated in a module, for example, this parameter has no
effect.
If you do not set the parameter, the header is generated by the adapter.
Example
XI payload with mail package:
<?xml version="1.0" encoding="UTF-8"?>

<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Subject</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Reply_To />
<Content_Type>text/plain</Content_Type>
<Content>
This is the content.
</Content>
</ns:Mail>


Configuring the Sender RFC Adapter
Use
You configure the sender RFC adapter so that you can use it to convert RFC calls from a sender to XML
messages and send these messages to the Integration Server or the PCK.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use
the Module tab page to specify generic modules in the module processor, which give the adapter
additional functions.
Prerequisites
...
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page, you have selected the adapter type RFC.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
4. The communication channel in which the RFC adapter is defined must be defined for a service
of type Business System in the area Service Without Party. In the PCK, you must create an empty
party record.
5. The entries made in the communication channel must be identical to those for the adapter-
specific identifiers for the business system. For more information about adapter-specific
identifiers, see Service in the Integration Server or Service in the PCK.
Activities
Transport Protocol
The transport protocol is RFC.
Message Protocol
The message protocol is RFC (RFC XML).
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Source Tab Page
RFC Server Parameter
The RFC server parameters identify the sender system.
Specify the following parameters:
Parameter Entry
Application Server (Gateway) Gateway host name of the sender system.
Application Server Service (Gateway) Gateway service of the sender system. This
can be the numeric description of the service
port in the sender system or the alphanumeric
equivalent (for example, sapgwXX, where XX is
the system number of the sender system).
Program ID Program ID of the registered server program.
The selected program ID must uniquely
describe the RFC sender channel in the
configured gateway (Application Server
(Gateway) and Application Server Service
(Gateway) parameters).
SNC If you want to use Secure Network
Connection, set the SNC indicator.
Specify the SNC Name.
Select the Quality of Protection.
Set the indicator for SNC Advanced
Modeand enter the permitted SNC
names (ACL)in the table.
You can also enter a value for Path to
SNC Library. If you do not enter any
details here, the setting is applied to the
whole RFC adapter.
Unicode Select this checkbox if the sender system is a
Unicode system.
Initial Connections Number of initial connections required
between sender system and adapter.
Maximum Connections Maximum possible number of initial
connections required between sender system
and adapter. This value is limited internally to
a maximum of 50.
Advanced Mode To specify additional parameters in the
adapter configuration, set the Advanced Mode
indicator.
If the channel cannot reach the
specifiedSAP gateway to register itself,
it retries automatically. The time
interval between registration attempts
is increased exponentially from one
second to an internal maximum value
(3600 seconds).
Enter the maximum wait time in
seconds between two registration
attempts by using the Maximum
Reconnect Delay parameter.
If the connected sender system is a
non-SAP system, you can deselect
theVerify Sender System checkbox. The
sender system is then not checked
using the system ID and the client.
Enter additional parameters and their
values in the table.


You can configure the non-SAP RFC client to connect to the sender communication channel
in the following ways:
By defining the parameters PROGID, gateway-host, and gateway-service within the
saprfc.ini-file using RFC-SDK.
By using appropriate parameters in the function RfcOpenEx.
If you use the saprfc.ini-file, the respective RFC destination has to be of type R.
All the parameter values used within the saprfc.ini-file or with the function RfcOpenEx
should match the entries maintained within the corresponding sender communication
channel.
Example for the saprfc.ini-file is as follows:
DEST=RFCCLIENTEXT
TYPE=R
PROGID=P106646.HKExternalClient
GWHOST=pwdf2153
GWSERV=sapgw40
RFC Metadata Repository Parameter
The RFC metadata repository parameters identify the SAP system containing the repository for the RFC
metadata. This does not necessarily have to be the sender system.
Load Balancing
If your SAP system works with load balancing, select the checkbox and specify the following:
System with Load Balancing
Parameter Entry
Message Server Host name of the SAP system (message server)
Message Server Service Service of the SAP system (message server).
This can be the numeric description of the
service port of the message server or the
alphanumeric equivalent (for example,
sapmsXXX, where XXX is the system ID of the
SAP system).
System ID System ID of the SAP system
Logon Group Specify the logon group of the message server.
Note that the entries are case-sensitive.
Advanced Mode Select this checkbox if you want to specify
additional parameters of the
class JCO.Client for the adapter configuration.
Enter the name and values of the parameters
in the table displayed.
System Without Load Balancing
Parameter Entry
Application Server Host name of the SAP system (application
server)
System Number System number of the SAP system. This is a
two-digit numeric value.
Advanced Mode If you want to specify additional parameters of
the class JCO.Client for the adapter
configuration, select this checkbox.
Enter the name and values of the parameters
in the table displayed.
Authentication Mode
Use Logon Data for the SAP System Secure Network Connection for RFC
Specify the Logon User for logging on to the
SAP system.

Select the required level of security
under Quality of Protection.
Specify the Logon Password for logging on to
the SAP system.
Enter the SNC Partner Name.
Set the indicator for SNC Advanced Mode.
Specify the SNC Name.
Enter the SNC library and its path.
If you do not enter any details here, the
setting is applied to the whole RFC
adapter.
Enter the Logon Language and the Logon
Client.
Enter the Logon Language and the Logon
Client.
Authorizations to Read Metadata
Depending on the SAP system version, the following authorizations are required to read the metadata
(authorization object: S_RFC, ACTVT: 16, FUGR):
Function Groups by Release
Release Function Groups (FUGRs)
As of 3.1H RFC1, SG00, SRFC, SUNI, SYST
As of 4.0A RFC1, SDIF, SG00, SRFC, SYST, SYSU, SUNI
As of 4.6A RFC1, SDIF, SG00, SRFC, SYST, SYSU
As of 4.6D RFC1, SDIFRUNTIME, SG00, SRFC, SYST, SYSU
The role SAP_BC_JSF_COMMUNICATION_RO is available to SAPJSF users and contains all the required
authorizations.
Advanced Tab Page
Adapter Status
Set the adapter to Active to enable messages to be exchanged.
Adapter-Specific Message Attributes
The attribute namespace for the adapter is http://sap.com/xi/XI/System/RFC.
Parameter Entry
Set Adapter-Specific Message Attributes If you want to create adapter-specific message
attributes, set this indicator.
RFC Destination
Technical name:
RfcDestination
If the indicator is set, the RFC destination that
is used in the SAP sender system is transferred
as a message attribute in the message header.


Configuring the Receiver RFC Adapter
Use
You configure the receiver RFC adapter so that you can use it to convert XML messages from the
Integration Server or the PCK to RFC calls and send these calls to the corresponding receivers.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, on the Module tab page
in themodule processor, you can specify generic modules, which give the adapter additional functions.
Prerequisites
...
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type RFC.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
4. The communication channel in which the RFC adapter is defined must be defined for a service
of type Business System in the area Service Without Party. In the PCK you must create an empty
party record.
The entries made in the communication channel must be identical to those for the adapter-specific
identifiers for the business system. For more information about adapter-specific identifiers,
see: Service in the Integration Server or Service in the PCK.
Activities
Transport Protocol
The transport protocol is RFC.
Message Protocol
The message protocol is RFC (RFC XML).
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
Target Tab Page
RFC Client Parameters
The RFC client parameters identify the receiver system.
Specify the type of the RFC server.
It can be an SAP System.
It can be an External RFC Server.
The external RFC server is a server programmed with RFC-SDK that has registered itself with
an SAP Gateway.
If your SAP system works with load balancing, select Load Balancing.
SAP System with Load Balancing
Parameter Entry
Message Server Host name of the SAP system (message
server).
Message Server Service Service of the SAP system (message server).
This can be the numeric description of the
service port of the message server or its
alphanumeric equivalent (for example,
sapmsXXX, where XXX is the system ID of the
SAP system).
System ID System ID of the SAP system.
Logon Group Specify the logon group of the message server.
Note that the entries are case-sensitive.
SAP System Without Load Balancing
Parameter Entry
Application Server Host name of the SAP system (application
server)
System Number System number of the SAP system (two-digit
numeric value)
Authentication Mode
Logon Data for the SAP System Secure Network Connection for RFC
Specify the logon name for logging on to the
SAP system.

Select the required level of security
under Quality of Protection.
Specify the logon password for logging on to
the SAP system.
Enter the SNC Partner Name.
Set the indicator for SNC Advanced Mode.
Specify the SNC Name.
Enter the SNC library and the relevant path
underPath to SNC Library.
If you do not enter any details here, the
setting is applied to the whole RFC adapter.
Enter the Logon Language and the Logon
Client.
Enter the Logon Language and the Logon
Client.
Additional Parameters
Parameter Entry
Maximum Connections Maximum possible number of initial
connections required between adapter and
sender system. This value is limited internally
to a maximum of 50.
Specify the following parameters for the external RFC server:
Parameter Entry
Application Server (Gateway) Gateway host name of the receiver system
Application Server Service (Gateway) Gateway service of the receiver system. This
can be the numeric description of the service
port in the receiver system or its alphanumeric
equivalent.
Program ID Program ID of the registered server program
Maximum Connections Maximum possible number of connections
required between receiver system and
adapter. This value is limited internally to a
maximum of 50.

You can configure the non-SAP RFC server to connect to the receiver communication
channel in the following ways:
By defining the parameters PROGID, gateway-host, and gateway-service within the
saprfc.ini-file using RFC-SDK.
By using the appropriate parameters in the function RfcAccept.
If you use the saprfc.ini-file, respective destination should be of type R.
All the parameter values used within the saprfc.ini-file or with the function RfcAccept
should match with the corresponding entries in the receiver communication channel.
Example for the saprfc.ini-file is as follows:
DEST=RFCSERVEREXT
TYPE=R
PROGID=P106646.HKExternalServer
GWHOST=pwdf2153.wdf.sap.corp
GWSERV=sapgw40
Advanced Mode
For SAP systems (with and without load balancing) and also for external RFC servers, set the Advanced
Mode indicator to show additional configuration options.
Parameter Entry
Send 'Confirm Transaction' Only deactivate the indicator if you do not
want the transaction confirmation signal
(Confirm TID) to be sent after a transactional
RFC call.
Commit Control for Single BAPI Calls If you want to use this communication channel
to call BAPIs as remote-enabled function
modules that change data in the database, set
the indicator.
If executed successfully, the transaction is
written to the database by calling the function
module BAPI_TRANSACTION_COMMIT
explicitly. If an error occurs, the transaction is
rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the
field TYPE in parameter RETURN. If successful,
the tables are empty and the values , S,
I, and W are displayed. All other values are
regarded as errors.
To change this setting, set the indicator BAPI
Advanced Mode.
In the Successful RETURN-TYPE Values table,
enter the values that should lead to a
successful execution.
Table You can also specify additional parameters of
the class JCO.Client for the adapter
configuration.
Enter the name and values of the parameters
in the table displayed
RFC Metadata Repository Parameter
If an external RFC server is selected as the receiver, then an SAP system must also always be available to
provide the RFC adapter with the metadata of the external RFC server. If an SAP system is selected as
the receiver, you can also use this to provide metadata to the RFC adapter.
Select the Use Alternative RFC Metadata Repository checkbox if you want to use a different metadata
repository to that of the receiver system.
If you select this checkbox or choose the external RFC server type, the system displays the RFC client
parameters and you can enter values for the SAP system.
Depending on the SAP system version, the following authorizations are required to read the metadata
(authorization object: S_RFC, ACTVT: 16, FUGR):
Function Groups by Release
Release Function Groups (FUGRs)
As of 3.1H RFC1, SG00, SRFC, SUNI, SYST
As of 4.0A RFC1, SDIF, SG00, SRFC, SYST, SYSU, SUNI
As of 4.6A RFC1, SDIF, SG00, SRFC, SYST, SYSU
As of 4.6D RFC1, SDIFRUNTIME, SG00, SRFC, SYST, SYSU
The role SAP_BC_JSF_COMMUNICATION_RO is available to SAPJSF users and contains all the required
authorizations.
If your SAP system works with load balancing, select the checkbox.
SAP System with Load Balancing:
Parameter Entry
Message Server Host name of the SAP system (message
server).
Message Server Service Service of the SAP system (message server).
This can be the numeric description of the
service port of the message server or its
alphanumeric equivalent (for example,
sapmsXXX, where XXX is the system ID of the
SAP system).
System ID System ID of the SAP system.
Logon Group Specify the logon group of the message server.
Note that the entries are case-sensitive.
SAP System Without Load Balancing:
Parameter Entry
Application Server Host name of the SAP system (application
server)
System Number System number of the SAP system (two-digit
numeric value)
Authentication Mode
Logon Data for the SAP System Secure Network Connection for RFC
Specify the logon name for logging on to the
SAP system.

Select the required level of security
under Quality of Protection.
Specify the logon password for logging on to
the SAP system.
Enter the SNC Partner Name.
Set the indicator for SNC Advanced Mode.
Specify the SNC Name.
Enter the SNC library and the relevant path
underPath to SNC Library.
If you do not enter any details here, the
setting is applied to the whole RFC adapter.
Enter the Logon Language and the Logon
Client.
Enter the Logon Language and the Logon
Client.
Additional Parameters
Parameter Entry
Advanced Mode Select this checkbox if you want to specify
additional parameters of the
class JCO.Client for the adapter configuration.
Enter the name and values of the parameters
in the table displayed.
Advanced Tab Page
Adapter Status
Set the adapter to Active to enable messages to be exchanged.

Configuring the Sender SOAP Adapter
Use
You need to configure the sender SOAP adapter to send content from remote clients or Web service
servers to the Integration Server/PCK.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication
channel in the Integration Server or in the PCK. You cannot enhance this adapter with your own
modules on theModule tab page in the module processor.
The inbound address for SOAP messages
is: http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
Under party:service:channelenter the party name, the service name, and the name of the
communication channel. If no party has been created, enter the
following: channel=:service:channel
Prerequisites
...
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type SOAP.
3. You have selected the Sender radio button to define the adapter as a sender adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
HTTP
Message Protocol
SOAP 1.1
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
General Tab Page
Inbound Security Checks
Select the HTTP security level for inbound messages:
HTTP
HTTPS without client authentication
HTTPS with client authentication
See also: SAP Security Guide XI, HTTP and SSL, under Enforcing HTTP Security for Incoming Messages
Security Parameters
If you want to make additional settings for security in the relevant sender agreement on the
Integration Server or in the PCK, set the Select Security Profile indicator. See also: Security
Settings for the Sender SOAP Adapter.

If you set the indicator, there must be exactly one sender agreement for the defined
communication channel.
Under Security Profile, select whether you want to use Web Services Security or S/MIME.
Also specify the Persist Duration for the messages.
Conversion Parameters
Parameter Details
Do Not Use SOAP Envelope If the indicator is set, the adapter expects a
message without a SOAP envelope.
If you have set the indicator, you must also
enternosoap=true in the URL.
The adapter then puts the whole message in
the XI payload.
Keep Headers If the header of the Web service message is to
be included in the XI message, set the
indicator.
Keep Attachments If attachments of the Web service message are
to be included in the XI message, set the
indicator.
Use Encoded Headers If the XI header information is to be included
in the encoded string, set the indicator.
Use Query String If the XI header information is to be included
in aquery string, set the indicator.
Default XI Parameters
Set the default values for the following parameters:
Interface Namespace
Interface Name
Processing Parameters
Under Quality of Service, specify how the message is to be processed by the Integration Engine/PCK.
Best Effort (synchronous processing)
Exactly Once (asynchronous processing)
If the client sends a GUID, execution is guaranteed exactly once. See also: Ensuring Exactly Once
Processing
Exactly Once In Order (asynchronous processing using queues)
If the client sends a GUID, execution is guaranteed exactly once maintaining the sequence of
successive messages.
Specify the Queue Name.
Advanced Tab Page
Adapter-Specific Message Attributes
To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific
Message Attributes indicator.
The following attributes are added to the XI message header if the sender makes them available, and if
the Variable Transport Binding indicator is set.
Name Technical Name
Remote User SRemoteUser
Remote Host SRemoteHost
To transfer further header fields, set the relevant indicator. You can then store the following attributes
and their values in the XI message header:
Name Technical Name
Variable Header XHeaderName1
Variable Header XHeaderName2
Variable Header XHeaderName3
The names of the fields and parameters must correspond to the names of the fields and parameters that
also go through the HTTP request.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/SOAP.
Adapter Status
Set the adapter to Active to enable messages to be exchanged.

Configuring the Receiver SOAP Adapter
Use
You configure the receiver SOAP adapter to send information from the Integration Server/PCK to remote
clients or Web service servers.
Integration
You configure the adapter on the Parameters tab page during the definition of a communication channel
in the Integration Server or in the PCK. In addition to the adapter configuration, you can use
the Module tab page to specify generic modules in the module processor, which give the adapter
additional functions.
Prerequisites
...
1. You have created a new communication channel or have opened an existing one.
2. On the Parameters tab page you have selected the adapter type SOAP.
3. You have selected the Receiver radio button to define the adapter as a receiver adapter.
Activities
To configure the adapter, specify the following:
Transport Protocol
HTTP (including HTTPS)
SMTP (including SMTPS)
The adapter uses this transport protocol to send SOAP messages as e-mails.
Message Protocol
SOAP 1.1
Adapter Engine
Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.
This selection is not available in the PCK.
General Tab Page
Connection Parameters
You define the connection parameters depending on the transport protocol:
HTTP/HTTPS SMTP/SMTPS
Under Target URL, enter the complete
address (URL) of the Web service
provider that you want to send the
message to.
If the server requires a user
authentication, set the Configure User
Authenticationindicator and specify the
following:
Specify the User.
Enter the Password and
confirm.
If the server requests a certificate from
the client, set the Configure Certificate
Authentication indicator.
Specify the Keystore Entry.
Specify the Keystore View.
Under Target URL, enter the complete
address (URL) of the Web service
provider that you want to send the
message to.
If the server requires a user
authentication, set the Configure User
Authenticationindicator and specify the
following:
Select the PLAIN or CRAM-MD5
authentication method.
Specify the User.
Enter the Password and
confirm.
If the server requests a certificate from
the client, set the Configure Certificate
Authentication indicator.
Specify the Keystore Entry.
Specify the Keystore View.
If the Web service provider can only be
reached by using an HTTP proxy server
and not directly, set the Configure
Proxyindicator and enter the following:
Host
Port (used for receiving proxy
HTTP requests)
If the proxy requires a user
authentication, set the Configure
Proxy User
Authentication indicator and
enter the User and Password,
and confirm.

Mail Attributes for Transport Protocol SMTP/S
If you have selected SMTP/S as the transport protocol, you can specify mail attributes:
Under From, specify the e-mail address from which the message is sent.
Under To, specify the e-mail address that will receive the message.
If you enter more than one address, you must separate them with a semicolon.
Under Cc, specify the other addresses to which the e-mail is to be sent. The addresses you
specify here are visible to the receiver.
Under Bcc, specify the other addresses to which the e-mail is to be sent. The addresses you
specify here are not visible to the receiver.
Enter the Subject of the e-mail message.
Security Parameters
If you want to make additional settings for security in the relevant receiver agreement on the
Integration Server or in the PCK, set the Select Security Profile indicator.
See: Security Settings for the Receiver SOAP Adapter
Select the security profile Web Services Security or S/MIME.
Specify the Persist Duration for messages in days, hours, minutes, and seconds.
Conversion Parameters
Parameter Details
Do Not Use SOAP Envelope If the payload of the message is to be sent
without a SOAP envelope, set the indicator.
Keep Headers If the header of the XI message is to be
included in the Web service message, set the
indicator.
Keep Attachments If attachments of the XI message are to be
included in the Web service message, set the
indicator.
Use Encoded Headers If the headers of the XI message are to be
encoded, set the indicator.
Use Query String If a query string is to be specified, set the
indicator.
SOAP Action Specify the SOAP action. The action species
the value for the SOAPAction in Web service
messages.
Advanced Tab Page
Adapter-Specific Message Attributes
To process adapter attributes in the message header of the XI message, select Use Adapter-Specific
Message Attributes and Variable Transport Binding.
You can evaluate the following attributes in the message header:
Description Technical Name
Server URL (you can set the complete URL
here)
TServerLocation
Authentication Key TAuthKey
Proxy URL TProxyLocation
Proxy Authentication Key TProxyAuthKey
SOAP Action THeaderSOAPACTION
If you want to transfer header fields, set the relevant indicator for Variable Header. The technical names
for the fields are XHeaderName1, XHeaderName2, XHeaderName3. The parameters are embedded in
the HTTP request under the names you enter here.
The attribute namespace for the adapter is http://sap.com/xi/XI/System/SOAP.
Authentication Keys
If authentication is required for the receiver system, you can enter a password and a confirmation for
each key value. This means that you do not need to write passwords in the enhanced message header.
If you want to specify or display authentication keys, select View Authorization Keys.
You can enter and confirm passwords for each authentication key value (TAuthKey or TproyxAuthKey).
Adapter Status
Set the adapter to Active to enable messages to be exchanged.

HTTP
HTTP adapter connect non-SAP systems to the Integration Engine using the native HTTP interface (HTTP
payload without SOAP envelope). This uses the Internet Communication Framework of the AS ABAP. The
standard exchange format for data in the Integration Engine is XML
The plain HTTP adapter is part of the Integration Engine. It comprises two parts, namely an adapter at
the Integration Engine inbound channel and an adapter at the Integration Engine outbound channel.
The adapter at the inbound channel is located before the Integration Engine pipeline and calls this
pipeline. The adapter at the outbound channel is called by the pipeline, and can therefore be regarded
as part of the pipeline. It requires a corresponding communication channel from the technical routing
for each logical receiver.

Transport Protocol: HTTP(S) 1.0
Message Protocol: XI payload in HTTP body
You communicate with the plain HTTP inbound channel of the Integration Engine using an HTTP address.
You encode the control data in the HTTP address as parameters, to enable a message to be created.
These parameters are mandatory.

The HTTP body is used as the payload for the message. The payload does not contain an envelope with
control data for the message you want to create.
Quality of Service: BE, EO, EOIO
HTTP Security Level: HTTP, HTTP without client authentication, HTTP with client authentication.








ABAP Proxies:

When Web services are built from platform-independent objects in the Enterprise Services Repository
(ES Repository), the ES Repository objects are mapped to platform-specific proxy objects.
Objects are modeled and stored in the ES Repository, which is the central repository and modeling
environment for Web service objects, process and service definitions.
The ES Repository stores data that is relevant for configuration, installation, and deployment, but the ES
Repository does not provide runtime or platform-specific data.

ABAP Proxy Generation - General Procedure
This section outlines the general procedure for generating, regenerating, and deleting ABAP proxies.
Additional information for generating specific proxy types is provided in separate sections.
The procedure to generate ABAP proxies is essentially the same for each different type of proxy. There
are two main steps:
Select the objects to be called or implemented.
Generate and activate the proxies.
Prerequisites
To work with ABAP proxies, you need the SAP_XI_DEVELOPER_ABAP role, which is included in the
composite role SAP_XI_DEVELOPER. Use the profile generator (transaction PFCG) to assign roles.
Depending on the proxy type, the following tasks must be done before you generate a proxy:
All objects must be modeled in the ES Repository or be made available as external WSDL
descriptions.
When a proxy that is modeled in the ES Repository is generated for an object that references
another object in the same namespace, the proxy for the referenced object will be generated
automatically. For example, a proxy could be generated for a service interface that references a
specific data type.
If a referenced object is in a different namespace, you need to generate the proxy for the
referenced object separately.
The package structure in the ABAP back-end system must be defined.
The package structure defines where the proxies will be created, where the service provider will
be, and how the packages will fit into the overall application structure.
Prefixes for the ABAP objects can be defined.
It is recommended that you define prefixes as they allow you to ensure that ABAP objects in the
back-end system are assigned unique and consistent names.
Procedure
Generating a Proxy
You need to be working in the system in which you want to generate the proxy. Proxies are generated in
the ABAP back-end system, in which the object will subsequently be provided.
1. Start the Enterprise Services Repository Browser.
Use transaction code SPROXY.
The software component versions are displayed.
2. Expand the nodes of the software component version and the namespace in which you want to
generate a proxy.
3. Select an object.
4. To generate the proxy, open the context menu and choose Create proxy.
5. Specify a package and a prefix, and choose Enter.
Based on the prefix that you specify, valid ABAP names are proposed. You can change the
proposed names as required.
When the proxy is generated, all the underlying objects will also be generated.
Information about the generated proxy interface, such as the implementing proxy class, and the
generated service definition is displayed in the Properties tab.
The prefix you specified is displayed as part of the ABAP name in the Properties tab and also in
the Structure tab.
The External view and Internal view tabs respectively show the operations and methods, and
the corresponding ABAP message types and data types.
6. Activate the proxy.
When the proxy is activated, all the underlying objects are automatically activated as well.
Note
The ABAP objects, such as the class, interface, DDIC type, are not created in the system until you
activate the proxy.
End of the note.
7. Release the transport request.
Use transaction SE09 to do this.
8. Create a runtime configuration for the proxy.
Note
A runtime configuration is only needed for service interfaces.
End of the note.
1. Start the SAP NetWeaver Administrator.
Use transaction code SOAMANAGER, choose Central Web Service Administration, and
log on.
2. Select WS Configuration.
3. Select the service definition that was automatically created during proxy generation.
4. Choose Create Endpoint.
An endpoint contains a single runtime configuration. You can create different endpoints
to define different runtime behaviors for the same service definition.
5. Specify a name for the endpoint.
An endpoint must have a unique name within the Web service entity.
6. Check that the security profile meets your requirements.
To make changes, choose Edit.
7. Save.
The runtime configuration with a port type is now available on the back-end system, and
can be integrated into an application.
Generating Proxies with Industry-Specific Enhancements
To activate industry classifications, you need to select an industry when you generate proxies for Web
services delivered with an Enhancement Package. Perform the following steps:
1. Log on to the back-end system in English.
2. Start transaction SM30.
3. Choose the SVW_INDUSTRY view.
4. Select your industries.
Regenerating a Proxy
If an object is changed in the Enterprise Services Repository (ES Repository) after it has been generated,
the changes will not automatically be reflected in the proxy in the ABAP back-end system. If an object in
the ES Repository is changed, you will need to regenerate the corresponding proxy manually.
Note
In the ES Repository Browser, an icon with a red triangle indicates a version of an ES Repository entity
that is different from its proxy version in the ABAP back-end system.
End of the note.
1. In the Enterprise Services Repository Browser, locate the object whose proxy you want to
regenerate.
2. Open the context menu and choose Regenerate proxy
This function will only be available if a proxy has already been generated.
Only the proxy interfaces and classes will be overwritten. The implementing class will remain
intact, meaning that the implementation will not be lost.
3. Reactivate the proxy.
From the context menu, choose Activate Proxy.
When the proxy is activated, all the underlying objects will be automatically activated as well.
Deleting a Proxy
1. In the ES Repository Browser, select an object.
2. From the menu, choose Proxy Delete .
Note
By default, the implementing class will not be deleted. Only the generated data will be deleted.
To delete the provider class, you must choose to do so explicitly when the system prompts you.
End of the note.
Result
When proxy objects are activated, one or more of the following ABAP objects are created:
ABAP Dictionary types
ABAP Dictionary types represent the global data types in the ES Repository. The system also
generates the data types that will be used as method parameters.
ABAP interface
An ABAP interface comprises interface types and constants.
ABAP class (proxy class or implementing class) for provider or consumer proxies
The ABAP class of a service provider contains the implementation of the service provider
methods, and uses an ABAP interface. A service provider class has one method for each
operation modeled in the ES Repository. For a proxy to be used by an application, the methods
will need to be filled with application coding
--------------------------------

Have you got the error message "Unable to connect to the Integration Builder, when you are trying to
create a ABAP PROXY from a R/3 system?


This blog enumerates the process of Configuration required for ABAP proxy. All the configurations are
available in the SAP XI configuration guide and Installation guides. This is an attempt to bring the entire
configuration together.


Consider the following system landscape for configuration of the ABAP Proxy:

Two systems exist in the landscape:

System X : SAP XI 3.0 system and

System Y : SAP R/3 on WAS 620


The prerequisites to configuration for ABAP Proxy include: (landscape dependent)


1. The business systems should be based on SAP Web AS 6.20 and SAP Web AS 6.20 kernel patch level
above 1253

2. You have installed the XI Add-On in each of these business systems as described in the Installation
Guide SAP Exchange Infrastructure 3.0

3. The business systems and your central Integration Server are maintained in the System Landscape
Directory (SLD).


Configuration required on the Business System:


1. Create HTTP connection in the business system.


Configuration Details:

Technical Setting:


1. Following Inputs are required for technical setting


1 Connection Type: H

2 Target Host: System name

3 Service Number: HTTP Port name

4 Path Prefix: /sap/XI/engine/?type=entry


Logon Security

On the Logon/Security tab page, enter the following logon data:

1 User: XIAPPLUSER (for example); this user should represent the sending business system (see also
the SAP XI Security Guide under Service Users for Message Exchange).

2 Password: the password you have specified for this user

3 Client: SAP XI Integration server

4 Language: Language required




SAPISU_XID created in step 1. Dest://SAPISU_XID.

5. Under Specific Configuration Data you can specify additional configuration data

1.Select the relevant category under Specific Configuration Data.

2.Choose Change Specific Configuration Data.

For ABAP Proxies, Add the following configuration:

1.Category RUNTIME

2.Parameters: IS_URL

3.Current Value: dest://SAPISU_XID





4.Choose ENTER.

5.Choose the Technical settings tab page and do the following:

6.In the Program ID field under Registered Server Program, enter LCRSAPRFC

7.This program ID must correspond to a program ID specified in the RFC engine settings of the SAP
J2EE Engine on the Integration Server host.


1. You can reuse this program ID for all Business systems

2. If there is HTTP error during connection, first run transaction SLDCHECK in the Business system. Also
check that HTTP connection is working fine.

3. In XI Adapter use HTTP connection rather than giving R/3 input details as this is easier to transport
and maintenance

4. One receiver adapter can be used for all Interfaces connecting to a Business system.


New Features of SAP PI 7.1

Content

Overview
Enterprise Service Repository
Integration Engine/Directory
Advanced Adapter Engine


Overview

This document describes all new features, enhancements and changes for Process Integration.
For each change made, we specify the release and the SAP NetWeaver PI components for which
it was implemented.
Enterprise Services Repository

This section describes all new features, enhancements, and changes for Enterprise Services
Repository.
Interface Objects
ES Repository Tools
Interface Objects -Changes to Service Interface
Feature Description
Automatic Migration of Message Interfaces Until SAP NetWeaver 2004s there were message
interfaces in the Integration Repository. Each
message interface consists implicitly of an
operation, which is not named in the message
interface editor.
As of this release, you can no longer create
message interfaces. You can only create service
interfaces, which allow the definition of multiple
operations.
Interface Pattern Depending on the use of a service interface, there
can be different types of operations for the
respective use. To enable the selection of possible
operations to be restricted at design time, each
service interface has an interface pattern, which
you use to decide implicitly on a communication
and thus programming model.
dempotency

In the service interface, for inbound category with
mode as synchronous and any interface pattern
except TU&C/C, a new option called Idempotent is
available.

Security Profile

Assigning Service Interfaces

You can assign security levels to the service
interfaces in the ES Repository.
To simplify the configuration of point-to-point
connections, you can assign related service
interfaces to one another in the Enterprise
Services Repository (outbound service interface
and inbound service interface).
For a given inbound service interface, a wizard
automatically creates an outbound service
interface and assigns a link to match the two
interfaces. This is applicable only for point-to point
communication.

Classifying service interfaces in the ES
Repository

You can assign classifications to service interfaces
in the ES Repository.

Publishing service interfaces

You can configure the ES Builder to automatically
publish service interfaces to the Services Registry
after activation.

Creating service interfaces from WSDL files

A wizard enables you to import WSDL files into the
ES Repository and create service interface objects

Changes to External Definitions
Mass import of external definitions

Until now, you could only upload individual files to
the Integration Repository one after the other. As
of the new release, you can upload multiple files
to the Enterprise Services Re pository at once and
create an external definition for each file.
Automatic Migration of Imported RFCs and
IDocs

The internal data storage format for imported
RFCs and IDocs has changed. The new data format
is simpler and less performance-intensive. All RFCs
and IDocs are automatically put in the new data
storage format when you upgrade to the new
release or transport RFCs or IDocs to the
Enterprise Services Repository. There are no other
effects.
Changes to Mapping Objects
General


Parameterized Mapping Programs

You can now work with parameters - whose values
are not defined until configuration time - in
message mappings, Java mapping programs, and
XSLT mapping programs. In mapping lookups, to
define the communication channel to be used in
the Integration Directory, you can now use the
new parameter type Channel. For more
information.
Message Mappings


Function Libraries

In lower releases, you were able to save and
manage user-defined functions as part of one
message mapping. You can now create function
libraries independently of specific message
mappings, and can use the functions you define in
them in multiple message mappings.


Standard Functions for Mapping Lookups

In lower releases, you could only use mapping
lookups in message mappings if you used the
mapping-lookup-API in Java within a user-defined
function. The mapping editor now has the
standard functions JDBC Lookup and RFC Lookup
for lookups involving the JDBC or RFC adapter.


Variables


In the target structure in the mapping editor, you
can now define a graphical variable that you assign
a value to at runtime by using a normal target-field
mapping. You can then use this value in the scope
of the variable when you apply the variable in
other target-field mappings;

XSLT Mappings

SAP supports the SAP XML Toolkit for SAP
NetWeaver Process Integration 7.1 and the next
release of SAP NetWeaver.
Java Mappings

A new API is available for Java mappings. The
previous mapping API still exists but no further
development will take place (parameterized Java
mapping programs are only possible with the new
mapping API, for example).

ES Repository Tools

Usage Profile

The usage profile is a filter that defines the
number of ES Repository objects that you can
access. It enables you to view and work with only a
set of object types, software component versions,
and modeling filters required to achieve your goals

Translating language-dependent

You can now translate language-dependent texts
in a separate editor.

Integration Engine/Directory
IDoc Sender Adapter Available in Integration
Directory

You can now configure an IDoc sender adapter in
the Integration Directory for processing IDoc
packages that reach the inbound channel of the
Integration Server and to enter the segment
release so that the IDocs are forwarded correctly.

Comparing Metadata for the IDoc Adapter

You have the option of comparing metadata that
has been loaded to the Integration Server with the
current metadata from the SAP reference system
that the metadata comes from.

Message Packaging

You can now improve the performance of message
processing in SAP NetWeaver Process Integration
by grouping together asynchronous messages in
packages and then processing each message
package.

Configuration of Principal Propagation

You can configure principal propagation based on
Security Assertion Markup Language (SAML 1.1).

Configuration of communication channels
with adapter type WS

For configuring scenarios using Web service
consumer and web service provider, you can now
use a new version of the adapter type WS.

Creating folders

You can create a folder to structure Integration
Directory content more clearly. Folders can be
shown or hidden in the navigation area of the
Integration Builder.

Enabling Async/Sync and Sync/Async
Communication With JMS Adapter

Modules are provided for the JMS adapter that
enable async/sync and sync/async communication.
You add the modules to the JMS adapter modules
in the module processor

XML to Text Conversion Module

You use this module to convert an XML document
contained in the mail payload of the XI message to
simple text format.
You can convert data records either to text with a
fixed column width or a separate list. You can
define the separator. During conversion, the
structure of the XML document is checked using
your specifications.

Advanced Adapter Engine
Local Message Processing on the Advanced
Adapter Engine


Using Integrated Configuration you can define a
local Message Processing on the Advanced
Adapter Engine. The Advanced Adapter Engine
provides mapping and routing for this locally.
Message Processing is only executed on the
Advanced Adapter Engine from one adapter to
another without the involvement of the
Integration Engine. You can gain a great
improvement in performance.
You can implement all adapters on the Adapter
Engine for a local Message Processing on the
Advanced Adapter Engine, apart from the RNIF
adapters and the CIDX adapters.
If you do not use the integrated configuration,
message processing will continue to be performed
using the Integration Engine. .




List of Features:
Service Interface generation for WSDL import into the Enterprise Services Repository
Classification support in the Enterprise Services Repository
Security profile settings for Service Interfaces
Whereused list in Services Registry
Add Information to Services Published in Services Registry
Generation of outbound interfaces based on inbound interfaces
User defined usage profiles in Enterprise Services Repository
User defined usage profiles in Services Registry
Cleanup of Services Registry
Content-based routing and receiver split in AAE
Operation-dependent receiver determination
Directory API supports new objects types
Enhanced search for communication channels
Scenario view in Integration Directory
Enhancements of Adapter Engine SE:
Remote configuration
Empty file handling
Overwriting of inbound files
Configuration based on Process Component Interaction Models
ABAP and Java proxies supported in the Advanced Adapter Engine
End to end IDoc packaging
IDoc Conversion Adapter Module
User defined message search
Cross domain message status overview
Process Integration monitoring and configuration capabilities available through SAP Solution
Manager
Management of heterogeneous, multi-platform SOA landscapes (integration with AmberPoint)
SOA configuration for connectivity of Web services and consumers based on SOA Manager
Enhancement in migration controller for smooth upgrades of Java proxies to SAP NW PI 7.1

You might also like