The first and foremost thing, which we need to consider in any EAI design, is to figure out how many adapters are required at the inbound and outbound of the integration pipeline. Though we are used to design one adapter per interface it is always better to design appropriate number of adapters based on volumetric. Part of our implementation in SAP XI comprises of pumping the incoming files as Idocs into SAP IS-U. We have 80 file structures, which have to be pumped as 80 Idoc types. Considering the volumetric we have designed 3 file adapters to handle around 27 different files.
Due to this design we had the following advantages:
1.A common Message Interface for receiving any file implies that one data type and message type instead of 27 inbound Message Interfaces, Message Types and Data Types.
2.One Communication Channel in Integration Directory(ID) instead of configuring 27 Communication Channels and One Sender Agreement instead of configuring 27 Sender Agreements.
3.It is relatively easy to change the interfaces for us due to the re-usability of components. For Ex: Suddenly in the midst of our project the FTP server password got blocked. We have changed the server password in only 3 communication channels.
4.We have configured the common components of the Integartion Repository(IR) in a generic name spaces (urn:xi:generic) and common objects of ID in a single scenario like Generic_Scenario. By doing this we are able to achieve easy sustenance.
However this design might have serious disadvantage of performance bottleneck if the number of adapters are not designed properly. Ex: We have a file which might contain 1 million records and we designed a specific file adapter only for that interface.
Sender File Adapter CC Configuration:
Since the incoming files are in CSV format we configured generic file adapter as shown below.
Communication Channel: MET_FILE_IN1
Message Type : MT_MET_GEN
We also created a common message type as shown below for receiving any file structure.
Sample File:
File generated after CC:
I recommend reading the blog SAP XI IN ACTION-1 to understand the design full pledged. We found this approach is really helpful for our project and thought I will publish it on sdn. Based on this approach we developed common java mapping modules for validation and converting flat structure to hierarchical structure. By implementing the generic approach developing new interfaces became a cake walk for our team members.