cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Grouping of xml in sap xmii

Former Member
0 Kudos
266

Daer Experts,

I have a repeter in my trx which will return a column with different no of rows every time.i want to add all columns togeather like a table col1 col2 col3 in my trx.plz provide the logic

Thanks in advance

Eswaraiah M

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please clear your requirement in detail with your i/p and o/p xml structure.

Have you tried Column and Row actions under SAP MII XML document in workbench.

Regards,

Manoj Bilthare

Former Member
0 Kudos

Hi Manoj

yes m using doucment and coulumn and den row and data item block m using and my out put like

Wet Ore Credited Per Day Wet Ore Hauled Per Day

15

70.068785023881

23.930786135945

82.44579494638

27.725734054376

54.559884122554

66.012571443623

41.645837566342

60.833460738241

21.719603295259

--- 10

--- 10

--- 43.311604290117

--- 10

--- 44.678528487229

--- 36.068260246728

--- 15.401761592727

--- 24.540886323163

--- 39.380592687976

but i want second column also with same level of first column

Thanks for reply

Eswaraiah M

Former Member
0 Kudos

Hi,

Please post your XML content which you are using in repeater i mean <Row><Column> format.

Regards,

Manoj Bilthare

Former Member
0 Kudos

Hi Eashwar,

Create two different XMII documents each for Wet Ore Credited Per Day and Wet Ore Hauled Per Day.

Use Union XML action and pass both document as input.

Use Normalize action and Pass output of union as input.

Thanks

Anshul

Former Member
0 Kudos

Hi Anshul,

The columns which m getting are from repeater's output, so everytime i can get only one column and if i get second column den i need to append it to first column .There is a possibility of only one column, at that time joining of xml is not required.

Regards,

Eswaraiah M

agentry_src
Active Contributor
0 Kudos

Use the CurrentItem property of the Repeater as an index to each row to add them together. Like so:



YourFirstXML.Output{/Rowsets/Rowset/Row[#Repeater_1.CurrentItem#]/Col1} + YourSecondXML.Output{/Rowsets/Rowset/Row[#Repeater_1.CurrentItem#]/Col1}

or use the repeater output for the first data point

Repeater_1.Output{/Row/Col1} + YourSecondXML.Output{/Rowsets/Rowset/Row[#Repeater_1.CurrentItem#]/Col1}

Good luck,

Mike

Former Member
0 Kudos

Dear Mike,

I have some xml in a variable and a repeater which will give a column at a time with different no of rows. And i want to add the newly column to previous xml.And my repeater column name(Value) is same, so i want to repalce the column with repeater current item(Value1,Value2........).M getting the final xml structure is below.I am able to see the Valu1,Valu2 columns in the Rowset but not in the Row.In Row i am getting <Value></Value> only.m using using XSL_Trans block and RowsetCombiner.xsl.Plz provide me wht changes needs to done in my bls.

<?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2011-08-17T02:41:45" EndDate="2011-06-30T11:24:30" StartDate="2011-06-25T11:29:07" Version="12.1.8 Build(20)">

<Rowset>

<Columns>

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

<Column Description="ROP_100" MaxRange="6" MinRange="4" Name="ROP_100" SQLDataType="8" SourceColumn="ROP_100"/>

<Column Description="LCL" MaxRange="1.0" MinRange="0.0" Name="LCL" SQLDataType="7" SourceColumn="LCL"/>

<Column Description="SPC_Target" MaxRange="1.0" MinRange="0.0" Name="SPC_Target" SQLDataType="7" SourceColumn="SPC_Target"/>

<Column Description="UCL" MaxRange="1.0" MinRange="0.0" Name="UCL" SQLDataType="7" SourceColumn="UCL"/>

<Column Description="LSL" MaxRange="1.0" MinRange="0.0" Name="LSL" SQLDataType="7" SourceColumn="LSL"/>

<Column Description="USL" MaxRange="1.0" MinRange="0.0" Name="USL" SQLDataType="7" SourceColumn="USL"/>

<Column Description="CL" MaxRange="1.0" MinRange="0.0" Name="CL" SQLDataType="7" SourceColumn="CL"/>

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

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

</Columns>

<Row>

<DateTime>2011-06-25T11:29:07</DateTime>

<ROP_100>6</ROP_100>

<LCL>30</LCL>

<SPC_Target>20</SPC_Target>

<UCL>33</UCL>

<LSL>50</LSL>

<USL>30</USL>

<CL>24</CL>

<Value>15</Value>

</Row>

<Row>

<DateTime>2011-06-25T23:28:39</DateTime>

<ROP_100>4</ROP_100>

<LCL>30</LCL>

<SPC_Target>20</SPC_Target>

<UCL>33</UCL>

<LSL>50</LSL>

<USL>30</USL>

<CL>24</CL>

<Value>70.068785023881</Value>

</Row>

Thanks in Advance

Eswaraiah M

Edited by: Eswaraiah M on Aug 17, 2011 9:35 AM