2010 Sep 16 8:09 AM
hi experts,
i have to block the inactive customers (customers for whom the transaction has not happened) for a specified number of month depending on the selection screen value..
now for that i have used the following query
SELECT SPMON VKORG VTWEG VKBUR PKUNAG SPART FROM S975
INTO TABLE IS975 FOR ALL ENTRIES IN IKN
WHERE SSOUR = '' AND VRSIO = '000'
AND SPMON IN MON AND SPTAG = '00000000'
AND SPWOC = '000000' AND SPBUP = '000000' AND VKORG IN VKORG
AND VTWEG IN VTWEG AND VKBUR IN VKBUR and PKUNAG = IKN-KUNNR .
now it is taking a lot of time to execute this query considering that IKN has some 30 or 40 records.. may be it is having too many primary keys but i have passed most of the primary keys in the query...
it would be apperciated if someone can help..
thanks in advance
syed
Edited by: Rob Burbank on Sep 16, 2010 11:57 AM
2010 Sep 16 4:28 PM
I've actually done this in a previous assignment, and I think I used table VAKPA as my data source. I wouldn't use LIS/SIS tables for anything unless you're going to run in background, and the user has no knowledge or interest in how long the program takes to complete.
2010 Sep 16 4:28 PM
I've actually done this in a previous assignment, and I think I used table VAKPA as my data source. I wouldn't use LIS/SIS tables for anything unless you're going to run in background, and the user has no knowledge or interest in how long the program takes to complete.
2010 Sep 19 1:58 PM
Hi Syed,
BP is right.
Just note: The phrase "i have passed most of the primary keys in the query..." does not mean the key is used for database access: Only key field in sequence starting with the first one will result in the use of an index, I.e. if the tables index fields are A B C D E F G, use of A, AB, ABC, ... will get the index used, CDE, BCD or EFG will not use the index at all.
Regards,
Clemens