Skip to Content
Former Member
Jul 22, 2009 at 10:19 PM

Inner join on BKPF / BSIS giving time out dump / background job hangging



I am using inner join on BKPF and BSIS as follows. But it does not work due to high volume of data ( Nearly 200,000 records in BKPF). I tried to select data separately and then combine using nested loop on itabs, but it also gives same error.

I do not have BELNR, but I am using XBLNR because the config is such that accouting document number is not same as VBELN in VBRK. VBRK-VBELN is copied in BKPF-XBLNR, not in BKPF-BELNR.

Please advice me other options to fetch data.

My code:-

SELECT abukrs abelnr agjahr awaers abudat amonat aawtyp aawkey a~xblnr bbuzei bwrbtr bshkzg bhkont b~zuonr b~sgtxt INTO CORRESPONDING FIELDS OF TABLE ft_itab FROM bkpf AS a INNER JOIN bsis AS b ON ( abukrs = bbukrs AND abelnr = bbelnr AND agjahr = bgjahr ) FOR ALL ENTRIES IN ft_itab1 WHERE a~bukrs EQ p_bukrs AND a~xblnr EQ ft_itab1-xblnr AND a~gjahr EQ fp_gjahr AND a~blart IN s_blart AND a~monat IN so_peri AND b~hkont EQ p_achknt.