cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI - Automatically move file not polled by sender comm channel to a different directory

Former Member
0 Kudos

Hi All,

We've set a 50MB file size limit in all our File Sender Communication Channels. Files with 50MB or greater than will not be picked up by the channels.

We wanted to check if there are ways on how we can automatically remove/move the file from the source directory to a different directory/folder so that this will not block other messages from being processed.

Our PI is running in Unix.

Let us know your thoughts on this.

Thanks,

Hirobyn

Accepted Solutions (0)

Answers (2)

Answers (2)

apu_das2
Active Contributor
0 Kudos

Hi Evgeniy,

How did you configure your Sender File CC to ensure that it will pick files of less than 50 MB only. Did you use modification check or what.

If you have used OS command to do that in before processing section then you can add logic to delete or archice file in different location when file size is >= 50 MB. But OS command will work only for NFS.

Second option is you can write some custom adapter module to do that.

Third option, write some standalone java program/ shell script and schedule it separately as per your requirement which will periodically check the files of the folder and delete/archive >=50 MB files.

Thanks,

Apu

Former Member
0 Kudos

Hi Apu,

Thanks for your input!

We've set the 50MB file size limit on the advance parameter.

There's a total of 136 file sender comm channels with different source directory. Based on the given options, what could be applicable and feasible on the scenario that we had.

Let us know your thoughts.

Cheers,

Hirobyn

turmoll
Active Contributor
0 Kudos

Hirobyn,

Did you check/tried option " Archive Faulty Source Files" ?

/k

apu_das2
Active Contributor
0 Kudos

Hi Hirobyn,

From where are you trying to poll the files. If it is from NFS then only you can opt from OS command. If it is from FTP/SFTP then OS command will not work and you can go for custom adapter module.

There is another option - You can put an routing condition using Context object Source File Size in Receiver Determination -

Thanks,

Apu

Former Member
0 Kudos

Hi Apu,

Files were polled or picked up in the Unix source directory.

Just a quick question, since files greater than 50MB will not be polled by the comm channel and will stay in the Unix source directory. Will this block other smaller messages that passed through the same comm channel from being processed?

Thanks,

Hirobyn

nitindeshpande
Active Contributor
0 Kudos

Hi Hirobyn,

This wont block the other files with size lesser than 50 MB, they will pass through in an expected manner.

Regards,

Nitin

apu_das2
Active Contributor
0 Kudos

Hi,

This will not block rest of your files.

Thanks,

Apu

former_member190293
Active Contributor
0 Kudos

Hi Hirobyn!

Try to use option "OS command after file processing" in your file sender adapter for that.

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgeniy,

Seems like we can't use the OS command as it only works for NFS. We've set the 50MB file size limit on the advance parameter.

There's a total of 136 file sender comm channels with different source directory.

Let us know your thoughts.

Cheers,

Hirobyn