‎2005 Jul 06 12:27 PM
Hi,
whats the most efficient way of splitiing a standard internal table. I have an internal like below:
<u> <b>Element</b></u> <u><b> value</b></u>
ElementA dsds
ElementA d343
ElementB dsfds23
ElementC sfdsf
and want split it into a new internal table for each element type. Is the best way to loop round the internal table, adding the element to a new internal table, checking when it changes, doing my processing, and repeating the process?
Thanks.
‎2005 Jul 06 12:44 PM
Hi,
I would suggest.
loop at itab into wa.
at new element.
itab2-element = wa-element.
or do anything you like with this row.
endat.
endloop.
Eddy
‎2005 Jul 06 12:44 PM
Hi,
I would suggest.
loop at itab into wa.
at new element.
itab2-element = wa-element.
or do anything you like with this row.
endat.
endloop.
Eddy
‎2005 Jul 06 12:46 PM
‎2005 Jul 06 12:50 PM
Hi,
Perfect. But for this to work perfectly, you'll need to sort the itab on element field.
Cheers,
Sam.
‎2005 Jul 06 2:36 PM
Do you allready know how much elements there are or have internal tables for each element also have to be created dynamically? (If you know how to do that I would be intersted
‎2005 Jul 06 2:40 PM