Skip to Content
author's profile photo Former Member
Former Member

how to convert dynamic internal table to string

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 07, 2012 at 05:04 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.