Resources for IT Professionals >
Forums Home
>
BizTalk Server Forums
>
BizTalk Server General
>
Need help to split flat file
Need help to split flat file
- Hello All,
I have just realised that, I need to create a separate file for every message and transform and send through Send port to SAP .As SAP accepts one file as one idoc.
File comes like below:
Service Provider: OGVG.DK-BLUEWATERMARINE Invoice Number: TEST4 Invoice Date: 02-SEP-2009 Request For Invoice Number: RFI-562 Amount: 50 Amount Liable To VAT: 0 Amount Tax-free: 50 VAT Rate: Currency: NOK Plant: NOR01 Invoice Id: SERVPROV.20090902-0004 Due Date: 10-SEP-2009
Project: 123 Buy Shipment: OGVG.0110757 Buy Shipment Type: STANDARD Original Buy Shipment: Amount: 33.33
Project: 124 Buy Shipment: OGVG.0110757 Buy Shipment Type: STANDARD Original Buy Shipment: Amount: 16.67 ----------------Messsage-1 should create 1 file
Service Provider: OGVG.DK-BLUEWATERMARINE Invoice Number: TEST5 Invoice Date: 02-SEP-2009 Request For Invoice Number: RFI-563 Amount: 150 Amount Liable To VAT: 18 Amount Tax-free: 132 VAT Rate: 25 Currency: EUR Plant: NOR01 Invoice Id: SERVPROV.20090902-0005 Due Date: 13-SEP-2009
Project: 123 Buy Shipment: OGVG.0110757 Buy Shipment Type: STANDARD Original Buy Shipment: Amount: 100
Project: 124 Buy Shipment: OGVG.0110757 Buy Shipment Type: STANDARD Original Buy Shipment: Amount: 50 -----------------Messsage-2 should create 1 file
Service Provider: OGVG.KN Invoice Number: TEST-RFI-701 Invoice Date: 23-SEP-2009 Request For Invoice Number: RFI-701 Amount: 100 Amount Liable To VAT: 0 Amount Tax-free: 100 VAT Rate: Currency: EUR Plant: NOR01 Invoice Id: SERVPROV.20090923-0001 Due Date: 24-SEP-2009
Project: 12345 Buy Shipment: OGVG.0110800 Buy Shipment Type: STANDARD Original Buy Shipment: Amount: 100
Project: 12345 Buy Shipment: SERVPROV.0100033 Buy Shipment Type: SECONDARY CHARGE Original Buy Shipment: OGVG.0110800 Amount: 100------Messsage-3 should create 1 file
AND so on..........................
I need your help to split this file as many as Service Provider comes in input file.Please provide if some documentation/reference solution available with you or over web.
Thanks for help for supporting me in advance,
Bhupal.
Answers
- Hi,
Please go through the below link:
http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx
Regards,
Abhijit
Abhijit Mahato Please "Mark as Answer" if Post has Answered the Question- Marked As Answer byVisitBhupal Wednesday, November 04, 2009 12:05 PM
- You should first create a flat file schema from the FF Wizard. Then create a custom pipeline with dissassembler component in the disassemble stage.
You can debatch each record for a service provider and map the input schema to the output schema message in a map and send this message to SAP. You have to create a new schema for holding a single record. Debatch the original xml file in the orchestration and loop through each record. Assign each record to a new message of type of newly created schema for each record. Use transform shape in the loop and send the message through send port.
Abdul Rafay http://abdulrafaysbiztalk.wordpress.com/ Please mark this as answer if it helps- Marked As Answer byVisitBhupal Wednesday, November 04, 2009 12:05 PM
All Replies
- Hi,
Please go through the below link:
http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx
Regards,
Abhijit
Abhijit Mahato Please "Mark as Answer" if Post has Answered the Question- Marked As Answer byVisitBhupal Wednesday, November 04, 2009 12:05 PM
- You should first create a flat file schema from the FF Wizard. Then create a custom pipeline with dissassembler component in the disassemble stage.
You can debatch each record for a service provider and map the input schema to the output schema message in a map and send this message to SAP. You have to create a new schema for holding a single record. Debatch the original xml file in the orchestration and loop through each record. Assign each record to a new message of type of newly created schema for each record. Use transform shape in the loop and send the message through send port.
Abdul Rafay http://abdulrafaysbiztalk.wordpress.com/ Please mark this as answer if it helps- Marked As Answer byVisitBhupal Wednesday, November 04, 2009 12:05 PM
Thanks Abdul and Abhijit. I could able to split the file by adopting your ideas/suggestions.
Thanks,
Bhupal.

