07-28-2007 8:16 AM
Hi Experts.
I have 4 sales order number.
say example...
61351,61352,61353,61354 .
I want the greatest number to be chosen from 4 i.e., 61354.
Please let me know.
Thanks in advance.
Regards.
Manu.
07-28-2007 8:19 AM
sort itab by orderno descending
read table itab index 1.
now itab-orderno contains largest number
aRs
Point are always welcome
07-28-2007 8:24 AM
Hi,
Sort the Internal table by Descending and get the record with sy-tabix = 1.
eg., Sort ITAB by number descending.
Read table ITAB with key sy-tabix.
Thanks,
Yogesh
07-28-2007 8:34 AM
If you have those numbers in an Internal table, then
SORT ITAB BY VBELN DESCENDING.
READ TABLE ITAB INDEX 1.
WRITE ITAB-VBELN.
If you have those numbers in a sequence, then you need to compare each value and then get the highest value.
For example,
if vbeln1 gt vbeln2.
....
endif.
Regards,
Pavan.
07-28-2007 8:37 AM
Hi,
hi,
sort your internal table in decending order
SORT ITAB BY VAL DESCENDING.
READ TABLE ITAB INDEX 1.
WRITE ITAB-VAL.
u will get the greatest.
Regards