cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Directory paths

former_member188961
Participant
0 Kudos

Hi,

We have requirement that PI need to send the file to multiple Target Directory paths in one FTP server.

Instead of creating multiple Receiver Communication channels is there any other ways to achieve it..?

Please Suggest.

Thanks,

Srikanth

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Srikanth,

I have achieved your requirement using the following Wiki:

http://wiki.sdn.sap.com/wiki/display/XI/Dynamic+file+name+for+pass-through+scenario

Create Dummy Objects in ESR as required. Create the JAVA mapping where you will have to write maybe Switch Case or Else If - whichever is comfortable and select the Directory as required for the receiver.

The only change in case of Directory Routing is on the line:

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");

The above line should be replaced by

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");

On Receiver Side, the directory should be kept as *.

The overall scenario still remains passthrough. You can pass any kind of file depending on your requirement.


Thanks & Regards,

Tejas Bisen


Former Member
0 Kudos

HI Srikanth,

you can use shell script to move the files to FTP location. for your requirement , there is no standard option in PI, so try with shell script

Cheers

Hidayat

naveen_chichili
Active Contributor
0 Kudos

Hi Srikanth,

You can write a unix script and send it to as many folder you want.

Thanks,

Naveen

former_member188961
Participant
0 Kudos

Hi,

Thanks for all your replies.

We have some limitations and challenges by using the unix script or Value mapping.

--> By using Unix Script we can move the files to NFS folders only not FTP paths(correct me if i am wrong)

-->Here i need to transfer different kind of files(.pdf , .xls etc...) to target directories. So i am not using ESR part. i am doing Bypass Scenario. So we cant do Value mapping here.

Thanks,

Srikanth

anupam_ghosh2
Active Contributor
0 Kudos

Hi Srikanth,

                      Since this is a pass through scenario you can totally ignore PI . A single script will detect presence of the source file in a directory and create copies of the same in multiple target directories using FTP. Here are list of commands you can use to write the script http://dwardmac.pitzer.edu/classes/skills/ftp/unixftp.html.

   I guess your source server has UNIX/Linux OS for windows OS you need to use different command

http://www.nsftools.com/tips/MSFTP.htm. The script will be scheduled by basis team to run t specific times of the day to check for files and transfer the same.

Regards

Anupam

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can try using multi-mapping with variable substitution or a unix script after message processing.

Regards,

Mark

Former Member
Former Member
0 Kudos
former_member188961
Participant
0 Kudos

Hi Amit,

Thanks for your Reply.

here i need to send source file to multiple directory paths(almost 100 folders) not in 2 paths. i have tried in adapter module but i am able to sent to only one FTP directory.

Thanks,

Srikanth

Former Member
0 Kudos

Hello,

You have to alter the code to send the messages to multiple paths, anywayz 1000 folders - certainly a big number...

May be u can try Marks' suggestion...

Thanks

Amit Srivastava