How do improve SELECT in BKPF/BSEG table.
I'm using this SELECT in a report program but processing this taking about 10 minutes in these two commands:
into table t_bkpf
for all entries in t_cobk
where awkey eq t_cobk-awkey.
into table t_bseg
for all entries in t_bkpf
where kstar eq '0000464001'
and belnr eq t_bkpf-belnr
and shkzg eq 'S'.
There is another way of improving these SELECT, or another table to use instead of BSEG ?
Rob Burbank replied
In addition to BELNR and AWKEY, you have to SELECT BUKRS and GJAHR as well. Then use BUKRS, BELNR and GJAHR in your SELECT on BSEG. This is the only proper way to SELECT on BSEG.
For the SELECT on BKPF, you have to add AWTYP.
Message was edited by: Rob Burbank