cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter to pick a single file

Former Member
0 Kudos

The scenario is PI File adapter would pick files from a 3rd party FTP location. The 3rd party is placing files with file names using date time stamp.

The requirement is to process one file at a a time - I have mentioned the Processing Sequence as 'By Date' which means the adpater would pick the files sequentially. But I want the adapter to pick only one file at a time rather than picking all the available files in the system.

Is that possible to do?

Thanks.

Anuradha.

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi Hareekumar.

The solution you suggested seems to work very nicely. I have maintained QOS as "Exactly Once in Order" & processing Sequence as "by date".

When the QOS is maintained as EOnce in Order - it asks for a queue name - i have specified one queue name whoch I saw was earlier being used by this message (When the QOS was maintained as Exactly Once.

Is that OK? Is there any other way to determine which queue should be mentioned while specifying the sender file adapter?

Thanks.

Anuradha.

Former Member
0 Kudos

Hi Anuradha,

The easy and the best way to process files sequentially is to have the Quality of Service as "Exactly once in order". That will process the files sequentially, and gives an alert if there is any issue with the file when alert configuration is properly done for the interface.

Instead of going with BPM, this approach would be a better that I suggest.

Thanks,

Former Member
0 Kudos

Use Serialization- BPM, which will allow you to send the files in sequence.

refer to the link - http://help.sap.com/saphelp_nw2004s/helpdata/en/11/13283fd0ca8443e10000000a114084/frameset.htm

Former Member
0 Kudos

Try this approach

1) In ECC partner profile for the inbound IDOC, select "trigger by background program" so that the IDOCs are NOT posted immediately

2) In PI mapping, map the datetimestamp(pick this from the filename using dynamic configuration) to the SERIAL field in the IDOC control header.

3) Your IDOC posting function module can use the function modules in this link http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a66d6507d11d18ee90000e8366fc2/frameset.htm.

You should see the IDOCs processed based on the datetimestamp in the IDOC header field. Try it and let know if it works

Thanks

Saravana

Former Member
0 Kudos

We are using PI 7.1

As you said, PI File adapter picks up ALL files which have the same name (as mentioned in the file name section of the adapter). In this case we are receiving PO change information from vendor - the reason is we can receive multiple PO changes from the vendor at the same time, on the same PO. We need to process the file sequentially so that the old changes dont overwrite the new ones. That is the reason we are using file processing sequence as "By date" & the Processing mode as "Delete". But even then, if there are multiple files on the same PO, PI would pick both @ the same time and try to process (using idocs in ECC, in this case). This might lead to a locking issue of the same PO in ECC and the changes not getting updated in the system.

Hence we want PI file adapter to pick one file @ one time.

Thanks.

Anuradha.

Former Member
0 Kudos

The sequence 'By Date' is effective only in NFS mode. With FTP protocol, the files are always processed in ascending alphabetical order. So, you need to have a suitable file naming to process the files in sequence.

Use EOIO QOS to achive sequencial processing in PI.

if there are multiple files on the same PO, PI would pick both @ the same time .

This is the default behaviour of file adapter with FTP protocol. You can try the approach Basker has mentioned.

Once the files are picked,you cannot delay (wait) message processing in PI without BPM.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Anuradha,

Could you please kindly provide answers to the queries below so that forum members can have a clear picture of your requirement

1. What is the operating system of your PI server?

2. What is the version of PI you are working on?

3. What exactly do you mean by statement " I want the adapter to pick only one file at a time rather than picking all the available files in the system." since adapter will actually pick up files one by one only in each polling interval. This goes in PI pipeline

one after another in quick succession.

4. Do you mean that you want to insert delays between successive file pick up then Baskar has already answered your question.

5. Do you want the channel to pick up only one file in a day out of all possible file?

6. Could you please kindly provide any sample file name you are receiving in PI ?

regards

Anupam

former_member194786
Active Contributor
0 Kudos

Hi Anuradha,

By default PI picks all the files that match the naming convention in a particulat folder. could you please explain your requirement in detail, as to why you want the file adapter to poll only file in at once?

Regards,

Sanjeev.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Is that possible to do?

use Parameter Processing Sequence = Date ( This is for processing order) and

use parameter "Msecs to Wait" and set some value in the advanced tab. This way you can do processing one at a time and sequentially.

Former Member
0 Kudos

I can only give you an idea. You could try using an OS script in the file sender channel to do `ls -l | tail -1` before a message is created.