Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

sorting numbers using itab(urgent)

hi,

i want to sort the number using itab. i am writting the code as follows. but i am not getting itab sorted asending? pl. tell me why????

Data: itab2 type table of string with header line.

if IT_BOM1-LABST < IT_BOM1-MENGE.

ITAB2 = MIN.

append itab2.

ELSE.

itab2 = w_shortb.

append itab2.

ENDIF.

if itab2[] is not initial.

sort itab2 ascending.

endif.

read table itab2 index 1.

If sy-subrc = 0.

Write:/ 'The minimum batch is', itab2.

endif.

numb = itab2.

write :/ numb.

when i am debugging then itab not showing sorted in ascending

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question