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

Performance issue - smart response required

Former Member
0 Likes
1,263

Hi Guyz,

SELECT * FROM regup

INTO CORRESPONDING FIELDS OF TABLE itab1

FOR ALL ENTRIES IN itab

WHERE bukrs = itab-bukrs

AND belnr = itab-belnr

AND lifnr = itab-lifnr

AND gjahr = itab-gjahr

AND vblnr NE space.

This query is taking 2.5 mins to execute, I have to increase its performance.

FYI

itab has 2677 number of records

and final data in table itab1 has 3536 number of enteries. Its taking huge time, 2.5 mins to execute this portion. How can I increase the performance of this query.

Pls it's urgent.

<i>Note: If google can fetch the data from around the globe in fractoin of seconds, then at least it's not impossible.</i>

Your answers will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,238

Try this ...remove from the WHERE condition <b>'AND vblnr NE space.'</b> and fetch the data into ITAB1 ..then sort ITAB1 with VBLNR and delete from ITAB1 where VBLNR = Space.

<b>Reward points If useful</b>

11 REPLIES 11
Read only

Former Member
0 Likes
1,238

Good afternoon, Sal.

Well, in my opinion, you should replace the '*' with the fields you need (and only the ones you need).

Thats a start.

Read only

Former Member
0 Likes
1,238

SELECT FIELD1 FIELD2 FIELD3  
FROM regup
INTO TABLE itab1
FOR ALL ENTRIES IN itab
WHERE bukrs = itab-bukrs
AND belnr = itab-belnr
AND lifnr = itab-lifnr
AND gjahr = itab-gjahr
AND vblnr NE space.

Just replace the * with the needed fields....

Greetings,

Blag.

Read only

0 Likes
1,238

I'm already using the fields, I have not typed them here.

thanks,

Read only

0 Likes
1,238

My assumptions are :

1. REGUP is the cluster table,so you can't create index - this is ruled out

2. are you using sort command before sql query - it will give liitle bit good performance

3. Use primary key's in where clause - this will have major performance

4. Declare internal table without header line - it will give little bit good performance

Thanks

Seshu

Read only

0 Likes
1,238

These is the regup table primary key:

The ones you are using start with *

MANDT

LAUFD

LAUFI

XVORL

ZBUKR

*LIFNR

KUNNR

EMPFG

VBLNR

*BUKRS

*BELNR

*GJAHR

BUZEI

Maybe you should try to use the most of the primary key that you can.

How do you fill "itab"?

Read only

Former Member
0 Likes
1,238

I don't think there is much you can do other than add LAUFD to the selection. That will allow it to use at least part of the index.

Are there any index tables that you can use that have the same information you are looking for?

Rob

Read only

0 Likes
1,238

My report is taking 98.9% of database load, when i check it from SE30 transaction n taking so much time to execute due to this query.

Read only

0 Likes
1,238

Its not possible to use all primary key's in where clause, becuase i dont have the requried data. Any other solution...

Is there any other standard table from where i can select the same data? I know about REGUP_CORE, but it has not all the data which i require.

Read only

Former Member
0 Likes
1,239

Try this ...remove from the WHERE condition <b>'AND vblnr NE space.'</b> and fetch the data into ITAB1 ..then sort ITAB1 with VBLNR and delete from ITAB1 where VBLNR = Space.

<b>Reward points If useful</b>

Read only

0 Likes
1,238

Saket I have used this, but no performance increase...

Read only

0 Likes
1,238

It would be useful to know what business requirement this is trying to meet - it looks like you are trying to trawl through the payment run line items table for a series of document numbers, but you may already have some of this same data available from BKPF & BSEG, or at least more quickly accessible by travelling through these tables first.

For example, I'm not sure if it's site configured or standard, but I have seen the LAUFD and LAUFI value concatenated into the BKPF-BKTXT field on the paying (clearing) document, e.g. "20070205-123456", which would mean you could then get to the REGUP data much more efficiently.