cancel
Showing results for 
Search instead for 
Did you mean: 

One source folder to multiple folders

Former Member
0 Kudos

Hi,

Is there any way to send one file from one folder to multiple folders with different file names; with just one receiver agreement.

this is just a pass-through no mapping.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Prema,

                I think this is not possible if you are not using scripts too. In fact if you use scripts, you do not need SAP-PI also (to transfer files). Scripts are enough to meet all your requirements here. If you want to manage this through PI , bring in a mapping in your scenario and generate different filename,target directory name using ASMA or variaable substitution.

Then one receiver agreement is enough.

Please check these links for more on this

http://scn.sap.com/community/pi-and-soa-middleware/blog/2009/03/26/dynamic-configuration-vs-variable...

http://scn.sap.com/people/pavan.kumar110/blog/2009/08/05/processing-multiple-files-in-source-system-...

http://scn.sap.com/people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi...

Regards

Anupam

Former Member
0 Kudos

Hi,

       Dynamic filename with ASMA will not work in this case as it can only store a single value.

Only option here would be to use post processing scripts if you are using only one receiver agreement.

Regards

anupam_ghosh2
Active Contributor
0 Kudos

Hi Shiladitya,

                     agreed, ASMA or variable substitution is not going to help here.

Hi Prema,

             Either you use scripts or use java mapping to write files directly to the folders using FTP.

Check this thread http://scn.sap.com/thread/1569382

Please ignore my previous response. Shiladitya is right.

ASMA can help you set filename dynamically but can hold only 1 filename.

Regards

Anupam

Former Member
0 Kudos

thanks Anupam, I think Variable substitution should work here. I did that once.
but I want to avoid mapping as well.. and make just pass through.. this is much common and required scenario.. there should be some way to do this. one file to multi files without mapping, without script..

baskar_gopalakrishnan2
Active Contributor
0 Kudos

> there should be some way to do this. one file to multi files without mapping, without script..

IMO, there is no standard way to handle this requirement without mapping like UDF or shell scripts.

rajasekhar_reddy14
Active Contributor
0 Kudos

if you are thinking to avoind Mapping.Scripts then think about avoid PI also in this case,.

one file you can copy in two folders without mapping/scripts by specifying archive direcory as a secondory directory but limitaion is you can change file name.

Former Member
0 Kudos

Raja, this is not for one folder,one file; but for 10 different folders with 10 different file names. in this case archive doesn't help me.

Former Member
0 Kudos

Hi,

Standard unix commands like copy(cp) or move(mv) doesnot give the flexibility.

http://www.cse.ohio-state.edu/sce/reference/unix/common_commands.html

writing a Scripts and calling it in the command line looks as a viable option

Thanks,

Sudhansu

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Receiver agreement corresponds to single receiver channel. Since your channel can address single file name, you can create script and Run OS command after file processing. In the script you can specify the folder names and filenames for each folder accordingly. You can default to single folder and file name in the channel.

Former Member
0 Kudos

thanks Baskar; but I want to avoid script as well. thanks