Hi Guys,
Need help with FF to XML mapping.
I have got a fixed length flat file with below details:
FH (File header - Occurs once)
BH (Batch header - file can have multiple BH/BT group)
DT(Detail line - One BH/BT group can have multiple detail lines)
BT(Batch Trailer)
FT (Occurs once)
I need to convert it to an ISO PAIN 001 format, which roughly goes like below:
Group header (Non repetitive - This will have details from FH and FT)
PaymentInfo (Unlimited occurrences - This will have details from the BH and BT recod types)
DebtorDetila (Unlimited occurences - This will have details from teh DT record type)
I am following the below steps to accomplish it:
Created a FF schema using the the fixed length mapping and with a similarindentation as described above.
Created a PAIN001 XML document type using the PAIN001 xsd.
- Get the ff file from the source using sftp
- decompose it using the ff schema created as above in convertToValues step
- map all variables from the “convertToValues” step to the XML document type
- use documentToXMLString to create the XML string
- sftp it to the destination
This process works 100% when there is one FH-BH-DT-BT-FTblock in my incoming flat file, but it fails to
extract all values from the ff, when we have multiple BH-DT-BT blocks with a file. It will only bring back FH-BH-BT-FT details in XML dropping all DT blocks.
Do I need to run this in loop or something to get the desired output. Any help small or big will highly be
appreciated.