on 03-26-2012 2:04 PM
Hi guys,
I am working on a file to Idoc scenario and I am configuring the file adapter on the sender communication channel side. The outbound file will be a txt flat file that will have one Header and several Line Items. However, the tricky part will be that each field will be in a separate line for both header and item fields and there are no key fields available. I specified Header.fieldNames/Line.fieldNames for the number of fields and Header.fieldSeparator/Line.fieldSeparator='nl' and in the Recordset Structure I am using Header,1,Line 9999 and I have specified Line.missingLastfields=ignore, in order to overcome the missing keyfield issue. However, when I am using a test file I get a Header record with only the first field filled and several Line segments with only the first field filled again. Do you have any ideas?
Thank you.
Hi,
Are you also using 'nl' as the endSeparator? I have noticed recently that PI has difficulties with such scenarios, where fieldSeparator and endSeparator are equal for some structure. It simply cannot differentiate whether it is an end separator or field separator.
Can you influence the way your source file is built, to change the field or end separator? If not, then you might have to search for some workaround, like writing your own adapter module, or making each field a separate structure, then mapping accordingly.
Hope this helps,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By not specifying field end separtor you treat both field separtor and end separtor for header and line items same. This is a issue. You can create seperate structure for every field provided only if you know the data pattern that arrives in the flat file is same for header fields and item fields and their occurences. Or Write some Java program or some source to make the data that is feasible for PI content conversion to handle.
Hi Greg,
The structure of the flat txt file is 1 Header and several Item segments. Each field either Header or Item will be in a separate line, and there will be no special character to differentiate berween Header and Item segments. However, the number of Header and Item segments will be fixed, i.e. always the same, even if a field is missing, there will be a blank line. The FCC parameters that I am using are the following:
Recordset Structure = Header,1,Line,9999 I am applying some sort of trick here in order to overcome the missing keyfields.
ignoreRecordsetName true
Header.fieldNames PharmacyName,VATNumber,PharmacyCode,OrderNumber,Version
Header.fieldSeparator 'nl'
Line.fieldNames PharmacyItemCode,AgentItemCode,PapaellinasItemCode,Barcode,ItemDescription,Packing,SalesPrice,DiscountAmount,VATAmount,OrderedQuantity,RetailPrice
Line.fieldSeparator 'nl'
Line.missingLastfields ignore
However, when I am testing that, it always picks up the first field from Header and creates several Item segments containing only the first field with each value found in the file after the first, i.e. it ignores the rest Header and Item fieldnames.
Best Regards,
Evaggelos Gkatzios
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.