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

LTAP and LTAK table issue

Former Member
0 Likes
2,596

Dear ABAPER,

i have used LTAP and LTAK table for inner join , but it will be very slow for data selection and i try to use FOR ALL ENTRIES IN also , it is also same issue.

below my code.

   SELECT ltak~lgnum ltak~tanum ltap~tapos
         ltap~matnr ltap~charg ltap~werks
         ltap~meins ltap~qdatu ltap~qzeit
         ltap~qname ltap~nlpla ltap~nistm
         ltap~lgort ltap~wenum ltap~wepos
                      FROM ltak INNER JOIN ltap
                      ON  ltak~mandt EQ ltap~mandt
                      AND ltak~lgnum EQ ltap~lgnum
                      AND ltak~tanum EQ ltap~tanum
                      INTO TABLE t_ltap
                      WHERE ltak~lgnum EQ lv_lgnum
                      AND ltak~bwart IN ('101' , '321')
                      AND ltak~kquit EQ 'X'
                      AND ltak~queue EQ ''
                      AND ltap~lgnum EQ lv_lgnum
                      AND ltap~werks EQ p_werks
                      AND ltap~bestq EQ ''
                      AND ltap~pquit EQ 'X'
                      AND ltap~qdatu GE s_budat-low
                      AND ltap~nltyp BETWEEN '101' AND '110'
                      %_HINTS ORACLE '&SUBSTITUTE LITERALS&'.

please give sugest me what can be done.

Thanks in advance..

2 REPLIES 2
Read only

salah_zinet
Participant
0 Likes
1,453

Read only

Former Member
0 Likes
1,453

You should first run an SQL trace (ST05) to see if the SELECT is using the index or doing a full table scan.

Rob