Professional Documents
Culture Documents
Configuring Java Idoc Adapter (Idoc - Aae) in Process Integration
Configuring Java Idoc Adapter (Idoc - Aae) in Process Integration
Process Integration
TABLE OF CONTENTS
INTRODUCTION ......................................................................................................................................... 3
Preparation................................................................................................................................................. 3
CONFIGURATION REQUIRED FOR SENDER CHANNEL WITH IDOC_AAE ADAPTER TYPE ................. 4
1. Default (recommended) option in sender communication channel. ........................................ 4
a. Creating Default Destination in NWA of the PI System .................................................................. 4
b. Create RFC destination in NWA for Backend System (Optional) ................................................... 7
c. Configuring the resource adapter inboundRA. ............................................................................... 7
d. Sender Communication Channel with IDoc_AAE Adapter type. ..................................................... 9
e. Configuring RFC Destination in Sender R/3 system. ..................................................................... 9
2. Manual Option in sender communication channel ..................................................................10
a. Sender Communication channel with IDoc_AAE Adapter type and Manual Option. ......................10
b. Configuring RFC Destination in sender R/3 system. .....................................................................11
3. From NWA option in sender communication channel .............................................................12
a. Create Custom Resource adapter. ...............................................................................................12
b. RFC destination in Sender ERP system. ......................................................................................14
CONFIGURATION REQUIRED FOR RECEIVER CHANNEL WITH IDOC_AAE ADAPTER TYPE .............14
1. Default (Recommended) option in receiver communication channel .....................................14
a. RFC destination in NWA ..............................................................................................................14
b. Communication channel with IDoc_AAE Adapter type and Default Option. ...................................14
2. Manual option in receiver communication channel. ................................................................15
a. Communication channel with IDoc_AAE Adapter type and Manual Option. ..................................15
3. From NWA option in receiver communication channel. ..........................................................16
a. JCA Connection Factory in NWA. ................................................................................................16
b. Communication channel with IDoc_AAE Adapter type and From NWA Option..............................18
TESTING END TO END CONFIGURATIONS WITH IDOC ADAPTERS .....................................................19
1. Testing IDoc to File scenario with sender adapter in Default (Recommended) Option..........19
2. Testing IDoc to File scenario with sender adapter in Manual Option......................................20
3. Testing IDoc to File scenario with sender adapter in From NWA Option................................21
4. Testing File to IDoc scenario with receiver adapter in Default (Recommend) Option............21
5. Testing File to IDoc scenario with receiver adapter in Manual Option....................................23
METADATA REFRESH AND IDOC MESSAGE MONITOR IN NWA. .........................................................26
CHOOSING RFC SERVER PARAMETER OPTION IN IDOC_AAE ADAPTER ..........................................28
RELATED CONTENT .................................................................................................................................30
2
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
This guide helps to understand the configurations required for IDoc scenarios with IDoc_AAE adapter
type in PI 7.3/ 7.31 involving advanced adapter engine.
Unlike other type of adapters, the Java IDoc adapter has dependencies on configurations in backend SAP
systems and configurations in NWA apart from the configurations which have been maintained in
communication channel with Adapter type IDoc_AAE.
INTRODUCTION
The new IDoc Adapter IDoc_AAE is part of the advanced adapter engine and is a java implementation which
does not use ABAP services.
The configuration for IDoc_AAE adapter is different when compared to the IDoc Adapter (ABAP Stack).
For configurations related IDoc Adapter in PI Dual Stack refer how-to guide How to Configure IDoc Adapters
(NW7.0).
However this current document provides the details about the configurations required for using Java IDoc
Adapter (IDoc_AAE) and other important settings like creation of destinations, configuration of resource
adapter in NWA which are required for IDoc related scenarios.
The three different modes which are available for configuring communication channels with the IDoc_AAE
Adapter type are:
1. Default (recommended)
2. Manual
3. From NWA
Note: The configurations shown here are from swing client and similar options are available if configurations
are done via NWDS. In dual stack installation we can use either IDoc or IDoc_AAE adapters.
The additional configurations in R/3 system related to creation of Partner Profiles (WE20), Ports (WE21) will
not be discussed in detail as part of this guide.
The configuration steps for each mode (Default, Manual and From NWA) in case of Sender and Receiver
IDoc channels are mentioned separately below.
Preparation
The developer should have necessary permissions to log-on to PI system, SOA Monitor and Configure
Destination and Resource adapters in NWA.
3
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
The goal of the sender configuration is to establish a technical connection from the R/3 system to the PI
system for sending the IDOCs from the former into the latter. The connectivity is established using RFC
technology. There are different RFC connections that are maintained on PI and the R/3 system.
The PI system receiving the IDOC needs to query the sending R/3 system to understand the structure
of the received IDOC. An RFC connection is created for this purpose on the PI system.
The same RFC connection can also be used by the PI system to post IDOC acknowledgement
messages to the R/3 system once the IDOC has been successfully processed or when errors are
encountered by PI.
The PI system registers a Program ID with a web application server gateway to receive RFC calls
from the R/3 system. The gateway chosen is typically that of the PI web application server but can
also be that of the R/3 system.
Finally a RFC destination is created in the R/3 system. This destination allows the IDOC layer in the
R/3 to call the program ID that is registered on the RFC gateway either on the PI system or the R/3
system. The RFC destination in the R/3 system is referenced in the IDOC port configurations.
The default setting is recommended as the configuration is simplified by using a central configuration in
the NWA. A single resource adapter is shared between all the sender channels of this option. The details
are explained in the following sections.
A RFC destination is maintained in the PI system with details of the R/3 system to query the IDOC
structure. This connection is created in the section ‘1.a’ below. The destination maintenance step
enables the IDOC adapter to create a RFC connection internally for metadata query of the IDOC
structure. To support multiple ERP systems the parameter named MultiRepository is used.
The same RFC destination can also be used by the PI system to post IDOC acknowledgement
messages to the R/3 system once the IDOC has been successfully processed or when errors are
encountered by PI. However if needed a different destination can be maintained. The creation of
this destination is outlined in section ‘1.b’.
The registration of the Program ID by the PI system into the RFC gateway is achieved by configuring
inboundRA resource adapter in the NWA. This step is outlined in section ‘1.c’
The creation of the RFC destination in the R/3 system is described in section ‘1.e’
The destination is used by the sender communication channel to retrieve the metadata for the IDoc
types that are processed on the communication channel. The destination must point to a SAP web
application server (e.g ERP) that contains the IDOC definition.
4
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
5
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Once completed, the destination will be added in the available list of destinations. Select this newly
added destination and click on Ping Destination button to check if connection is successful.
6
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
In case of errors in Ping Destination, check the system and logon details which has been
provided while creation of destination.
RFC Destinations can be created with the below name for metadata read.
XI_IDOC_DEFAULT_DESTINATION_<SID>.
The above destination can also be used for sending acknowledgements but this needs to be
explicitly defined in the channel. Separate RFC Destinations need to be created for each R/3
system.
Separate RFC destination can also be created for sending acknowledgements in this case
naming pattern is not mandatory.
This configuration is a one-time activity on the PI system. The step is initially executed during the
installation process when the CTC template JIDOC is executed. If not configured during the time
of installation, it will have to be configured later.
Open NWA (http ://< host> :< port>/nwa) Configuration Infrastructure Application
resources.
7
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Filter for inboundRA in the list. The resource of the name inboundRA must already exist if
the CTC template is executed during installation.
Then Click Properties tab and enter the details as shown in screenshot below. (If certain
property is not shown in the list, it can be added from Add New Property option available).
- Set the value of the Program ID field as XI_IDOC_DEFAULT_<SID> where SID is system ID.
Note: This is the same program id which will be used to create RFC destination (TCP/IP) in ERP
system as described in step ‘e’.
Note : Program ID can be arbitrary but must be unique name for the used gateway
Note : If Local is set to false then default Gateway server and Gateway service of PI system
need to be provided while configuring inboundRA.
8
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
(Note: The required business systems should be already imported into integration directory from
SLD)
Note: Maintaining Ack Destination is not mandatory. Refer SAP Note 1826256 for further details.
Create RFC Destination of type T in sender R/3 system (In this guide it is P73_AAE) and in technical
settings tab select registered server program.
Same details need to be provided for Program ID, Gateway Host and Gateway service in RFC
Destination which was added earlier while configuration of inboundRA resource adapter in section
‘1.c’ above.
9
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Click on connection test to ensure connection is successful with the details specified in RFC
Destination.
In the manual mode, all the configuration parameters are provided in the channel itself. Sender
communication channel with Manual option can be used for test purpose. In case of Manual option
we have no control of the gateway.
The parameters to create a RFC connection to retrieve the IDOC structure are already available in the
channel configuration. The same RFC connection can also be used by the PI system to post IDOC
acknowledgement messages to the R/3 system once the IDOC has been successfully processed or
when errors are encountered by PI.
Similarly, the registration of the Program ID by the sender channel into the RFC gateway of the R/3
system is implicitly performed. Here a distinct gateway name cannot be specified in the channel.
The creation of the RFC destination in the R/3 system is described in step ‘b’.
a. Sender Communication channel with IDoc_AAE Adapter type and Manual Option.
Select Adapter Type IDoc_AAE and select RFC Server Parameters as Manual.
10
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
System details of R/3 system with valid user id and password need to be provided in channel so
that the Program ID is registered in R/3.
Create RFC of Type T in sender R/3 system (Tcode sm59) and provide the details as shown
below in Technical settings tab. (In this guide it is P73_AAE_MANUAL)
Program ID name should be the same which has been mentioned in the sender
communication channel (IDoc_AAE_Sender_Manual).
Maintain Gateway host and Gateway service of R/3 system where Program ID has been
registered.
Save and Click on Connection Test to ensure RFC Destination is working fine without any
issues.
11
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
The mode is very similar to the default mode and offers convenience of a central configuration in the
NWA. A resource adapter configuration is created manually and is shared between all the sender
channels sharing the same resource adapter name. The details are explained in the following sections.
Custom Resource adapter is created as in step ‘a’ below. This adapter can be specified in sender
communication channel to receive IDoc from R/3.
Click Button Create New Resource -> Select New Resource Adapter –
12
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Press Next Again -> Enter JNDI Name again and press Tab for save button to activate and Press Save.
Now a NWA Resource Adapter is created.
Now in the properties tab for newly created resource adapter enter the Program ID(Example :
SAP_ERP_NWA) which will be used in RFC Destination in R/3 system, and other details like
server,client,logon details etc. Do not change the binding key value which is PI_AAE_IDOC.
Create an RFC Destination in R/3 system as done earlier of type ‚‘T‘ and enter the Program
ID(SAP_ERP_NWA) which has been mentioned in properties on Resource Adapter ERPCLNT800_RA
- Select RFC Server Parameters as From NWA and provide the Resource Adapter Name as
ERPCLNT800_RA.
If required separate Java IDoc communication channels can be created for each customer interface
scenario which is using one central NWA configuration .
13
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Create RFC destination in Sender R/3 system as done in section 1.e for Default Mode in Sender
IDoc Adapter. Enter the Program ID(SAP_ERP_NWA) which has been mentioned in properties of
Resource Adapter ERPCLNT800_RA
The PI system can be configured with a RFC destination to specify the content of the RFC connection
parameters. The PI channel can refer to the RFC destination in the NWA.
A new java connection factory is created and the required parameters of the RFC destination are
maintained in the connection factory. The connection factory is then referenced in the PI channel.
Note: The Java IDOC Receiver Adapter is a bit more strict when checking the syntax of the IDOC
XML. For “BEGIN” and “SEGMENT” fields of the IDOC XML and the adapter expects the constant
value “1” .
Create RFC destination in NWA as defined in step 1.b with target R/3 system details in our case
its XI_IDOC_DEFAULT_DESTINATION_ERP (Separate RFC Destinations need to be created
for each R/3 system if not already done).
14
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
15
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Create JCA Connection factory in NWA which will be used in channel configuration for NWA
Mode.
From the drop down list select JCA Resources and filter for outboundRA.
16
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
In Related JCA Connection Factories tab select outboundRA_CF and click on Copy and Add New
JCA Connection Factory.
Provide the JNDI Name which will be used later in Communication channel. Separate connection
factory to be created for each IDoc receiver system.
Naming convention can be used as <SID>CLNT<MANDT>_CF where SID is system ID and MANDT
is client number.
17
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Click on Configuration Properties Tab and enter the RFC destination name which has been created
pointing to target R/3 system and click on save.
Note: If property is not visible the DestinationName property can be added by clicking Add New
Property button.
The created JCA Connection Factory will be available in the list and can be used in communication
channel.
b. Communication channel with IDoc_AAE Adapter type and From NWA Option.
Create a new receiver communication channel in Integration Directory (In this guide it is
IDoc_Receiver_NWA). Select IDoc_AAE as adapter type, From NWA option for RFC Client
Parameters and enter the created JCA Connection factory details as shown in below screen
shot.
18
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
For testing the scenario of IDoc to File using IDoc_AAE adapter type, a Receiver file channel has been
created and integrated configuration using the sender IDoc channel and Receiver file channel has been
created.
The same integrated configuration has been used for testing by assigning different IDoc communication
channels which were created earlier as mentioned in document above.
1. Testing IDoc to File scenario with sender adapter in Default (Recommended) Option.
Create File Receiver channel in Integration Directory and Create integrated configuration with sender
channel IDoc_AAE_Default which was created earlier and Receiver File channel.
Assign the RFC Destination which was created earlier for Default mode (P73_AAE) in section 1.e to
the sender port (WE21) in sender R/3 system.
Trigger the IDoc from tcode WE19 from sender ERP system.
19
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Check the communication channel monitoring for the channel IDoc_AAE_Default, the IDoc details
like IDoc number will be available in processing details section which has been received by PI
system.
Assign the RFC destination which was created for Manual mode earlier (P73_AAE_MANUAL)
section 2.b to sender port (tcode we21) in sender R/3 System
Assign the sender channel (IDoc_AAE_Sender_Manual) which was created earlier in integrated
configuration.
20
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Follow the same testing steps to trigger the IDoc from sender R/3 system via WE19 which was done
previously for Default Mode.
3. Testing IDoc to File scenario with sender adapter in From NWA Option.
Assign the RFC Destination which has been created earlier in section 1.b for the sender port (WE21)
in sender R/3 system.
Assign the Sender channel (IDoc_AAE_NWA) created earlier for sender communication channel in
integrated configuration.
Follow the steps for trigger the IDoc via WE19 tcode from sender R/3 system as done before for
Default mode.
4. Testing File to IDoc scenario with receiver adapter in Default (Recommend) Option.
21
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
22
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Inbound IDoc has been received at target system. However additional data need to be maintained in
target system for successful IDoc processing.
23
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
24
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Similarly, we can test for communication channel IDoc_Receiver_NWA which has been configured with
From NWA Option.
25
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Select tab message monitor and enter the filter criteria for Inbound or Outbound IDocs.
If any changes have been done in the IDoc structure, IDoc metadata can be reloaded via Metadata
Monitor Tab.
26
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
MaxReaderThreadCount : IDoc works on the SAPJRA and JCo 3 model. SAPJRA application
instance allows idoc adapter to receive iDoc messages (sender adapter).The number of Reader
threads or parallel server connections registered to the gateway can be configured in the Resource
adapter.The property is called MaxReaderThreadCount. Set MaxReaderThreadCount value between
5 – 10, Default value is 10 and is the highest which is recommended to this property.
Local : To improve performance and tie the Lifecycle of gateway with that of Adapter engine it is
possible to use local gateway. There is local gateway available with Adapter engine installation.For
this you need to set the 'Local' property to true. However if you do this at SAP Backend side too the
same gateway needs to be chosen. In SM59 transaction you have to enter local gateway details
manually. If 'Local' property is chosen, the GatewayServer and GatewayService configured in
inboundRA has no significance.Also please remember to set Local property to false if you don't wish
to use Local gateway.
Binding Key : It is binding key used to activate IDoc message listener and constant value
‘PI_AAE_IDOC’ has to be maintained for this property.
27
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Default (Recommended):
Default mode in sender communication channel can be used to receive IDoc from multiple senders.
No requirement of the PI Integration Developer Role for administration of the connection details. And
therefore ideal configuration for long term operational maintenance of the IDOC connection.
Basis administrator role is required for maintenance of the connection parameters. The PI integration
developer testing phase requires pre configuration activities by BASIS Administrator.
Uses logical destination which allow reuse of connection data. Connection can be shared between
multiple R/3 systems . However it may not give good isolation as we have multiple R/3 systems are
reusing same set of inbound connections.
Ideally to be used with PI Gateway (in InboundRA resource adapter), this reduces the chances of
Gateway related issues and reduces the channel start and stop time.
Could lead to monitoring issues as the request processing is not tied to channel lifecycle (server
connection may be started even when channel is stopped).
Manual:
Quick and easy configuration by the integration developer is enabled. No NWA Administration role is
required for configuration and is ideal during adhoc development time testing.
Operational maintenance of the connection settings on a long term operational lifecycle of the
integration scenarios requires the PI developer role.
Cannot add trace level or log level since the server connections are per ABAB Backend system.
NWA:
Flexible, can be used for error tracking as separate RAs can be created per incoming servers (trace
level and server connections can be increased).
28
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
Could lead to monitoring issues as the request processing is not tied to channel lifecycle (server
connection may be started even when channel is stopped).
NWA option can be used for communication with Non-SAP systems using Java IDoc_AAE adapter
type.
29
Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration
RELATED CONTENT
SAP Help Portal : Configuring IDoc Adapter (AAE) in the Integration Builder
SAP Help Portal : Comparison of IDoc Adapter (IE) and IDoc Adapter (AAE)
Note Details
1826256 ACK destination not available
1719180 Handling of multiple acknowledgements
1729575 Sending IDoc acknowledgements fails because of long text
1688780 IDoc AAE Adapter fails to insert empty strings in database
1795609 Multiple idoc types in single queued RFC call
1790977 Receiver IDoc_AAE adapter fails with NullPointerException
1647147 PI CTC: com.sap.aii.adapter.idoc.sapjra.inboundRA startup
1641541 Idoc adapter performance tuning
30
www.sap.com
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are
registered trademarks of Crossgate AG in Germany and other
countries. Crossgate is an SAP company.
All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.