Skip to Content
author's profile photo Former Member
Former Member

Handling table records sequence

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 09:41 AM

    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 **

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.