‎2014 Oct 07 5:17 PM
Data:LT_GLT0 TYPE SORTED TABLE OF GLT0 WITH NON-UNIQUE KEY BUKRS RACCT,
SELECT * FROM SKB1
INTO TABLE LT_SKB1
WHERE BUKRS IN BUKRS AND
SAKNR IN SAKNR AND
WAERS IN WAERU AND
FDLEV IN FDLEV
ORDER BY BUKRS.
The below table is taking very long time and could you please any one can give any suggestions on this.
SELECT * FROM GLT0
INTO TABLE LT_GLT0
FOR ALL ENTRIES IN LT_SKB1_TMP
WHERE RLDNR = '00' AND
RRCTY = '0' AND
RVERS = '001' AND
BUKRS = LT_SKB1_TMP-BUKRS AND
RYEAR = LV_GJAHR AND
" racct = lt_skb1-saknr AND
RBUSA = SPACE AND
RPMAX = '16'.
As per my analysis that
1.Instead of using SELECT * FROM GLT0 and I will be specify the column names which are required.
2.I will be remove the FOR ALL ENTRIES and will be using INNER JOIN.
Any other suggestions which can help the performance?
it is taking very huge time to execute the Query
‎2014 Oct 07 6:12 PM
Hello Vemula,
the SELECT for all entries may issue a full table retrieval in case the internal table is empty. If the snippet captures all relevant code the first query might be intended to populate the internal table. There is however no check of sy-subrc and/or sy-dbcnt after the first query. Maybe adding such an check already solves some of the performance issues you experience currently.
On releated track the Code Inspector (TA SCI) and the ABAP Test Cockpit contains a check "Unsecure use of FOR ALL ENTRIES" that can be used for code scans in order to avoid such a flaw.
Best Regards
Klaus
‎2014 Oct 07 6:21 PM
Hi,
if LT_SKB1_TMP[] is not initial.
SELECT * FROM GLT0
INTO TABLE LT_GLT0
FOR ALL ENTRIES IN LT_SKB1_TMP
WHERE RLDNR = '00' AND
RRCTY = '0' AND
RVERS = '001' AND
BUKRS = LT_SKB1_TMP-BUKRS AND
RYEAR = LV_GJAHR AND
" racct = lt_skb1-saknr AND
RBUSA = SPACE AND
RPMAX = '16'.
endif.
‎2014 Oct 07 7:56 PM
Hello,
Check if you can use the view ENT2006 instead of the table . That should improve performace significantly.
Thanks,
Sushma
‎2014 Oct 14 2:45 PM
Hi,
could you please let me know how to use the view ENT2006.
Thanks
Durga Prasanth
‎2014 Oct 07 8:38 PM
Hello,
Yes you can go for inner join and also you can check if you can create a secondary index.
I hope you are checking the initiality of the master table before going for 'FOR ALL ENTRIES'.
Regards,
Nagaraj
‎2014 Oct 07 11:24 PM
‎2014 Oct 14 2:46 PM
I had used the function module FAGL_GET_GLT0 and still we are getting the performance issue.
‎2014 Oct 08 4:37 AM
In your code you are extracting the entries from SKB1 into LT_SKB1 where as in Select from GLT0 you are using for all entries in LT_SKB1_TMP. Are you moving the contents across the table otherwise the TMP table will be empty and the entire records for GLT0 will be read which could be slowing the process.
Regards