‎2008 Jan 23 7:46 AM
hi all,
can we modify a internal table using another internal table without using work area??
‎2008 Jan 23 7:49 AM
No
MODIFY is only from Work area.
See the syntax for more info:
Change an internal table
- MODIFY itab [FROM wa] [INDEX idx].
[TRANSPORTING f1 ... fn [WHERE cond]].
- MODIFY TABLE itab [FROM wa]
[TRANSPORTING f1 ... fn].
- MODIFY itab [FROM wa]
TRANSPORTING f1 ... fn WHERE cond.
Reward points
Shakir
‎2008 Jan 23 7:49 AM
No
MODIFY is only from Work area.
See the syntax for more info:
Change an internal table
- MODIFY itab [FROM wa] [INDEX idx].
[TRANSPORTING f1 ... fn [WHERE cond]].
- MODIFY TABLE itab [FROM wa]
[TRANSPORTING f1 ... fn].
- MODIFY itab [FROM wa]
TRANSPORTING f1 ... fn WHERE cond.
Reward points
Shakir
‎2008 Jan 23 7:51 AM
No ,
you can't modify a internal table using another internal table without using work area because in an Intrenal table data 1st come in the header part then it can be modify.
Ankur
‎2008 Jan 23 8:01 AM
Hi ,
Well,we can not modify an internal table from another as the syntax of modify doesn't support.
As per my knowledge is concerned if the structure of both the internal tables are same then i guess you can do one thing say if ur having itab1 and itab2 as 2 internal tables and if u want to pass the values into that then i guess u can go for itab2[] = itab1[].
Reward points if this is useful.
thanq you.
‎2008 Jan 23 8:06 AM
hi ,
in this case my previous records will be over written.
i need to modify existing records.
‎2008 Jan 23 8:44 AM
loop at itab1 into wa1.
read table itab2 into wa2 with key = wa1 binary search.
move-corresponding wa2 to wa1.
modify itab1 with wa1.
endloop.
this is logic for modifying a internal table with contents of other.
reward if helpful
regards
vivek
‎2008 Jan 23 8:55 AM
Hi,
You can modify the DB Table from Internal table as below
MODIFY dbtab FROM TABLE itab.
But you can not modify the internal table from another internal table directly without using work area.
Regards,
Satish
‎2008 Jan 23 12:17 PM