The new IDoc Adapter IDoc_AAE is part of the advanced adapter engine and is a java implementation that does not use ABAP services. The configuration for the IDoc_AAE adapter is different when compared to the IDoc Adapter (ABAP Stack).
Check here for PI Dual-Stack IDoc Adapter configurations(NW7.0)
Sender IDoc Adapter Configuration is to establish a technical connection from the R/3 system to the PI/PO system for sending the IDOCs from the R/3 into PI/PO. The connectivity is established using RFC technology.
The following options are available.
- Default (recommended)
- From NWA
Note: configurations in R/3 system related to the creation of Partner Profiles (WE20), Ports (WE21) will not be discussed in detail as part of this Blog
- 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 acknowledgment 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, an 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.
- Default (Recommended) option in the sender communication channel
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 Step-1
- The destination maintenance step enables the IDOC adapter to create an RFC connection internally for the 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 acknowledgment 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 Step-2
- 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 Step-3
- The creation of the RFC destination in the R/3 system is described in section Step-5
The PI System can be configured with an RFC destination to specify the content of the RFC connection parameters. The PI channel can refer to the
RFC destination in the NWA.
Step-1: Creating Default Destination in NWA
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. in our case we need to create XI_IDOC_DEFAULT_DESTINATION
Open NWA (http://<host>:<port>/nwa) ->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.
Step-2: Create RFC destination in NWA for Backend System (Optional).
Create RFC destination with XI_IDOC_DEFAULT_DESTINATION_S11<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 acknowledgments in this case naming pattern is not mandatory.
Step-3: Configuring the resource adapter inboundRA.
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.
Select Resource Adapters from show drop-down list
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.Program ID can be arbitrary but must be unique name for the used gateway
– Set MaxReaderThreadCount value between 5 – 10 (Default value is 10)
– Destination Name as XI_IDOC_DEFAULT_DESTINATION
– Set Local as true.
– Set BindingKey as PI_AAE_IDOC
– Save changes.
Note : If Local is set to false then default Gateway server and Gateway service of PI system need to be provided while configuring inboundRA.
Step-4: Sender Communication Channel with IDoc_AAE Adapter type.
Create a communication channel in Integration Directory (In this guide it is IDoc_AAE_Default) as shown below. (Note: The required business systems should be already imported into integration directory from SLD)
– Select Adapter Type as IDoc_AAE
– Select Default (Recommended) option in RFC Server Parameters.
Step-5: Configuring RFC Destination in Sender R/3 system.
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 Step-3
Click on connection test to ensure connection is successful with the details specified in RFC Destination
2. Manual Option in the 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-2
Step-1: 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.
Provide unique Program ID (in our case it is XI_IDOC_DEFAULT_MANUAL) as shown in below screen shot. This Program ID will be used later while configuring RFC Destination in sender R/3 system.
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.
Step-2: Configuring RFC Destination in sender R/3 system
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 SAP_XI_MANUAL_TEST)
- 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.
3. From NWA option in the Sender communication channel.
The mode is very similar to the default mode and offers the 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.
- RFC destination need to be created in the R/3 system.
a. Create a Custom Resource adapter.
Create a custom resource adapter in NWA. Go to NWA -> Configuration -> Infrastructure -> Application Resources. Click Button Create New Resource -> Select New Resource Adapter
Select Template as ‘com.sap.aii.adapter.idoc.raclonetemplateRAR’ & Enter a name for Application and click Next
Enter JNDI Name example S11CLNT100_RA
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 S11CLNT100_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 S11CLNT100_RA.
b.RFC destination in the Sender ERP system.
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 S11CLNT100_RA