Code: Alles auswählen.
data:
lt_string type stringtab,
lv_string type string.
field-symbols:
<ld_string> type string
<ld_attachment> like line of ct_attachment
<ls_usrcd> like line of lt_usrcd.
loop at lt_usrcd assigning <ls_usrcd>.
append initial line to lt_string assigning <ld_string>.
concatenate <ls_usrcd>-bname <ls_usrcd>-modda <ls_usrcd>-modti
into <ld_string> separated by cl_abap_char_utilities=>horizontal_tab.
endloop.
concatenate lines of lt_string into lv_string separated by cl_abap_char_utilities=>cr_lf.
while lv_string is not initial.
append initial line to ct_attachment assigning <ld_attachment>.
call function 'TEXT_SPLIT'
EXPORTING
length = 255
text = lv_string
IMPORTING
line = <ld_attachment>
rest = lv_string.
endwhile.
Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
honeyjam
Code: Alles auswählen.
perform split_text using lv_string changing ct_attachment