************************************************************************************ 写序号 types: begin of line, cola(2) type c, col1 type i, col2 type i, end of line.
data: tab type standard table of line with header line, st type line.
st-cola = 'A'. st-col1 = 1. st-col2 = '111'. append st to tab.
st-cola = 'B'. st-col1 = 2. st-col2 = '111'. append st to tab.
st-cola = 'B'. st-col1 = 2. st-col2 = '111'. append st to tab.
st-cola = 'B'. st-col1 = 2. st-col2 = '111'. append st to tab.
sort tab ascending by col1. "ascending descending data: line type i, l_matnr(2) type c.
loop at tab. line = line + 1. if line = 1. move tab-cola to l_matnr. else. if l_matnr <> tab-cola. line = '1'. move tab-cola to l_matnr. endif. endif. write:/ line. endloop.
2365

被折叠的 条评论
为什么被折叠?



