2007 Jan 18 9:39 AM
Hi,
I hv a performance issue in one of the reports and teh data is extracted from a cluster table bsec. There is a select * command where u select all the available details for a document no.
Is it possible to get teh details from a view? If not any alternatives,,
Thanks
Keshi
Hi,
I hv a performance issue in one of the reports and teh data is extracted from a cluster table bsec. There is a select * command where u select all the available details for a document no.
Is it possible to get teh details from a view? If not any alternatives,,
Thanks
Keshi
2007 Jan 18 9:45 AM
I think this is not possible.
As BESG is a cluster table, it' not possible to make a "join".
What you can do in order to improve performance :
- First restrict the selection on BKPF using the maximum of field in the where clause . Here you build a t_bkpf internal table.
- Then Use the "For all entries" statement to select in the BSEG table, using the t_bkpf
**Sample code**
CLEAR bkpf.
SELECT bukrs belnr gjahr
FROM bkpf
INTO TABLE t_bkpf
WHERE bukrs EQ p_bukrs
AND gjahr EQ p_gjahr
AND blart IN s_blart.
CHECK NOT t_bkpf[] IS INITIAL.
CLEAR bseg.
SELECT bukrs belnr gjahr buzei dmbtr
INTO TABLE t_bseg
FROM bseg
FOR ALL ENTRIES IN t_bkpf
WHERE bukrs EQ t_bkpf-bukrs
AND belnr EQ t_bkpf-belnr
AND gjahr EQ t_bkpf-gjahr
AND hkont EQ p_hkont.
Hope this helps,
Erwan
Message was edited by:
Erwan LE BRUN
2007 Jan 18 9:50 AM
I'm using,
select * into table ta_bsec from bsec
where belnr = REGUH-VBLNR.
mainly the following fields r needed, name1, name2, stras, pfach, ort01, bankn, bank1, banks from the bsec table
2007 Jan 18 10:03 AM
Ok so,
To do better use the example I've post, and replace BKPF by REGUH : That is to say :
- First, do the selection in the REGUH table, in t_reguh
- Use the "For all entries" statement with t_reguh ( like t_bkpf in the example )
Erwan
2007 Jan 18 10:08 AM