cancel
Showing results for 
Search instead for 
Did you mean: 

Handling table records sequence

Former Member
0 Kudos

suppose a sequence is like the below in an internal table

1

2

3

4

6

7

8

11

15

16

17

and i want to arrange them like

1-4

6-8

11

15-17

means all numbers in anorder must come like the above and single number only once.

please help me ASAP

vineet

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try some thing like below

sort itab.

read table itab index 1.

value = itab-value

loop at itab.

if value EQ itab-value.

write itab-value.

else.

write:/itab-value.

value = itab-value.

endif.

value = value + 1.

endloop.

**reward if solved ur problem **