Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Transpose ROW Data in Column

Dear All,

             I have data in XML as given below & I want data as given below:

//------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2015-09-22T14:58:11" EndDate="2014-11-26T12:17:44" StartDate="2014-11-26T12:17:44" Version="14.0 SP5 Patch 15 (Nov 20, 2014)">

    <Rowset>

        <Columns>

            <Column Description="Sale" MaxRange="1" MinRange="0" Name="Sale" SQLDataType="1" SourceColumn="Sale"/>

            <Column Description="Date" MaxRange="1" MinRange="0" Name="Date" SQLDataType="93" SourceColumn="Date"/>

            <Column Description="Material" MaxRange="1" MinRange="0" Name="Material" SQLDataType="1" SourceColumn="Material"/>

            <Column Description="Quantity" MaxRange="1" MinRange="0" Name="Quantity" SQLDataType="8" SourceColumn="Quantity"/>

        </Columns>

        <Row>

            <Sale>OPC</Sale>

            <Date>2013-01-01T00:00:00</Date>

            <Material>1000002</Material>

            <Quantity>395.52</Quantity>

        </Row>

        <Row>

            <Sale>SRC</Sale>

            <Date>2013-01-02T00:00:00</Date>

            <Material>1000004</Material>

            <Quantity>88.14</Quantity>

        </Row>

        <Row>

            <Sale>OPC</Sale>

            <Date>2013-01-03T00:00:00</Date>

            <Material>1000002</Material>

            <Quantity>483.42</Quantity>

        </Row>

//------------------------------------------------

My desire format is given Below:

                Date
                   01-01-2013       02-01-2013         03-01-2013

OPC      395                    0                         483.42

SRC     0                         88.14                    0

Kindly help me in this issue.

Thanks

Muhammad Ashfaq

Tags:
Not what you were looking for? View more on this topic or Ask a question