TYPES: BEGIN OF ttt,
item TYPE posnr,
texto TYPE char10,
END OF ttt.
TYPES ttt_t TYPE TABLE OF ttt WITH DEFAULT KEY.
DATA lt_t TYPE ttt_t .
item TYPE posnr,
texto TYPE char10,
END OF ttt.
TYPES ttt_t TYPE TABLE OF ttt WITH DEFAULT KEY.
DATA lt_t TYPE ttt_t .
lt_t = value #(
( ITEM = '10' texto = 'A' )
( ITEM = '20' texto = 'B' )
( ITEM = '30' texto = 'C' )
( ITEM = '40' texto = 'D' )
( ITEM = '50' texto = 'E' )
( ITEM = '60' texto = 'F' )
( ITEM = '70' texto = 'G' )
) .
BREAK-POINT.
data lv_texto type string.
lv_texto = reduce string( init lv_text = lv_texto lv_sep = ''
for ls_ttt in lt_t NEXT lv_text = |{ lv_text }{ lv_sep }{ ls_ttt-texto }| lv_sep = ',' ).
============= RESULTADO
Nenhum comentário:
Postar um comentário