*&---------------------------------------------------------------------* *& Report ZTEST20131120_1 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZTEST20131120_1. data: f1 type i, f2 type i. field-groups header. "字段组定义 insert f1 f2 into header. "动态生成字段组 header结构 DO 10 TIMES. f1 = sy-index. f2 = sy-index ** 2. extract header. " 把定义好的字段组填充给extract ENDDO. sort descending. LOOP. " 逐行读取字段组 write: / f1, f2. ENDLOOP.