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

hi doubt regarding internal tables

hi,

I have one doubt regarding internal tables.

DATA:BEGIN OF LINE,

COL1,

COL2,

END OF LINE.

DATA:ETAB LIKE TABLE OF LINE WITH HEADER LINE,

FTAB LIKE TABLE OF LINE.

LINE-COL1 = 'A'. LINE-COL2 = 'B'.

APPEND LINE TO ETAB.

MOVE ETAB[] TO FTAB.

LOOP AT FTAB INTO LINE.

WRITE: / LINE-COL1, LINE-COL2.

ENDLOOP.

This is the example given in sap help.

1)My doubt is in the above code,when we are using APPEND LINE TO ETAB,

contents of LINE goes to ETAB header line or body of ETAB?

If it goes in to header line then why MOVE ETAB[] to FTAB is wrote?

Please clarify this doubt..

Thank u very much.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 02:20 PM

    hi surya,

    append statement generally points from header line to body of internal table only.

    n it appends records at the last place to body of internal table.

    n also change code in MOVE ETAB[] TO FTAB. to

    MOVE ETAB[] TO FTAB[].

    loop at ftab.

    ...................

    ..................

    endloop.

    if helpful reward some points.

    with regards,

    suresh babu aluri.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 01:35 PM

    Hi,

    if we write like it will directly goto the body not to the header line.

    rgds,

    bharat.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2007 at 01:37 PM

    when you write APPEND , it will directly be added to the body of internal table

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2007 at 01:38 PM

    Hi,

    append will add contents to the body of the internal table. Ii.e

    APPEND LINE TO ETAB. will add line contents to ETAB NOT TO FTAB.

    where as MOVE ETAB[] TO FTAB.

    will move the body of ETAB to FTAB.

    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.