*&---------------------------------------------------------------------*
*& Report ZDEMO09
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zdemo09.
DATA:gv_string TYPE string,
gv_char10 TYPE char10.
DATA:BEGIN OF gs_lines,
text TYPE char128,
END OF gs_lines,
gt_lines LIKE TABLE OF gs_lines.
DATA:gv_lenm TYPE i,
gv_lenf TYPE i,
gv_lenl TYPE i,
gv_lmod TYPE i.
DO 100 TIMES.
gv_char10 = sy-index.
CONCATENATE gv_string gv_char10 INTO gv_string.
ENDDO.
gv_lenm = strlen( gv_string ).
DO.
gv_lenl = gv_lenl + 128.
IF gv_lenl LE gv_lenm.
gs_lines = gv_string+gv_lenf(128).
APPEND gs_lines TO gt_lines.
gv_lenf = gv_lenf + 128.
ELSE.
gv_lmod = gv_lenm MOD 128.
gs_lines = gv_string+gv_lenf(gv_lmod).
APPEND gs_lines TO gt_lines.
ENDIF.
IF gv_lenm LE gv_lenl.
EXIT.
ENDIF.
ENDDO.
WRITE 1.
阅读(1212) | 评论(0) | 转发(0) |