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

Code Performance

Former Member
0 Likes
754

Dear All,

How to increase performance for the following query BSIS

select a~saknr as glcode

b~txt50 as gldesc

into corresponding fields of table it_final

from skb1 as a

inner join skat as b

on asaknr = bsaknr

where a~saknr in p_glcode

and a~bukrs eq company

and b~spras eq 'EN'

and b~ktopl eq 'ABIX'.

sort it_gl by saknr.

  • the above query get 220 G/L accounts.

if not it_final[] is initial.

select

bukrs

hkont

augdt

augbl

zuonr

gjahr

belnr

buzei

budat

werks

kostl

aufnr

shkzg

dmbtr

prctr

into corresponding fields of table it_bseg

from bsis

for all entries in it_final

where bukrs eq company

and prctr eq s_prctr

and gjahr eq s_year

and hkont eq it_final-glcode

and budat in s_budat "BETWEEN fromdt AND todt .

*above query taken above 30 minutes in production.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
720

Hi john,

I also faced similar problem in BSIS.

Out of the where fields,


where bukrs eq company
and prctr eq s_prctr "<--------- problem
and gjahr eq s_year 
and hkont eq it_final-glcode
and budat in s_budat . "<--------- problem

the two fields

PRCTR

and BUDAT

are creating the slowness. Create a secondary index on BSIS table, containing these two fields, (along with MANDT ofcourse), then the performance will be DRASTICALLY FAST. I have experienced it and it works fantastic.

regards,

amit m.

6 REPLIES 6
Read only

Former Member
0 Likes
721

Hi john,

I also faced similar problem in BSIS.

Out of the where fields,


where bukrs eq company
and prctr eq s_prctr "<--------- problem
and gjahr eq s_year 
and hkont eq it_final-glcode
and budat in s_budat . "<--------- problem

the two fields

PRCTR

and BUDAT

are creating the slowness. Create a secondary index on BSIS table, containing these two fields, (along with MANDT ofcourse), then the performance will be DRASTICALLY FAST. I have experienced it and it works fantastic.

regards,

amit m.

Read only

Former Member
0 Likes
720

Please Refer to Below link :

Link: [;

Same Question with the same Query.

Please search before posting.

Regards,

Nikhil

Read only

0 Likes
720

Apologies Everyone...

I am the same user Gold Moon...I asked this question again in ABAP general as i thought members are more active

in that forum.

Thanks All.

J Melladi

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
720

Hello John,

Before proceeding further i would like to know which for the selection-screen fields are mandatory: company, s_prctr, s_year, s_budat.

Also are s_prctr, s_year SELECT-OPTIONS? If so why are you using EQ ?

BR,

Suhas

Read only

Former Member
0 Likes
720

Use Indexing in BSIS table.

BSIS,BSEG they all are cluster tables. So using indexing we can have better performance.

  • Same post in Performance Tuning Forum*

Moderator please look into these

Manas

Read only

Former Member
0 Likes
720

Hi,

Avoid to use into corresponding into...

If you are using select option then in wheere condition use IN

else use EQ for parameter.

Regards,

Pravin