Skip to Content

For my first weblog, I will try to give an answer to a forum question: Is it possible to use the same sender File adapter for the picking up of several files by excluding some other ones.

Forum thread: 2 files in 1 communication channel

Constraints:


1. All inbound files are defined with the same structure (Message Type).
2. All inbound files are inside a same source folder.
3. We want to use only one sender communication channel

Note: Obviously a solution would be to create different folders and/or different sender Communication Channels, but it’s not the topic!

Goal:

Inside a unique folder (called MHU), we have several files with different names. Some of them must be treated by Interface “I1”, and others (e.g toto.csv) must be treated by Interface “I2”.

In this topic, we see only the side of interface “I1”. Thus our problem is to pick up files which are only needed for this interface. It’s the case for the three first files: tata_1.csv, tata_2.csv and titi.csv, but it is NOT the case of toto.csv.

What we have in our folder before our XI treatment:

image

What we have in our folder after our XI treatment:

image

All files except “toto.csv” have been picked up by XI for interface I1.

Sender Communication Channel

Create a sender communication channel by using File Content conversion (for instance). The detail of this conversion is not explained here, see existing weblogs for more details.

image

image

Note: our polling interval is equal to 10s. It’s interesting to keep it in our mind because we will find it further.

. Then choose option “Advanced Selection for Source File” and fill “File name Mask” as below.

image

With this solution N°1, inside SXI_MONITOR we have that:

image

See the StartTime: the three one are separated by 10s which correspond to our polling interval. Thus, even if just the needed files have been treated by our adapter, files have been in fact sent one by one !!

Solution N° 2: use also option “Exclusion Mask”

In this case, we use fields “Source Directory” and “File Name” as usually and thanks to option “Exclusion Mask” we specify the type of file which must not be processed by our interface I1 (e.g it’s for toto.csv file).

image

With this solution N°2, inside SXI_MONITOR we have that:

image

This times, all our needed files are sent together… and our “toto.csv” file (linked to interface I2) was never picked up.

Conclusion:


This is one of the possible cases to use option

“Advanced Selection for Source File”

, and there are probably others ways by combining both options “File Name Mask” and “Exclusion Mask”….

More details:

http://help.sap.com/saphelp_nw2004s/helpdata/en/84/e8763c997fda50e10000000a11405a/frameset.htm

To report this post you need to login first.

5 Comments

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

  1. Elad Peleg
    Hello Mickel,
    Thank you for all your help.
    I solved this problem when I Map the ftp server like all other drives in XI server.
    After that I use first option in your Blog.
    Regards
    Elad
    (0) 
  2. sandeep maurya

    Hi Mickael,Directory name is specified, File Name Mask is specified as .txt and in Exclusion Mask we have specified a and b*.<br/><br/>But we are getting an error message in Communication channel monitoring as File name, directory name is incorrect.<br/><br/>Please help me regarding the same.<br/>

    (0) 
    1. Mickael Huchet Post author

      Hi Chirag,<br/><br/>You’re right : a control is done by File Adapter on field “Source Directory” and thus even if files are sent to XI-IS (in my case), we have an error in the Communication Channel Monitoring.<br/><br/>The solution is to fill also this field “Source Directory” with the same value of others “Directory”.<br/><br/>Else according to my tests, if you specify an Exclusion Mask like “a.“, then you CANNOT use “.” inside File Name Mask. So to solve your problem, the only way I found is to specify EACH File Name Mask (c., d., e., f., etc…) and NOT to use “.“. See the picture I sent you.Mickael

      (0) 

Leave a Reply