2 Replies Latest reply on Oct 1, 2018 2:04 PM by edy12

    Display correct data in rtf template

    edy12

      Hi All,

       

      Please see the below XML which is used by a rtf template.

      I have added 2 comments in the XML starting with -->

       

          <ORDER_HEADER>

            <HEADER_ROW>

              <ORIG_SYS_DOCUMENT_REF>001529872197</ORIG_SYS_DOCUMENT_REF>

              <SALESREP>

                <SALESREP_ROW/>

              </SALESREP>

              </SOLD_TO_CONTACT>

              <SHIP_TO_CONTACT>                                    --> This SHIP TO comes under ORDER HEADER

                <SHIP_TO_CONTACT_ROW>

                  <PHONE_NUMBER>6042333125201</PHONE_NUMBER>

                  <EMAIL_ADDRESS>abc@gmail.com</EMAIL_ADDRESS>

                </SHIP_TO_CONTACT_ROW>

              </SHIP_TO_CONTACT>

              <ORDER_LINES>

                <ORDER_LINES_ROW>

                  <ORIG_SYS_LINE_REF>001521970</ORIG_SYS_LINE_REF>

                  <ITEM_NUMBER>0158ABCSD012836</ITEM_NUMBER>

                  <ORDERED_QUANTITY>2</ORDERED_QUANTITY>

                  <SHIP_TO_CONTACT>                                 --> This SHIP TO comes under ORDER LINES which again comes under ORDER HEADER

                    <SHIP_TO_CONTACT_ROW/>

                  </SHIP_TO_CONTACT>

                  <INVOICE_TO_CONTACT>

                    <INVOICE_TO_CONTACT_ROW/>

                  </INVOICE_TO_CONTACT>

                  <DELIVER_TO_CONTACT>

                    <DELIVER_TO_CONTACT_ROW/>

                  </DELIVER_TO_CONTACT>

                </ORDER_LINES_ROW>

              </ORDER_LINES>

            </HEADER_ROW>

          </ORDER_HEADER>

       

       

      I am designing a template where I need to display Ship To contact details, so I created a for loop in the template as <?for-each:SHIP_TO_CONTACT?> with an ending. After loading the XML when I preview it I am getting 2 rows for ship to contact as there are 2 SHIP_TO_CONTACT sections in the xml.

       

      My question is how can I display the records of SHIP_TO_CONTACT only from ORDER HEADERS and not from ORDER LINES?

       

      I am using EBS 12.1.3.

       

      Thanks