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

Internal table

Hi experts.

i have a problem.when i use the code shown below.Move command actually moves the kbetr field to corresponding fields of table itab.but it is not appending that field to itab.wat shoul i use after move to fill the kbetr coloumn of table itab.append is not valid.if i use modify itab then it gives a syntax error.plz solve ma problem.

LOOP AT IT_FINAL.

MOVE: IT_FINAL-KBETR TO ITAB-KBETR.

ENDLOOP.

regards,

raman

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:09 AM

    HI,

    you forgot the modify itab or append itab inside the loop.

    LOOP AT IT_FINAL.

    MOVE: IT_FINAL-KBETR TO ITAB-KBETR.

    modify itab.

    ENDLOOP.

    Reward points if helpfull

    Nicole

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:09 AM

    LOOP AT IT_FINAL.

    read table itab with key field1 = it_final-field1.

    if sy-subrc eq 0.

    MOVE: IT_FINAL-KBETR TO ITAB-KBETR.

    modify itab.

    endif.

    ENDLOOP.

    Regards,

    Dhana

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 06:09 AM

    Hi Raman,

    Add APPEND statement.

    LOOP AT IT_FINAL.
    MOVE: IT_FINAL-KBETR TO ITAB-KBETR.
    APPEND itab. "Add this line if ur itab don't have any data.
    MODIFY itab.  " Add this line if ur itab has data already(U have read 
    "itab with appropriate keys).
    ENDLOOP.
    
    

    Thanks,

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:10 AM

    Hi,

    You are just moving the data into the header and not into the table...After move statement, use the append statement.

    LOOP AT IT_FINAL.

    MOVE: IT_FINAL-KBETR TO ITAB-KBETR.

    Append ITAB.

    Clear ITAB.

    ENDLOOP.

    The above code will solve the issue

    Reward if useful

    Regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:10 AM

    Try this code,

    LOOP AT IT_FINAL.

    MOVE: IT_FINAL-KBETR TO ITAB-KBETR.

    APPEND ITAB_KBETR.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 06:12 AM

    remove ':' after move.

    if itab contains values and u only need to fill value of column kbetr for the records contained in itab, use

    modify itab transporting kbetr.

    plz reward points if dis helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:14 AM

    Hi,

    use as following.

    It will help you to modify itab at specific record.

    Data index2 type sy-tabix.

    LOOP AT itab.

    INDEX2 = SY-TABIX.

    READ TABLE IT_FINAL WITH KEY <common field> = <field>.

    IF SY-SUBRC = 0.

    MOVE: IT_FINAL-KBETR TO ITAB-KBETR..

    MODIFY itab INDEX INDEX2.

    CLEAR INDEX2.

    ENDIF.

    ENDLOOP.

    Reward pts. if helpfull.

    Regards,

    Dhan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 17, 2008 at 06:23 AM

    Hi Raman,

    Why dont you try with the append statement. Also if you get the same functionlaity then what you need ot do is just to append the data intot he internal table and thenafter delete that record form the it_final table.

    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.