none
BizTalk schema generattion including Header row ?

    Question

  • Hi - I want to create a schema where it generates the output just like below.

    The output should be generated with having Header and LineItems rows on top. How can I achieve this creating schema ?

    Any advise please ?

    Invoice	Invoice Number*	Supplier Name	Supplier Number	Status	Invoice Date*	Submit For Approval?	Handling Amount	Misc Amount	Shipping Amount	Line Level Taxation*	Tax Amount	Tax Rate	Tax Code	Supplier Note	Payment Terms	Shipping Terms	Chart of Accounts*	Currency	Contract Number	Ship to Location Code	Bill To Address Location Code	Remit To Code	Original invoice number	Original invoice date	Is Credit Note	Attachment 1	Attachment 2	Attachment 3	Attachment 4	Attachment 5	Attachment 6	Attachment 7	Attachment 8	Attachment 9	Attachment 10	Service Month	Service Year	Pay Alone	Initials or DC Number	Check Code	Scheduled Payment Date
    Invoice Line	Invoice Number*	Supplier Name	Supplier Number	Line Number	Description*	Supplier Part Number	Price*	Quantity	Line Tax Amount	Line Tax Rate	Line Tax Code	Unit of Measure*	PO Number	PO Line Number	Account Name	Account Code	Billing Notes	Account Segment 1	Account Segment 2	Account Segment 3	Account Segment 4	Account Segment 5	Account Segment 6	Budget Period Name																	
    Invoice	RT-155000		1002589	approved	10/27/2016	Yes				Y							US Business Group	USD	660855	ATD01	ATD01	USD_AP-ATLANTA_ATDI																			
    Invoice Line	RT-155000		1002589	1	Fixed Monthly Lease		100		4.5			EA						01	0017	63300	10	0000	0000																		
    Invoice Line	RT-155000		1002589	2	Mileage Rate		0.5	4000	120			EA						01	0017	63300	10	0000	0000																		
    Invoice Line	RT-155000		1002589	3	Replacement Cost		75					EA						01	0017	63300	10	0000	0000																		
    Invoice Line	RT-155000		1002589	4	IFT		80					EA						01	0017	63300	10	0000	0000																		
    Invoice	RT-156000		1002589	approved	10/27/2016	Yes				Y							US Business Group	USD	660856	ATD01	ATD01	USD_AP-ATLANTA_ATDI																			
    Invoice Line	RT-156000		1002589	1	Fixed Monthly Lease		120		6.5			EA						01	0018	63300	10	0000	0000																		
    Invoice Line	RT-156000		1002589	2	Mileage Rate		0.55	3500	100			EA						01	0018	63300	10	0000	0000																		
    Invoice Line	RT-156000		1002589	3	Replacement Cost		90					EA						01	0018	63300	10	0000	0000																		
    Invoice Line	RT-156000		1002589	4	IFT		50					EA						01	0018	63300	10	0000	0000																		
    																																									
    																																									
    																																									

    Monday, February 6, 2017 6:02 PM

Answers

  • Hi,

    Refer: http://spnotepad.blogspot.in/2011/02/generating-flat-files-with-biztalk-2009.html

    http://www.snatchedmoments.com/2012/09/create-header-names-for-biztalk-flat.html

    Extract for the link above:

     I needed to define either the "Fixed" or "Default Value"  property for each element field.   But before I get into that, let me note that defining a header schema is as simple as taking a copy of your document schema and manipulating the values for Fixed or Default and ensuring that a PostFix value is defined for the child order of the root record element.  With that, your header values will print and your carriage return will push the first row of data below the column headers.  Now you're done. Well, almost.  Go back to your Send Pipeline and define the Header Schema property with the newly created Header Schema and now you can deploy and enjoy your BizTalk application.


    Rachit Sikroria (Microsoft Azure MVP)

    Wednesday, February 8, 2017 2:25 AM
    Moderator

All replies

  • Using Flat file schema wizard I created a schema, it is populating the data but the HEADERS is missing (1st 2 lines). I tried mentioning in FlatFile assembler providing the schema name in Header schema section, but it doesnt create HEADER leaving empty 2 rows.

    How can i fix this ?

    Tuesday, February 7, 2017 12:36 AM
  • this is my schema, I am not able to include Headers in the output file. I used FlatFile assembler pipeline on the send and mentioned Header property giving this schema. But that is not helping in creating Headers.

    How can I add Headers in my output file while generating with this schema, or what do I need to modify ?

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns="http://BizTalk_Server_Project1.ATDOut" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://BizTalk_Server_Project1.ATDOut" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:annotation>
        <xs:appinfo>
          <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
          <b:schemaInfo standard="Flat File" codepage="65001" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" root_reference="Root" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Root">
        <xs:annotation>
          <xs:appinfo>
            <b:recordInfo structure="delimited" child_delimiter_type="hex" child_delimiter="0xD 0xA" child_order="infix" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
          </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:annotation>
              <xs:appinfo>
                <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
              </xs:appinfo>
            </xs:annotation>
            <xs:element maxOccurs="unbounded" name="InvoiceHeader">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="positional" sequence_number="1" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element minOccurs="0" name="Invoice" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" name="InvoiceNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" name="SupplierName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" name="SupplierNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="4" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element minOccurs="0" name="Status" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="7" sequence_number="5" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="InvoiceDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="6" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SubmitForApproval" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="21" sequence_number="7" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="HandlingAmount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="8" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="aMiscAmount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="12" sequence_number="9" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ShippingAmount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="10" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LineLevelTaxation" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="21" sequence_number="11" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TaxAmt" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="11" sequence_number="12" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TaxRate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="9" sequence_number="13" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="TaxCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="9" sequence_number="14" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SupplierNote" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="15" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PaymtTerms" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="16" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ShippingTerms" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="15" sequence_number="17" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ChartOfAccounts" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="19" sequence_number="18" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Currency" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="9" sequence_number="19" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ContractNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="20" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ShipToLocationCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="22" sequence_number="21" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="BillToLocationCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="30" sequence_number="22" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="RemitToCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="23" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OrginalInvoiceNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="24" sequence_number="24" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="OriginalInvoiceDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="22" sequence_number="25" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="IsCreditNote" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="15" sequence_number="26" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="27" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_2_x0020_" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="28" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_3_x0020_" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="29" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_4" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="30" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_5" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="31" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_6" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="32" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_7" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="33" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_8" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="34" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_9" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="35" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Attachment_x0020_10" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="36" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Service_x0020_Month" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="37" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Service_x0020_Year" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="38" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PayAlone" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="39" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="InitialsOrDCNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="22" sequence_number="40" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="CheckCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="11" sequence_number="41" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="ScheduledPaymtDate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="22" sequence_number="42" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element maxOccurs="unbounded" name="InvoiceLineitems">
              <xs:annotation>
                <xs:appinfo>
                  <b:recordInfo structure="positional" sequence_number="2" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" />
                </xs:appinfo>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:annotation>
                    <xs:appinfo>
                      <groupInfo sequence_number="0" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
                    </xs:appinfo>
                  </xs:annotation>
                  <xs:element name="InvoiceLine" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="1" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="InvoiceNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="2" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SupplierName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="3" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SupplierNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="4" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LineNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="12" sequence_number="5" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Description" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="6" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SupplierPartNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="21" sequence_number="7" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Price" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="7" sequence_number="8" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Quantity" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="9" sequence_number="9" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LineTaxAmount" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="16" sequence_number="10" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LineTaxRate" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="11" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="LineTaxCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="12" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="UnitOfMeasure" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="17" sequence_number="13" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="PONumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="10" sequence_number="14" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="POLineNumber" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="15" sequence_number="15" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccountName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="16" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccountCode" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="13" sequence_number="17" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="BillingNotes" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="14" sequence_number="18" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment1" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="19" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment2" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="20" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment3" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="21" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment4" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="22" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment5" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="23" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="AccSegment6" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="18" sequence_number="24" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="BudgetPeriodName" type="xs:string">
                    <xs:annotation>
                      <xs:appinfo>
                        <b:fieldInfo justification="left" pos_offset="0" pos_length="19" sequence_number="25" />
                      </xs:appinfo>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

    Tuesday, February 7, 2017 3:13 AM
  • does no one have any idea how to include HEADERS in the output file ?
    Tuesday, February 7, 2017 2:11 PM
  • Hi Sunny,

    Please have a look into below article and I hope that might help you to resolve your issue,

    Flat file debatching in biztalk 2010 in one schema with headers, body and trailers

    http://stackoverflow.com/questions/5323639/biztalk-flat-file-with-header-multiple-records-and-footer-disassemble-proble

    https://seroter.wordpress.com/2007/08/23/debatching-flat-files-into-xml-with-header-intact/


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, February 7, 2017 7:43 PM
    Moderator
  • Hi Kamlesh, I am receiving a xml file which I am converting to canonical then converting this to customer format to .csv file.

    The output file (.csv file) should be included with header as provided in my 1st question on the top.

    Can I create headers on top in output ?


    Sunny

    Tuesday, February 7, 2017 10:24 PM
  • Hi,

    Refer: http://spnotepad.blogspot.in/2011/02/generating-flat-files-with-biztalk-2009.html

    http://www.snatchedmoments.com/2012/09/create-header-names-for-biztalk-flat.html

    Extract for the link above:

     I needed to define either the "Fixed" or "Default Value"  property for each element field.   But before I get into that, let me note that defining a header schema is as simple as taking a copy of your document schema and manipulating the values for Fixed or Default and ensuring that a PostFix value is defined for the child order of the root record element.  With that, your header values will print and your carriage return will push the first row of data below the column headers.  Now you're done. Well, almost.  Go back to your Send Pipeline and define the Header Schema property with the newly created Header Schema and now you can deploy and enjoy your BizTalk application.


    Rachit Sikroria (Microsoft Azure MVP)

    Wednesday, February 8, 2017 2:25 AM
    Moderator