Skip to Content
0
Jun 19, 2017 at 08:14 AM

sorting items on basis of unique field

106 Views

Hi ,

I am trying to sort the item based on field in item structure here is below

structure

Input

<F10F><RECORD_TYPE>F10F</RECORD_TYPE>
<INVOICE_NUMBER>7000008</INVOICE_NUMBER>
<F10F><RECORD_TYPE>F10F</RECORD_TYPE>

<F10F><RECORD_TYPE>F10F</RECORD_TYPE>
<INVOICE_NUMBER>7000009</INVOICE_NUMBER>
<F10F><RECORD_TYPE>F10F</RECORD_TYPE>

<F20F_F49F>
<RECORD_TYPE>F20F</RECORD_TYPE>
<INVOICE_NUMBER>7000008</INVOICE_NUMBER>

<F20F_F49F>
<RECORD_TYPE>F20F</RECORD_TYPE>
<INVOICE_NUMBER>7000009</INVOICE_NUMBER>
</F20F_F49F>

I am trying get the sort items based on basis invoice field as belown

<F10F><RECORD_TYPE>F10F</RECORD_TYPE>
<INVOICE_NUMBER>7000008</INVOICE_NUMBER>
<F10F><RECORD_TYPE>F10F</RECORD_TYPE>

<F20F_F49F>
<RECORD_TYPE>F20F</RECORD_TYPE>
<INVOICE_NUMBER>7000008</INVOICE_NUMBER>

<F10F><RECORD_TYPE>F10F</RECORD_TYPE>
<INVOICE_NUMBER>7000009</INVOICE_NUMBER>
<F10F><RECORD_TYPE>F10F</RECORD_TYPE>

<F20F_F49F>
<RECORD_TYPE>F20F</RECORD_TYPE>
<INVOICE_NUMBER>7000009</INVOICE_NUMBER>
</F20F_F49F>

Regards