Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Joining cobk and coep table using Inner join taking too long


I am placing an Inner join on cobk and coep table to get data in an internal table but it is taking too long. I also tried to get data from db view COVP but it is also taking long time.

SELECT bk~kokrs

       bk~belnr

       bk~budat

       bk~cpudt

       bk~bltxt

       ep~buzei

       ep~wkgbtr

       ep~objnr

       ep~gjahr

       ep~kstar

       ep~vrgng

       ep~parob1

       ep~beknz

       ep~sgtxt

       ep~objnr_n1

       ep~bukrs

INTO TABLE covp_itab

FROM cobk AS bk

INNER JOIN coep AS ep ON (bk~kokrs = ep~kokrs AND bk~belnr = ep~belnr)

WHERE bk~kokrs     = co_kokrs

AND   ep~wrttp     = '04'

AND   ep~kstar     IN s_kstar

AND   ep~vrgng     IN s_vrgng 

AND   ep~bukrs     IN r_bukrs

AND   bk~timestamp IN r_stamp.


1 Answer
SAP Expert

You can make use of T-Code: SE11 to check what indexes are available for table COEP

For one COEP record that you have the (now) 5 criteria for, navigate to T-Code: SE16 pass the selections and run to check how long it takes.

To improve performance, you can also create an additional index in table COEP. You can also run a SQL trace in ST05 to see what indexes are used and if indexes are not improving performance.





Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.