on 10-23-2013 8:59 AM
Hi EveryBody,
I have a requirement as below.
I will receive two files one is header and detail. I need to merge the two files into one file.
Please help me out in designing the scenario.
Thanks,
Lalitha
Thnak you All for the responses.
We have solved it by running the .bat file at Customer end.
The Customer who will be sending Two files will get merged at his end and come to the target location now..
So the problem is solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lalitha,
Check Michael reply from the below blog, this should solve your merging issue.
http://scn.sap.com/thread/1634635
Regards,
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lalitha,
It can be possible by script (perl etc) at FTP level.
Regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lalitha,
1. Files can be merged by running an OS command from file sender channel but disadvantage is both the files should be available at the time of execution of command.
2. Using an adapter module
Using BPM we have better file handling, alerting in case errors.
Regards,
Pranav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi lalitha,
I have another approch
if you can schedule your header file scenario before item file scenario means & and your header file name & item file name have some uniqueness
You can to create to two scenario
first :
which pick all header files:
for ex.
header111.csv
header222.csv
header333.csv
and place the file in receiver folder
with dynamic configuration you can name the file like below"
order111.csv
order222.csv
order333.csv
Now in the second scenario
which pick the items files like:
item111.csv
item222.csv
item333.csv
you can use append mode to write below the same file
for name of the file again you can go for dynamic config and set the file name as below again:
order111.csv
order222.csv
order333.csv
& change the file construction mode to append so it will append below the header file
for schedule the CC you can use ATP.
hope this help:
Regards
gAgan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lalitha,
This is not possible without BPM.
The reasons are
1. How will you control which file will be read first, in case files are put into source directory at different times?
2. How will you make the scenario wait while second file is being read by the sender comm channel?
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laitha,
You can run a .bat file which will do the following things
1. wait until there are two files in the directory
2. merge them
3. put them in a directory from where PI picks it up.
This bat file must be scheduled as os level by the admin/basis team to run at specific interval.
You cannot try this in file adapter level . Suppose you execute a BAT file in run OS command before message processing. The batch gets executed when the file adapter has found a file for processing , after batch file executes then again the channel continues to process the file it picked up for processing initially.
According to your requirement you need to merge files before picking up which is not happening in this case.
Regards
Anupam
User | Count |
---|---|
91 | |
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.