on 07-26-2016 7:36 AM
Hello Everyone,
I have one unique requirement. Payroll response files from Bank will be dropped in one of the file servers, from this file server, the files need to be merged and then mapped to a standard proxy in ECC.
There will be 2 files coming from Bank and these files must be merged and mapped to the proxy structure. Below will be the filename pattern and along with these there will be other files too in the folder and only these two files need to be merged and mapped to the proxy -
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber
The filename differs based on the things marked in bold. Other than those the filenames are same for both of them. Additional files, will not be helpful as it needs the exact filename, due to SNLsomeRandomNumber, the file extension also becomes unique.
Another issue is, the folder where the above files will be present will consist of other files too, which needs to be merged.
For example - The folder file can consist of below files -
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.A300000.4000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S300000.4001.FILEACT.PRRES.SNLsomeRandomNumber
And my requirement is to merge only the specific two files based on the payment number, in the above example files the payment number is 100000, 200000, 300000
So in the output, i have these files to be merged separately -
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file
Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file
Company.OSP.A300000.4000.FILEACT.PRRES.SNLsomeRandomNumber / Company.OSP.S300000.4001.FILEACT.PRRES.SNLsomeRandomNumber - To be merged as One file
Kindly help me out on how to achieve this, completely stuck up with this issue.
Regards,
Nitin
Hi Nitin,
For file merging anyhow you need to use simple BPM merge pattern using a Fork of 2 lines.
Now the question is how will your channel will pick files as per your requirement -
1. You can write some OS command in the before file processing section of the File sender CC to pick the files as per your requirement. But this will only work if you are using NFS.
2. If there is any particular filed in the file data where payment no is mentioned then you can put some logic in the MM to merge accordingly. But seems to be not possible.
3. Use custom module as per your requirement.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Apu,
Client is on SAP PI 7.4 Dual stack system, so i do not want to use ccBPM just for this requirement.
Once i pick the relevant files, then merging can be done using different methods. The problem is in picking the files itself.
Apu what is the OS command which can be helpful for me here? I guess even the OS commands needs to have the logic to be setup.
I need to first read the file name, then use that filename and pick corresponding file as Raghu suggested. But can we do this without BPM?
Also to add to the complexity, i have 2 extra files, per file which are currently being excluded using the exclusion mask
The source folder looks as below actually -
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber.ok
Company.OSP.A100000.2000.FILEACT.PRRES.SNLsomeRandomNumber.par
Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber.ok
Company.OSP.S100000.2001.FILEACT.PRRES.SNLsomeRandomNumber.par
Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber.ok
Company.OSP.A200000.3000.FILEACT.PRRES.SNLsomeRandomNumber.par
Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber
Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber.ok
Company.OSP.S200000.3001.FILEACT.PRRES.SNLsomeRandomNumber.par
Regards,
Nitin
Hi Nitin,
You need to write some bash / shell script with logic to fulfill your requirement and call it from sender CC. But as I mentioned this will only work for NFS.
And for file merging I am not sure which technique will you adapt apart from ccBPM. Only 1:n multimapping is possible without BPM n:1 is not possible.
Thanks,
Apu
Hi Apu,
Thanks for your reply. I am aware we can use script only with NFS.
Unfortunately i am not readily getting the script for my requirement.
Yes you are right, for merging we can go for ccBPM, as additional files option will not work. Or a java mapping to read the files based on the file name, after the files have been picked up from the source folder and dropped into a temp folder.
Currently i don't have this requirement of merging. Found out something in ECC, which accepts the input without merging.
Thank you very much for your replies.
Regards,
Nitin
Hi Nitin,
What will be the output file name after you merge two such files. For example if you manage to merge these two files
what will be the output file name .
Company.OSP.A100000.2000.FILEACT.PRRES.SNL1234569812
and
Company.OSP.S100000.2001.FILEACT.PRRES.SNL13678890456
what will be the output file name .
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A ccBPM with some unique (to both types) identifier in the message payload can be implemented.
a.k.a Aggregator integration pattern.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nitin,
Why cant you try by passing the scenario.
If you have limited payment orders
Pick the file based on the filename place each of the orders in separate folder and append the files.
Then process it from ter to a proxy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.