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

Copy fieldsymbol table to internal table

HI,

How to copy the Field-symbol table to standard internal table.

Please help me .....

My declaration type is ....

data: it_kna1 TYPE STANDARD TABLE OF kna1.

FIELD-SYMBOLS: <it_kna1> TYPE STANDARD TABLE.

if i use it_kna1 = <it_kna1> , no syntax eror,

But i got a dump .

Please help me to solve the problem......

Thanks and regards,

Vaigundaraja.

Moderator Message: Please do some research before posting.

Message was edited by: Kesavadas Thekkillath

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 08, 2014 at 10:25 AM

    assign it_kna1 to <it_kna1>.

    If you access a field symbol without assigning it, it would result in a dump.

    Kindly read documentation on field symbols.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 10:30 AM

    Hi Raja ,

    whenever you use field symbol use assign <intenal table> TO <fieldsymbol>

    your code become as follow ...

    data: it_kna1 TYPE STANDARD TABLE OF kna1.

    FIELD-SYMBOLS: <it_kna1> TYPE STANDARD TABLE.

    assign it_kna1 to <it_kna1> .

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 10:48 AM

    Hi -

    You need to use ASSIGN.

    Example -

    TYPES : BEGIN OF t_itab,
    value TYPE char20,
    END OF t_itab.

    DATA : itab TYPE STANDARD TABLE OF t_itab,
    w_itab TYPE t_itab.


    w_itab-value = 'KKKK ABC 12'.
    APPEND w_itab TO itab.

    w_itab-value = 'KKKZ MNP 657'.
    APPEND w_itab TO itab.


    w_itab-value = 'KKKZ XYZ 456'.
    APPEND w_itab TO itab.

    DATA : lv_itab(6) TYPE c VALUE 'ITAB[]'.
    FIELD-SYMBOLS : <fs_table_xls> TYPE table,

    ASSIGN (lv_itab) TO <fs_table_xls>.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2014 at 10:57 AM

    Was the field-symbols already assigned, if yes you should not get a dump, except if you play with obsolete header lines 🤯 requiring usage of [] to distinguish header line from internal table. So I will suppose it is not the case. But you don't actually want to copy a non defined object (the <FS>) to the table 😕

    Are you trying to assign the field-symbols to the table, then ASSIGN it_kna1 TO <it_kna1>, or can you explain your actual requirement ?

    Regards,

    Raymond

    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.