Code: Alles auswählen.
ld_length = strlen( ld_string ) - 2.
ld_string = ld_string(ld_length).
Code: Alles auswählen.
data lt_string type stringtab.
append 'test1' to lt_string.
append 'test2' to lt_string.
append 'test3' to lt_string.
concatenate lines of lt_string into ld_string separated by ','.
Code: Alles auswählen.
data:
lt_line type stringtab,
lt_table type stringtab,
lt_vbrk type standard table of vbrk,
ld_string type string.
field-symbols:
<ls_vbrk> type vbrk,
<ld_string> type string,
<la_field> type any.
refresh lt_table.
loop at lt_vbrk assigning <ls_vbrk>.
refresh lt_line.
do.
assign component sy-index of structure <ls_vbrk> to <la_field>.
if sy-subrc ne 0.
exit.
endif.
append initial line to lt_line assigning <ld_string>.
<ld_string> = <la_field>. "Hier braucht man eventuell noch eine etwas genauere Typumwandlung
enddo.
append initial line to lt_table assigning <ld_string>.
concatenate lines of lt_line into <ld_string> separated by '|'.
endloop.
concatenate lines of lt_table into ld_string separated by cl_abap_char_utilities=>cr_lf.
Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag (Insgesamt 2):
Legxis • Alexity
Code: Alles auswählen.
replace regex `..$` in ??? with ``