Skip to Content

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

Sort Character type in alv Grid

Hi Gurus,

I have a issue of sorting a field in ALV GRID of Type LFA1-LIFNR(Char - 10), which has numbers as well as characters. The requirement is to remove the leading zeroes from the numbers. But when I do so using SHIFT (variable name) LEFT DELETING LEADING ZEROES, the sort order is disrupted in output. Hence following this statement I also included SHIFT (variable name) RIGHT DELETING TRAILING SPACE. But now the filter in ALV GRID does not work for this field. Please find my code below:

SHIFT i_final-vend_num LEFT DELETING LEADING '0'.

SHIFT i_final-vend_num RIGHT DELETING TRAILING space.

Thanks in advance!

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