cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple File transfer

Former Member
0 Kudos

Hi,

I have requirement to transfer file from a source to target ( no mapping) in PI 7.1.

We use Integrated Configuration (IC) to move the files.

Requirement is, at source, I have 10 diff files ( File1..File10.txt).

Out of this, only 4 files have to move to one Target 1, and in addition, all 10 has to be moved to Target 2.

End result will be 4 on Target 1 10 on Target 2.

I am planning to use multiple receiver under receiver tab but for that i have to create 10 IC, one for each file ( File1..File10)

And in the files which are going to both the target, i have to add this in receivers etc..

Is there any better way to handle this without BPM, UDF etc.

PS: i have to delete the files from source after processing so i cannot run both channels parallel..

Thxs

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Techie SAP,

                         You need not create multiple ICO's. There is something called "filename" as context object by which you can determine the receiver during run time. Please check this screen shot below

In sender channel you need to enable ASMA for filename. There is no need of ESR objects.

Regards

Anupam

Former Member
0 Kudos

Hi,

Thanks for reply. I have created the same configuration as shown below

However, when i run the interface i am getting error

Failed to deliver XI message. Reason: senderChannel 'b5a4d06c1c85310fa2b816ab90ff0b06': Catching exception calling messaging system: Receiver Determination failed for message 06342bc0-3c88-11e6-b6c1-005056b86b5e(OUTBOUND): Receiver Determination did not find any receivers at all (Software version: 3.0.16)

Also, i have 10 files on source and i am not doing anything special on sender CC, just enabling ASMA as shown and pulling *.*

My requirement is, there are 10 files on source & all 10 should go to one system B1 and out of this

only 1 should go to B2.

For this, i have done the setting in receiver to set file name but getting error. Please advice.

Thxs

Harish
Active Contributor
0 Kudos

Hi,

Please change the operator in condition editor to like below

FileName ≈

I just tested the condition and it will work with above operator.

regards,

Harish

anupam_ghosh2
Active Contributor
0 Kudos

Please use the same operator as I have used in screen shot above.

Did you mention business components of receivers in the extreme right hand column .

Please provide complete screen shot.

Please tick off "overwrite Asma namespace"

Regards

Anupam

former_member182412
Active Contributor
0 Kudos

Hi Techie,

I can see from your screen shot you are using SFTP adapter not the file adapter.

  • You are overwriting the namespace to file adapter namespace which is correct because context object which you are using is file adapter namespace.
  • Don't mention equals operator because you are using file pattern not exact name so use contains pattern operator which is already mentioned by Harish.

Regards,

Praveen.

Answers (3)

Answers (3)

apu_das2
Active Contributor
0 Kudos

Hi,

You have two options if you dont want to use custom module or ESR for your interface.

1. Create single ICO with two separate receiver (BC if your target is third party system) and in the receiver determination use Context Object fileName.

If you have some common pattern in the 4 file names you want to send to target 1 then use pattern symbol as said before like fileName ≈ abc*

If there is no common pattern among 4 filenames but fixed names then use OR operator

i.e. fileName = abc.txt OR

     fileName = def.txt  etc

For second BC use no condition as it should process all 10 files.

2. Use 2 separate ICOs

    In the 1st ICO - sender channel pick 4 files and keep processing mode Test . So it will not be archived or deleted.

   In second ICO use file Mask * to pick all files and use processing mode delete.

Thanks,

Apu

Former Member
0 Kudos

Sorry to open this again! I got the multiple files things resolved.. In addition to this, we have requirement to name each file have constant name..We are getting file with date& time etc at the end..

Please advice, using the one ICO, can i achieve this.. So for e.g my file is file1_DD_MM__YY

FIle2_DD_MM_YY

Now once i put the filename ~ logic, on the receiver side file should be dynamically named as if the name of the file is file1_* then change to File_FI01 etc.

Thxs

Former Member
0 Kudos

Hi All,

Please advice, if naming the file with constant name is possible under above scenario.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Techie SAP,

                          Naming is possible if you use a custom adapter module in receiver communication channel.The module will use adapter specific message attributes consisting of filename from sender communication channel and rename the same. All other settings will remain the same.

Please follow this wonderful blog by Rfioger Allue on renaming a file using adapter module.

You cannot use java mapping here as scenario has no ESR objects.


Regards

Anupam

former_member190293
Active Contributor
0 Kudos

Hi Techie!

For your requirement you need one ICo and extended receiver determination.

Set up your sender channel to pick up files by mask "File*_abc", store file name to ASMA and in receivers mapping use UDF to read stored file name and add receivers according to your routing condition based on it.

Regards, Evgeniy.

Harish
Active Contributor
0 Kudos

Hi,

You can achieve this with ICO if you have the consistent naming pattern of the files, for example if your source file is having the naming pattern

File1_abc

File2_abc

...........

..........

File10_abc

you can you the pattern or addition file in advanced parameter. Once the file is picked check the ASMA parameter of file name and route the file to relevant receiver based on the file name.

regards,

Harish