Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Concatenate table fields ..

Dear memebers,

I have a internal table with 2 fields,

1 AAA

2 BBB

3 CCC

I want to concatenate column 2 values, So that my result will be AAABBBCCC.

how can I achieve this. Thanks for looking into.

Regards

madhu

Tags:
Former Member
Former Member replied

Hi, try this.

TYPES: BEGIN OF itab,
        car1 TYPE c,
        car2(3) TYPE c,
       END OF itab.

... appear itab

DATA: l_string TYPE string,

LOOP AT itab INTO w_itab.
  CONCATENATE l_string w_itab INTO l_string.
ENDLOOP.

Your output will be AAABBBCCC.

Thanks and Regards.

David Carballido

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question