Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

creating a view on a cluster table

Former Member
0 Likes
637

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

4 REPLIES 4
Read only

Former Member
0 Likes
594

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

Read only

0 Likes
594

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

Read only

0 Likes
594

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

Read only

0 Likes
594

OKi i'll try this .. thanks