‎2008 May 19 1:41 PM
hi all,
iam writing my select statement as follows :
select * from vbap into corresponding fields of itab where vbeln = zorder.
append itab.
the sales order has two line items but in itab 3 line items are getting appended the last item has all zero value.
can anyone tell me why is it happening & how shuld it be corrected.
rgds
‎2008 May 19 1:45 PM
Hi,
do like this
select * from vbap into corresponding fields of table itab where vbeln = zorder.
or
data declaration
data : itab type table of vbap,
w_itab like line of itab.
select * from vbap into corresponding fields of w_itab where vbeln = zorder.
append itab from w_itab.
endselect.
however the first option is better from the performance point of view.
regards,
Advait
‎2008 May 19 1:45 PM
Hi,
do like this
select * from vbap into corresponding fields of table itab where vbeln = zorder.
or
data declaration
data : itab type table of vbap,
w_itab like line of itab.
select * from vbap into corresponding fields of w_itab where vbeln = zorder.
append itab from w_itab.
endselect.
however the first option is better from the performance point of view.
regards,
Advait
‎2008 May 19 1:46 PM
Hi,
you don`t need the append coding. The select-statement automaticly includes the append.
Regards
Nicole
‎2008 May 19 1:46 PM
write the select as ..
select * from vbap into corresponding fields of
table itab where vbeln = zorder.
‎2008 May 19 1:46 PM
Hi,
Try like this.
Use the refresh command before using select query.
REFRESH ITAB.
Then use select query to retrieve values.
‎2008 May 19 1:50 PM
hi,
select * from vbap into corresponding fields of where vbeln = zorder.
if sy-subrc = 0.
append itab.
endif.
clear itab.
if record found then it will append otherwise it will ot append.
reward me if helpful.
‎2008 May 19 2:05 PM
hi friend
use the select command like this,
that will definatly works
and use clear after appending the fields.
select * from vbap into corresponding fields of table itab where vbeln = zorder.
rewards are expected
vivek srivastava