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: 

how to convert dynamic internal table to string

Former Member
0 Kudos
418

Please help to convert contents of the dynamic internal table which is stored in field symbol <fs_table> to a String.

The Structure of the fieldcatalog is constructed dynamically with the field names using which the dynamic internal table has been created.

Please help with a way to concatenate the contents into a string.

Moderator Message: Thread locked. Please search before posting.

Message was edited by: Suhas Saha

1 REPLY 1

Former Member
0 Kudos
71

Hi,

Use the below code to convert your field symbol values to string.

   

  constants: c_1 type i value '1',

                      c_2 type i value '2'.

        assign component c_1 of structure <fs_table> to <fs_field>.      

        " <fs_field> will have value of your first field.

        lv_string1 = <fs_field>.

     

       assign component c_2 of structure <fs_table> to <fs_field>.        

        " <fs_field> will have value of your second field.

        lv_string2 = <fs_field>.

       concatenate lv_string1 lv_string2 into lv_string3.

concatenate the string according to your requirement.

Hope it helps.