2008 Mar 07 7:05 AM
Hi Experts,
In a report program, i am sorting an itab say itab1 with 5 fields like a, b, c, d and e as follow-
SORT itab with a b c d e.
Then i am deleting adjacent duplicates from itab like this ..
DELETE ADJACENT DUPLICATES FROM itab COMPARING a b c d.
after that am reading itab using first 2 , 3rd and 4th field
READ TABLE itab with key a = v1
b = v2
d = v3
e= v4
BINARY SEARCH.
Can anybody let me know whether i will get correct record from this search.
Thanks in adv,
Akash
Hi,
It will give you the result, but one thing to be noted is if you are sorting the itab by 5 fields and deleting the records from itab by comparing 4 fields is not good.
It should be always like the fields what you are sorted and deleting should based on those fields only.
Ex:
sort itab by f1 f2 f3 f4 f5.
delete adjacent duplicates from itab comparing f1 f2 f3 f4 f5.
Thanks,
Sriram Ponna.
2008 Mar 07 7:12 AM
Hi,
It will give you the result, but one thing to be noted is if you are sorting the itab by 5 fields and deleting the records from itab by comparing 4 fields is not good.
It should be always like the fields what you are sorted and deleting should based on those fields only.
Ex:
sort itab by f1 f2 f3 f4 f5.
delete adjacent duplicates from itab comparing f1 f2 f3 f4 f5.
Thanks,
Sriram Ponna.
2008 Mar 07 7:23 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |