Skip to Content

Configuring Generic Sender File CC Adapter

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

Generic CC parameters

Generic File format

Message Type : MT_MET_GEN

We also created a common message type as shown below for receiving any file structure.

Generic Message Type

Sample File:

SampleFile

File generated after CC:

 SampleFile 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.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Anonymous

    >> One Communication Channel in Integration Directory(ID) instead of configuring 27 Communication Channels and One Sender Agreement instead of configuring 27 Sender Agreements. /iPerformance is going to be 27 times less since 27 seperate java functions are called and extra mapping is required in truth. Having 27 Communication Channels and 27 Sender Agreements does not reduce performance. But 27 ‘services’ will be a performance issue which is not at all an issue here.

    (0) 
    1. Sravya Talanki Post author
      There are lot of difficulties in setting up that.
      First handling the nested level substructures and specfying the file CC is very complicated.
      Next specifying all the fields of idoc and handling the behaviour when files are not proper is going to be head ache.You need not insert any context etc..it is very easy with a  interface template to add just the file name and it will also be very useful when we are getting 1 file which has to be split and post as multiple idoc’s.
      We have implemented 170 interfaces and there is no much pain and any changes are handled very efficiently and every one in the team could do it very easily without any difficulty.
      I cannot exactly put all the details here.But surely you can mail me and we can talk.
      (0) 
      1. Anonymous
        >> First handling the nested level substructures and specfying the file CC is very complicated.

        Why do you say it is complicated? The input is a CSV file and the output can be a simple XSD structure and need not be complicated at all. Then the simple XSD structure can be mapped to IDoc using graphical mapping itself and no coding is required.
        I can copy the xi objects (or) even include it directly in a SWCV and reuse it!

        (0) 
        1. Sravya Talanki Post author
          Felix,
          It is not a simple file.It can have even 6 levels of nesting in the substructure and boggling your head to handle it using FILE cc parameters is going to be very compliacted and also the number of fields are not going to be less in every level of substructure.Moreover if the files does not fall to the structural specifications specified the files does not even come to sxmb_moni and we have to go to adapter level stack trace to find out what ever the errors are and mantaining 80 file adapters and checking the trace for every adapter if some files comes wrong is not going to be an easy task.
          Even I had the same debate in the team on the same when we went for the approach but later found out that it was excellent.
          I have updated my e-mail add on the business card and we can discuss in the e-mail if you want to discuss further.
          (0) 
  2. Ram Krish
    with the parametrs as given in this Blog. Hi, did you missed ROW related Paramters ?. Could you post the remaining parameters please?. I tried exactly as given in this blog and one ROW is being created under each DATA and DATA is repeated.
    (0) 
  3. Krishna Sharma Hari

    Hi Sravya,

    This blog has been really helpful to me for getting the entire flat file as an XML and I have used this technique umpteen times.

     

    Now i am faced with an issue where the source flat file has the BEL (0x07) character as the field separator. Please refer screenshot below (It is an EDI file)

    I was planning to take the entire file as one “Row” but I get the error

    An invalid XML character (Unicode: 0x7) was found in the element content of the document

     

    Hence I decided to take each data element as a “Row” , so expected XML structure would be

    <Record>

    <Row>ISA</Row>

    <Row>00</Row>

    <Row>     </Row>

    <Row>00</Row>… and so forth.

     

    Can you help me out here ?

    (0) 

Leave a Reply