Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Please advice for better performance of select query on CKIS table

I wrote a select query on CKIS table based on the inputs from KEKO table for which plant and material number are inputs.

Here is my select query:

SELECT bzobj kalnr kalka kadky tvers bwvar kkzma matnr werks posnr

INTO TABLE it_keko

FROM keko

WHERE werks = p_werks

AND matnr = p_matnr.

IF sy-subrc = 0.

SORT it_keko BY bzobj kalnr kalka kadky tvers bwvar kkzma.

ENDIF.

IF NOT it_keko[] IS INITIAL.

SELECT bzobj kalnr kalka kadky tvers bwvar kkzma posnr kstar

gpreis lstar vornr

INTO TABLE it_ckis

FROM ckis

FOR ALL ENTRIES IN it_keko

WHERE bzobj = it_keko-bzobj

AND kalnr = it_keko-kalnr

AND kalka = it_keko-kalka

AND kadky = it_keko-kadky

AND tvers = it_keko-tvers

AND bwvar = it_keko-bwvar

AND kkzma = it_keko-kkzma.

Please advice for better performance of this query.

Thanks in advance.

Jeevi.

Former Member
Not what you were looking for? View more on this topic or Ask a question