Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

loop - concatenate

Former Member
0 Kudos

hi all,

i have an internal table and i want to fill the the string-variable all_hus with the content of the column exidv and seperate the numbers with a comma

(e.g. 1000000454, 1000000455, 1000000456)

i tryed it with this but it didn't work:

loop at gs_vekp into gt_vekp.
    concatenate gt_vekp-exidv into all_hus
                separated by ','.
endloop.

thank you

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

There seems to be a small logical error here. Try using -


loop at gt_vekp into gs_vekp.

  if sy-tabix eq 1.
    all_hus = gs_vekp-exidv.
    continue.
  endif.

  concatenate all_hus 
              gt_vekp-exidv 
         into all_hus
    separated by ','.

endloop.

Regards,

Anand Mandalika.

3 REPLIES 3

Former Member
0 Kudos

Hi,

There seems to be a small logical error here. Try using -


loop at gt_vekp into gs_vekp.

  if sy-tabix eq 1.
    all_hus = gs_vekp-exidv.
    continue.
  endif.

  concatenate all_hus 
              gt_vekp-exidv 
         into all_hus
    separated by ','.

endloop.

Regards,

Anand Mandalika.

0 Kudos

thank you very much for your fast and helpful solution!

regards,

stefan

Former Member