‎2007 Apr 16 12:40 PM
Hi Abappers,
What is the major differnce between the following 2?
a)G_T_PROD-G_OP_INV_KG = G_OP_INV1.
MODIFY G_T_PROD INDEX G_READ_INDEX.
b)G_T_PROD-G_OP_INV_KG = G_OP_INV1.
APPEND G_T_PROD.
‎2007 Apr 16 12:43 PM
FIRST STATEMETN MODIFIES EXISTING DATA OF ITAB.
SECOND STATEMENT ADDS A NEW RECORD INTO ITAB.
‎2007 Apr 16 12:43 PM
FIRST STATEMETN MODIFIES EXISTING DATA OF ITAB.
SECOND STATEMENT ADDS A NEW RECORD INTO ITAB.
‎2007 Apr 16 12:43 PM
Hi mansi,
1. Append
Inserts one more record at the end.
2. Modify
Modified/Edits the data of a particular record,
specified by the index number/record number.
regards,
amit m.
‎2007 Apr 16 12:44 PM
I dont think modify you have specified will work
Modify itab from wa index i_index will change the indexed record with value of work area
& append will directly add a new record
Thanks
Sandeep
Reward if helpful
‎2007 Apr 16 12:45 PM
hi
<b>modify</b> is used to make changes to the existing data and modifyfing the table after inserting records .
but <b>append</b> statement is used to insert new record at the end of the table
hope ur doubts will get clear.
regards
ravish
<b>plz reward points if helpful</b>
‎2007 Apr 16 12:59 PM
Hi,
Generally Append Statement Allows u to add a new record at the end of ur internal table.
While ur modify Statement is used to edit or change any of the existing record in ur internal table based on any condition u specify.
jus check that modify statement's syntax.
ie,
MODIFY <itab> WHERE <condition>.
Hope this helps u.
****reward if useful.
‎2007 Apr 16 1:01 PM
Hi Mansi Maskeri,
<b>Append Statement :</b>
This statement helps in adding the record at the bottom of the internal table.
<b>Example : append wa_tab to it_tab.
This adds the record at the end of the internal table it_tab.</b>
<b>Modify statement :</b>
This statement helps in changing the existing record at the specified index.
For example:
modify it_tab index 3.
This modifies the internal it_tab record which is present at the 3 position.
Regards.
‎2007 Apr 16 1:02 PM
Hi,
1). "Modify" modifies the the current internal table.
For eg. Modify itab from wa_itab.
Or Modify itab from wa_itab transporting...............
No additional records are added at the end.
2). "Append" appends(Adds) a record to the end of the table.
For eg. We use append in displaying data using ALV, wheer we append the contents to the fieldcatalog.So, the contents are added one after the other, and the result is finally dispalyed on screen.
Thanks and regards,
Prerna