cancel
Showing results for 
Search instead for 
Did you mean: 

Script for File channel before OS command

Former Member
0 Kudos

Hi Experts,

We have two files sender communication channel,one file sender channel should  pick files from NFS folder if file size is <= 1kb.Other file sender channel should pick file if file size is >1kb.

Can you please help me with unix command for the above logic.

Appreciate your help on this.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Can anyone help on this.

Appreciated.

apu_das2
Active Contributor
0 Kudos

As Evgeniy said, you can use Context Object fileSize in the Receiver Determination to handle this.

Use two Receiver BC/single one as per your requirement in Receiver Determination and use condition as per your requirement.

For one fileSize > 1kb and for one <1kb

Thanks,

Apu

former_member190293
Active Contributor
0 Kudos

Hi Mohan!

At first it worth mention that if you need to pick up file according to its size OS script won't help you much as it works not before adapter picks the file but before it's transferred to messaging system.

Why do you use two sender channels? If you have to determine receiver by the file size, you can do it in receiver determination by enabling ASMA attribute "Source file size" in sender channel and using so-called Context Object in receiver determination condition. Or what is your purpose?

Regards, Evgeniy.

Former Member
0 Kudos

I am working on EDI 850 B2B scenario.

We will can two kinds of EDI files in to same NFS folder (one file with single ISA, second file with multiple ISA).

PO can't handle both kind of files using single EDI separator sender channel. It is either support multiple ISA segment or single ISA file but not both.

If we check the ‘Receive split ISA’ option, It is working only for file with multiple ISA segments, but not for single ISA.

If we uncheck the ‘Receive split ISA’ option, It is working only for file with single ISA segment, but not for multiple ISA.

So I thought of creating two sender File channels, one for to pick single ISA (File size<=1 KB) file and with separate EDI Separate sender channel by unchecking the ‘Receive split ISA’ option. second channel to pick the multiple ISA segment (File size>1 KB) files and with separate EDI Separate sender channel by checking the ‘Receive split ISA’ option.

Any help on how to achieve this.

We have raised incident to SAP, meanwhile working on workaround in PO.