Configuring Java IDoc Adapter (IDoc - AAE) in Process Integration
Configuring Java IDoc Adapter (IDoc - AAE) in Process Integration
Configuring Java IDoc Adapter (IDoc - AAE) in Process Integration
Process Integration
Author
Company
: Syed Umar
: SAP Labs India Pvt.Ltd
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
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.
Required Business systems need to be imported in Integration directory of PI from SLD.
Configuration
Infrastructure
Destination.
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.
Results will be displayed on top of the page.
In case of errors in Ping Destination, check the system and logon details which has been
provided while creation of destination.
b. Create RFC destination in NWA for Backend System (Optional)
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.
Configuration
Infrastructure
Application
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
Click on connection test to ensure connection is successful with the details specified in RFC
Destination.
2. Manual Option in sender communication channel
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.
Create Sender Communication channel (in this guide it is IDoc_AAE_Sender_Manual) in Integration
directory
Select Adapter Type IDoc_AAE and select RFC Server Parameters as Manual.
10
11
12
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
Create a communication channel (In this guide it is IDoc_AAE_NWA) in Integration Directory
as per below screen shot.
- Select Adapter type IDoc_AAE.
- 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
14
15
Configuration
Infrastructure
Application
From the drop down list select JCA Resources and filter for outboundRA.
16
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
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
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
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
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.
Create a Sender File Channel (File_IDoc_Sender) in Integration Directory, Create integrated
configuration with sender file channel and IDoc_Receiver_Default (Default Mode which was created
earlier) in Outbound processing tab for receiver channel.
21
22
Inbound IDoc has been received at target system. However additional data need to be maintained in
target system for successful IDoc processing.
23
24
Similarly, we can test for communication channel IDoc_Receiver_NWA which has been configured with
From NWA Option.
25
Monitoring
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
27
Default (Recommended):
Default mode in sender communication channel can be used to receive IDoc from multiple senders.
Channel configuration is simple compared to manual mode as no authentication parameters are
maintained in the channel.
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.
Manual option can be used for test purpose.
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:
NWA Option can be used if there are numerous senders/receivers to be configured
Simple Configuration. No maintenance of authentication parameters in the channel.
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
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
RELATED CONTENT
SAP Help Portal
Wiki Link
Details
ACK destination not available
Handling of multiple acknowledgements
Sending IDoc acknowledgements fails because of long text
IDoc AAE Adapter fails to insert empty strings in database
Multiple idoc types in single queued RFC call
Receiver IDoc_AAE adapter fails with NullPointerException
PI CTC: com.sap.aii.adapter.idoc.sapjra.inboundRA startup
Idoc adapter performance tuning
30
www.sap.com