Skip to Content

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

Performance issues : Selection data

Hello to everyone,

I have to improve the performance of this select, because it takes several minutes.

Could someone help me ?


select a~bukrs "Company code

a~belnr "Accounting Document Number

a~gjahr "Fiscal Year

a~blart "Document type

a~monat "Fiscal Period

a~bldat "Document Date

a~budat "Posting Date

a~xblnr "Reference Document Number

a~bktxt "Document Header Text

a~stblg "Reverse Document Number


b~hkont "General Ledger Account

b~aufnr "Order

b~projk "WBS Element

b~augbl "Document Number of the Clearing Document

b~geber "Fund

b~fkber "Functional Area

b~fipos "Commitment Item

b~gsber "Business Area

b~wrbtr "Amount in document curr

b~kostl "Cost Center

b~prctr "Profit Center

b~fistl "Funds Center

b~shkzg "Debit/Credit Indicator

a~cpudt "Entry Date


into corresponding fields of table itab

from bkpf as a

inner join bsis as b on bbukrs = abukrs "Company Code/Comp Bank

and bbelnr = abelnr "Accounting Document Number

and bgjahr = agjahr "Fiscal Year

and bmonat = amonat "Fiscal Period

where a~monat le g_mth "Fiscal Period for current/ytd period

and a~gjahr eq g_year "Fiscal Year

and a~bukrs eq p_bukrs "Company Code

and b~blart in r_blart1 "Document Type

and b~gsber eq p_gsber

and b~projk in so_projk

and b~fistl in so_kostl

and b~hkont in so_hkont

and b~fkber in so_fkber

and ( b~bstat ne 'S'

and b~bstat ne 'V' )

and b~geber in so_geber.

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