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

Convert table to string

Former Member
0 Likes
1,681

Hi all ,

Our requirement is to convert internal table to a stirng .

Suppose internal table is like this

-


123

456

789

XXX

-


Each entry in the table shdl have a fixed length in the output . Suppose it is 5 , then the output will be

'123 456 789 XXX '

Is there any ABAP class /FM can handle this ???

Regards

Goutam

2 REPLIES 2
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
648

Hi,

Try

CONVERT_TABLE_TO_STRING.

Regards,

Sesh

Read only

Former Member
0 Likes
648

Hi Goutam,

I am not sure you have function module to convert internal table data into string.

Check this code.

DATA V_OUTPUT TYPE STRING.

LOOP AT ITAB.

CONCATENATE V_OUTPUT ITAB-F1 INTO V_OUTPUT SEPARATED BY SPACE.

ENDLOOP.

WRITE:/ V_OUTPUT.

Thanks,

Vinay