‎2006 Aug 08 5:18 PM
Hello all,
i used this code piece,
select * from bkpf into t_bkpf where bldat in s_bldat and blart = 'KZ'.
select * from bseg into wa_bseg where belnr = t_bkpf-belnr.
append wa_bseg into t_bseg.
endselect.
endselect.
which i changed to sumthing lyke,
select * from bkpf into t_bkpf where bldat in s_bldat and blart = 'KZ'.
select * from bseg into t_bseg for all entries in t_bkpf where belnr = t_bkpf-belnr.
endselect.
endselect.
but i get nothing ... why and what is the correct code ?
‎2006 Aug 08 5:21 PM
Select * from bkpf into table t_bkpf
where bldat in s_bldat
and blart = 'KZ'.
if sy-subrc = 0.
select * from bseg into table t_bseg
for all entries in t_bkpf
where belnr = t_bkpf-belnr.
endif.
‎2006 Aug 08 5:21 PM
Select * from bkpf into table t_bkpf
where bldat in s_bldat
and blart = 'KZ'.
if sy-subrc = 0.
select * from bseg into table t_bseg
for all entries in t_bkpf
where belnr = t_bkpf-belnr.
endif.
‎2006 Aug 08 5:22 PM
hi,
declare two work areas like wa_bkpf, wa_bseg. do like this:
select * from bkpf into wa_bkpf where bldat in s_bldat and blart = 'KZ'.
append wa_bkpf to t_bkpf.
select * from bseg into wa_bseg for all entries in t_bkpf where belnr = t_bkpf-belnr.
append wa_bseg to t_bseg.
endselect.
endselect.
‎2006 Aug 08 5:22 PM
‎2006 Aug 08 5:23 PM