Here's another possibility; this solution is slightly longer, but I think it provides nice flexibility (in case a single XML document could contain data on multiple invoices).
When this XSLT:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:key name="kInvByNo" match="*/*" use="INVNO"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/*">
<INV>
<xsl:apply-templates
select="*[
generate-id() = generate-id(key('kInvByNo', INVNO)[1])
]"/>
</INV>
</xsl:template>
<xsl:template match="*[contains(name(), '_row')]">
<xsl:apply-templates select="INVNO|INVDT"/>
<ITEMS>
<xsl:for-each select="key('kInvByNo', INVNO)">
<ITEM>
<xsl:apply-templates select="*[starts-with(name(), 'ITN')]"/>
</ITEM>
</xsl:for-each>
</ITEMS>
</xsl:template>
</xsl:stylesheet>
...is used on the provided XML:
<INV_100248>
<INV_100248_row>
<INVNO>100248</INVNO>
<INVDT>20-01-2017</INVDT>
<ITN>Item1</ITN>
<ITN_QTY>2</ITN_QTY>
<ITN_UP>200</ITN_UP>
<ITN_TP>400</ITN_TP>
</INV_100248_row>
<INV_100248_row>
<INVNO>100248</INVNO>
<INVDT>20-01-2017</INVDT>
<ITN>Item2</ITN>
<ITN_QTY>1</ITN_QTY>
<ITN_UP>100</ITN_UP>
<ITN_TP>100</ITN_TP>
</INV_100248_row>
<INV_100248_row>
<INVNO>100248</INVNO>
<INVDT>20-01-2017</INVDT>
<ITN>Item3</ITN>
<ITN_QTY>5</ITN_QTY>
<ITN_UP>250</ITN_UP>
<ITN_TP>750</ITN_TP>
</INV_100248_row>
</INV_100248>
...the desired answer is produced:
<?xml version="1.0"?>
<INV>
<INVNO>100248</INVNO>
<INVDT>20-01-2017</INVDT>
<ITEMS>
<ITEM>
<ITN>Item1</ITN>
<ITN_QTY>2</ITN_QTY>
<ITN_UP>200</ITN_UP>
<ITN_TP>400</ITN_TP>
</ITEM>
<ITEM>
<ITN>Item2</ITN>
<ITN_QTY>1</ITN_QTY>
<ITN_UP>100</ITN_UP>
<ITN_TP>100</ITN_TP>
</ITEM>
<ITEM>
<ITN>Item3</ITN>
<ITN_QTY>5</ITN_QTY>
<ITN_UP>250</ITN_UP>
<ITN_TP>750</ITN_TP>
</ITEM>
</ITEMS>
</INV>