‎2007 Oct 18 8:34 AM
sir
i correct my query but it is not give correct answer.
ables: bkpf, bseg.
select-options: budat for bkpf-budat.
select * from bkpf into bkpf where budat between '20070820' and '20071020'.
select * from bseg.
write:/, bkpf-budat,20 bkpf-blart,30 bseg-bschl,40 bseg-hkont.
endselect.
endselect.
ritu
‎2007 Oct 18 8:42 AM
Hi,
I got a list. Try to optimize your selection.
tables: bkpf, bseg.
select-options: budat for bkpf-budat.
select * from bkpf where budat in budat.
select * from bseg where belnr eq bfkp-belnr.
write:/, bkpf-budat,20 bkpf-blart,30 bseg-bschl,40 bseg-hkont.
endselect.
endselect.
Regards
Nicole
‎2007 Oct 18 8:44 AM
Hi Reetu..
Why are u using the Nested SELECT statments.. It will give worst performance .
Better convert these queries using FOR ALL ENTRIES
Sample code:
select-options: budat for bkpf-budat.
select * from bkpf into TABLE IT_bkpf where budat between '20070820' and '20071020'.
If it_bkpf IS not initial.
select * from bseg into table IT_BSEG
FOR ALL ENTRIES IN IT_BKPF
WHERE <CONDITION OF COMMON FIELDS>.
Endif.
Reward if Helpful.
‎2007 Oct 18 8:44 AM
Hi ritu,
try it like this:
tables: bkpf, bseg.
select-options: budat for bkpf-budat.
select * from bkpf where budat between '20070820' and '20071020'.
select * from bseg where belnr = bkpf-belnr.
write:/ bkpf-belnr, bkpf-budat,20 bkpf-blart,30 bseg-bschl,40 bseg-hkont.
endselect.
endselect.
Regards, Dieter
‎2007 Oct 18 8:49 AM
Hi Ritu,
Try this.
select-options: budat for bkpf-budat.
select * from bkpf into TABLE IT_bkpf where budat between '20070820' and '20071020'.
If not it_bkpf IS initial.
select * from bseg into table IT_BSEG
FOR ALL ENTRIES IN IT_BKPF
WHERE <CONDITION >.
Endif.
Incase if u want to include these '20070820' and '20071020' dates also in the check then between will not work.
use this :
select * from bkpf into TABLE IT_bkpf where budat GE '20070820' and budat LE '20071020'.
Reward if Useful.
Regards,
Chitra