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: 

Convert table to string

Former Member
0 Kudos
1,151

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

0 Kudos
118

Hi,

Try

CONVERT_TABLE_TO_STRING.

Regards,

Sesh

Former Member
0 Kudos
118

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