I have the below requirement, any inputs to achieve this will be helpful.
Every day two files(A,B) will be placed at the sametime, by the source application in its directory.
We have to design a solution in SAP PI, in such a way that the SAP PI picks up these files and FileA is always delivered first to the receiver system followed by FileB.This sequencing has to be maintained in any case.
Please give your inputs on the best possible fool proof approach to achieve this in SAP PI.
Try below apprroach,
Create one RFC function module in PI or ECC ,
1)Store file name in Function module check below blog to know the approach.
http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/06/05/how-to-handle-duplicate-files-sender-file-adapter-scenarios-in-process-integrationHow to maintain counter sequence to file name in Receiver File(FTP/NFS) scenarios
2)Defualt file name in SAP Table is NOFILE , once you run interface perform RFC look to get saved file name in SAP Table, before storing you have to write a logic in Function module like defualt value always NOFILE then if input is FILEA then save it in SAP table and process the data to target.
2)If RFC Response FILE A then process the records, if RFC response NOFILE then send record to Same folder.
NOFILE response you will get when FILE A record not processed .
I think the best solution for you is to create ccBPM ( or BPM if you are in 7.31 Java single stack) where you can collect multiple files/messages and process them in sequence.
You can follow SAP ccBPM pattern BpmPatternCollectMultiIf which you can find in the standard PI content under SAP BASIS in ESR and namespace http://sap.com/xi/XI/System/Patterns
If you are using NFS, you can refer to Mickael's blog
See solution N*1 along with EOIO in sender cc. Let me know your thoughts
Hope this helps,