data lv_str type string value 'asdfadfadfadfadf'.
data lv_offset type i.
data lv_bytes_rd type i.
data lv_bytes_rm type i.
data lv_strlen type i.
field-symbols: TYPE ANY.
lv_strlen = XSTRLEN( lv_str ).
lv_offset = 1022.
lv_bytes_rd = 0.
lv_bytes_rm = lv_strlen.
ASSIGN lv_str TO .
WHILE lv_bytes_rd LT lv_strlen.
IF lv_bytes_rm LT lv_offset.
ls_content-line = +lv_bytes_rd(lv_bytes_rm).
ELSE.
ls_content-line = +lv_bytes_rd(lv_offset).
ENDIF.
APPEND ls_content TO lt_content.
lv_bytes_rd = lv_bytes_rd + lv_offset.
lv_bytes_rm = lv_strlen - lv_bytes_rd.
CLEAR ls_content.
ENDWHILE.
阅读(470) | 评论(0) | 转发(0) |