Hi Friends,
We have customer aging report and when we are executing this report then it is giving dump after long time execution.
The dump is related to extended memery parameter that we are lokking with BASIS. but there are SQL statements in this report where it is taking to much time.
Table FAGLFLEXA
SELECT
"RYEAR" , "DOCNR" , "RLDNR" , "RBUKRS" , "PRCTR" , "BUZEI" , "HSL"
FROM
"FAGLFLEXA"
WHERE
"RCLNT" = :A0 AND "RLDNR" = :A1 AND "RBUKRS" = :A2 AND "PRCTR" = :A3 AND "RACCT" IN ( :A4 , :A5 , :A6 ,
:A7 , :A8 , :A9 , :A10 , :A11 , :A12 , :A13 , :A14 , :A15 , :A16 , :A17 , :A18 , :A19 , :A20 , :A21 ,
:A22 , :A23 , :A24 )
Table BSAD
SELECT
"BUKRS" , "KUNNR" , "UMSKS" , "UMSKZ" , "AUGDT" , "AUGBL" , "ZUONR" , "GJAHR" , "BELNR" , "BUZEI" ,
"BUDAT" , "BLDAT" , "WAERS" , "XBLNR" , "BLART" , "MONAT" , "BSCHL" , "SHKZG" , "DMBTR" , "WRBTR" ,
"ZFBDT" , "ZBD1T" , "KKBER"
FROM
"BSID"
WHERE
"MANDT" = :A0 AND "BUKRS" = :A1 AND "GJAHR" = :A2 AND "BELNR" = :A3 AND "BUZEI" = :A4 AND "BUDAT" <=
:A5 OR "MANDT" = :A6 AND "BUKRS" = :A7 AND "GJAHR" = :A8 AND "BELNR" = :A9 AND "BUZEI" = :A10 AND
"BUDAT" <= :A11 OR "MANDT" = :A12 AND "BUKRS" = :A13 AND "GJAHR" = :A14 AND "BELNR" = :A15 AND "BUZEI" =
:A16 AND "BUDAT" <= :A17 OR "MANDT" = :A18 AND "BUKRS" = :A19 AND "GJAHR" = :A20 AND "BELNR" = :A21
AND "BUZEI" = :A22 AND "BUDAT" <= :A23 OR "MANDT" = :A24 AND "BUKRS" = :A25 AND "GJAHR" = :A26 AND
"BELNR" = :A27 AND "BUZEI" = :A28 AND "BUDAT" <= :A29
Please tell us is there any possibility to optimize the above SQL statement.
Regards
Ganesh Datt Tiwari