on 07-08-2014 11:16 AM
Dear experts,
I am facing an issue while implementing java mapping to split flat file.
scenario:
3rd party is sending IDoc flat file(may containing multiple IDocs) to PI and PI is implementing IDocFlatToXML module to convert it to XML for further processing, since the module can only convert flat file containing only one IDoc. so we have to split the flat file as per the number of IDocs contained.
I am implementing Java mapping for split function, and the java mapping has been tested locally successfully(IDE:eclipse), the split function is working fine and multiple flat IDoc files generated as expected.
However, when I imported the java map in PI, I can only see one(the last IDoc in the original flat file) file generated, the first IDocs files are generated as well but they are empty files... if anyone has any suggestion thanks a lot..
Hi Hailong,
I hope you have used multi-mapping concept in your java mapping code. Better share your java code with a sample input flat file.
Regards,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Praveen,
I have coded the wring steps in java mapping - some specific condition is met then the previous read lines would be written to a new file..
I tested the java map again today, and found it was working fine now...
But there seems to be a small issue still, when I was refreshing the folder(al11) where the splited file would be written, the first 2 files were empty(with 0 bytes as length), and after 1 second refreshing again, they became filled... so I set "Msecs to Wait before modificationc check" to 6s with the sender channel which will pick these files, it is working properly as far as now.
Hi PT,
Each flat IDoc should be started with control record like "EDI_DC40", which can be used as indicator of a new IDoc.
In our case, 2 rounds processing is implemented:
round 1: pick original file and split into single flat IDocs and write them to the same folder with different suffix.
round 2: pick single flat IDoc for conversion and further processing.
One more thing you need to check before pushing flat IDoc to IDocFlatToXML module is whether the line number and hierarchical information of each segment is provided in the flat IDoc (approximately stored in character 50-65 each line of flat IDoc).
Regards,
Hailong
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.