Skip to Content
0
Former Member
Dec 13, 2007 at 04:40 AM

Urgent! fields of a table to be separated with space n comma

26 Views

Hi,

I have a table in which the entries have to be separated by a comma n space.

I have put the entries within an internal table.

I used the concatenate to do this but its getting overwritten.

Eg.I have atable with the field as name.

The entries for this field r say aaa bbb ccc ddd.

I have put these into an internal table itab.

The required output is aaa, bbb, ccc, ddd

For this I coded as

loop at itab.

concatenate itab-name ' ,' into answer separated by space.

endloop.

answer is a string which gets overwritten with one entry.Finally answer is having only ddd.

Please help me ASAP with the exact procedure and syntax.

Thankyou