‎2007 May 23 11:37 AM
Hi experts,
Is it correct? I want to copy the data to another dbtables:
select *
from /BIC/AZ99OS03300
INTO Z99BW033A
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
MODIFY Z99BW033A FROM /BIC/AZ99OS03300.
endselect.
‎2007 May 23 11:42 AM
Hi Marc,
data: itab like Z99BW033A occurs 0.
select *
from /BIC/AZ99OS03300
INTO table itab
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
if sy-subrc = 0.
MODIFY Z99BW033A FROM table itab.
endif.
Regards,
Vidya.
‎2007 May 23 11:40 AM
Hi
If both the DB tables are having same fields the you can use
select *
from /BIC/AZ99OS03300
INTO <b>IT_Z99BW033A</b>
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
<b>MODIFY Z99BW033A FROM it_Z99BW033A</b>.
endselect.
Reward points if useful
Regards
Anji
‎2007 May 23 11:42 AM
If both the table having smae fields then your select statement is valid. But u have to add TABLES statement in top for the work area.
‎2007 May 23 11:42 AM
Hi Marc,
data: itab like Z99BW033A occurs 0.
select *
from /BIC/AZ99OS03300
INTO table itab
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
if sy-subrc = 0.
MODIFY Z99BW033A FROM table itab.
endif.
Regards,
Vidya.
‎2007 May 23 11:42 AM
Hi,
Donot use endselect as it raises a performance issue.
select *
from /BIC/AZ99OS03300
INTO table it_Z99BW033A
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
MODIFY Z99BW033A FROM it_Z99BW033A.
‎2007 May 23 11:43 AM
Hi Marc
Change your query to
select *
from /BIC/AZ99OS03300
INTO <b>it_Z99BW033A</b>
where GL_ACCOUNT between '5200000000' and '5299999999'
AND COMP_CODE ='S00'.
MODIFY Z99BW033A FROM <b>it_Z99BW033A</b>.
Regards,
Atish
‎2007 May 23 11:44 AM
HI,
you are selecting from /BIC/AZ99OS03300 into Z99BW033A. so, why do you want to modify Z99BW033A which has not been modified .