Application Development and Automation 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: 
Read only

loop - concatenate

Former Member
0 Likes
1,094

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
Read only

Former Member
0 Likes
839

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
Read only

Former Member
0 Likes
840

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.

Read only

0 Likes
839

thank you very much for your fast and helpful solution!

regards,

stefan

Read only

Former Member