01-07-2008 6:42 AM
hi,
i am having values in one itab1.in another itab2 i am having same fields plus few extra fields with values.i want to move the values in first itab to itab2.
when i used this query i am not getting values in itab2.
loop at itab1.
move-corresponding wa1 to wa2.
modify itab2 from wa2 transporting .....
endloop.
if anyone knows kindly help me.thanks in advance.
01-07-2008 6:55 AM
Hi,
It is not clear whether itab1 and itab2 will contain same no. of records? If so, if you want to modify itab2, on what basis you want to do it. No index specified nor condition.
Give some example how you want, so that you can get proper suggestion.
01-07-2008 6:45 AM
Hi,
In your code, there is no values specify from itab1. write like this and try,
loop at itab1 into wa1.
modify itab2 from wa1.
endloop.
Suku
01-07-2008 6:48 AM
Try this.
loop at itab1 into wa1.
move wa1 into corresponding fields of wa2.
modify itab2 from wa2.
endloop.
awrd points if helpful
Bhupal
01-07-2008 6:49 AM
in this u r not store data in wa1.
try like this,
loop at itab1 into wa1.
move-corresponding wa1 to wa2.
append wa2 to itab2. "or modify itab2 from wa2 transporting .....
endloop.
or
append lines of itab1 to itab2.
this directly append itab1 into itab2.
Regards,
Arpit
01-07-2008 6:49 AM
loop at itab1 into wa1.
move-corresponding wa1 to wa2.
append wa2 to itab2.
clear wa2.
endloop.
01-07-2008 6:52 AM
Hi,
Change ur code like this and try.
loop at itab1 into wa1.
move-corresponding wa1 to wa2.
append wa2 to itab2.
clear wa2.
endloop.
Regards,
Srinivas
01-07-2008 6:55 AM
Hi,
It is not clear whether itab1 and itab2 will contain same no. of records? If so, if you want to modify itab2, on what basis you want to do it. No index specified nor condition.
Give some example how you want, so that you can get proper suggestion.
01-07-2008 7:03 AM
Thanks for ur replies.
I hav to select data's from three tables without using innerjoin.by using for all entries in i got values in two itabs.i hav to move itab1 to itab2.but i am not getting itab1 values in itab2 instead getting 0.
01-07-2008 7:05 AM
Kavi,
check whether the itab1 and itab2 has same fields or not. please give your sample code here which u written. also check manually itab1 and itab2 has values.
Suku
01-07-2008 6:56 AM
Hi Kavitha
Try this code.
First Declare the work area and internal table.
Retrieve the records using the select query and put it into WA.
finally move the WA into internal table.
select phcode wpcode actcode tascode actstdate valedate tasstdate tasenddate from zse_projmethod1 into corresponding
fields of wa_execution where phcode = i_variable and wpcode = ' ' and actcode = ' ' and tascode = ' '.
endselect.
wa_execution-actstdate = sy-datum.
wa_execution-actendate = '31/12/9999'.
append wa_execution to tab_execution.
EXP_execution[] = tab_execution[].
Hope this will help you.
reward if help.