‎2006 Aug 10 1:33 PM
Hi all,
I'm facing some strange problem while exceuting my transaction.
The point is that when i enter the values i.e in select-options
(a) Document Number: XXXXXXXXX to XXXXXXXXX
It's working fine.
Execution time is very less.
(b) But when i enter the single values in the select-options i.e clicking the extend button and then entering the single entries in it.
Document Number: XXXXXXXX
YYYYYYYY
ZZZZZZZZ
It's taking very very very much time.
But the requirement is like that to give the single values..
How to go about this...
Please help....
Cheers,
Simha.
‎2006 Aug 10 11:05 PM
Well first of all, like everyone else said, try to use other tables sepcially if you are not using any keys on an existing index.
Second, if you trace your SELECT (via ST05) using single values and range, you would notice the difference on how the SQL statement is built. Your single value SELECT will have an OR statement on all the values, which is EXTREMELY slow. In ABAP you won't notice this because all we do is have the WHERE clause like BUKRS in S_BUKRS. But in your database SQL statement, it will be different.
Hope that helps.
‎2006 Aug 10 1:36 PM
‎2006 Aug 10 1:37 PM
Hi Ravi,
i have done nothing different to achieve this..
just followed the normal procedure...
do i have to give something extra in the select query..
SELECT * INTO TABLE i_bseg FROM bseg
WHERE bukrs IN bukrs AND
belnr IN belnr AND
GJAHR IN GJAHR AND
BSCHL = 50.
Regards,
Simha.
‎2006 Aug 10 1:40 PM
Select * on Bseg and that too without key fields on Mseg??
Try using other tables in the cluster like BSID and BSAD
Cheers
VJ
‎2006 Aug 10 1:43 PM
Try to get the data from Bsi* tables instead(they are secondary indexes on the main table, much faster).
BSID Accounting: Secondary Index for Customers
BSIK Accounting: Secondary Index for Vendors
BSIM Secondary Index, Documents for Material
BSIP Index for Vendor Validation of Double Docu
BSIS Accounting: Secondary Index for G/L Accoun
Regards,
Ravi
‎2006 Aug 10 1:49 PM
Hi,
But what's the actual problem??
When i give the range it's working fine and taking less execution time...
what's wrong in giving the single values in the extended key...
can u brief me...
Cheers,
Simha.
‎2006 Aug 10 11:11 PM
Try removing the BSCHL = 50 part of it from the statement. But as others said, try using other tables. BSEG is large table and it typically has performance problems.
SELECT * INTO TABLE i_bseg
FROM bseg
WHERE bukrs IN bukrs
AND belnr IN belnr
AND gjahr IN gjahr.
DELETE i_bseg WHERE bschl <> 50.
‎2006 Aug 10 1:37 PM
Hi,
Can u paste ur code? Both ways the system should work same similar.
if you are using the <b>IN</b> in the WHERE clause of the select both should work the same way.
Cheers
VJ
‎2006 Aug 10 11:05 PM
Well first of all, like everyone else said, try to use other tables sepcially if you are not using any keys on an existing index.
Second, if you trace your SELECT (via ST05) using single values and range, you would notice the difference on how the SQL statement is built. Your single value SELECT will have an OR statement on all the values, which is EXTREMELY slow. In ABAP you won't notice this because all we do is have the WHERE clause like BUKRS in S_BUKRS. But in your database SQL statement, it will be different.
Hope that helps.