2009 Jun 19 1:44 PM
hi everyone
i have an internal table of string.
Im looping thrugh it based on some conditions. if for example, im on record number 2, how do i access record number 3?
Im doing a comparison between record number X and record number X+1.
2009 Jun 19 1:47 PM
Hi....what you can do is while looping store initially the record into one temporary string and then compare...
e.g.
LOOP gt_itab INTO gs_itab.
gs_itab_temp = gs_itab.
IF gs_itab-field1 GT gs_itab_temp-field1...."any comparison you want..
ENDLOOP.
For the first iteration you do not have anything to compare with..it will start with second iteration..
So you will be comparing X+1 and X....
2009 Jun 19 1:45 PM
Hi,
Either you can use READ statement with the INDEX additon or again you can use LOOP with FROM addtion.
I suggest you use READ statement if you know the row number.
Regards,
Ankur Parab
2009 Jun 19 1:47 PM
Hi,
What you can do is when you are looping through the iteration you can keep the loops field value in a variable and then in the next loop iteration you can use the stored value...
2009 Jun 19 1:47 PM
Hi....what you can do is while looping store initially the record into one temporary string and then compare...
e.g.
LOOP gt_itab INTO gs_itab.
gs_itab_temp = gs_itab.
IF gs_itab-field1 GT gs_itab_temp-field1...."any comparison you want..
ENDLOOP.
For the first iteration you do not have anything to compare with..it will start with second iteration..
So you will be comparing X+1 and X....
2009 Jun 19 2:11 PM
2009 Jun 19 2:19 PM
2009 Jun 19 2:40 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |