Hi everyone! Quick question. I'm using a select statement from table BKPF with joins to WITH_ITEM and LFA1. The thing is that it takes too long to execute, and finally i get a dump timeout. i tried to replace BKPF for BSIK or BSAK in case that helped, but to no avail.
Here's the select code, perhaps there's something I'm not noticing.
Thanks so much for taking the time to look at it.
Have a good one!
FORM get_docs TABLES itab_rets STRUCTURE itab_ret.
SELECT bbudat bbelnr bblart wwt_qsshh wqsatz wwt_qbshh wctnumber wwt_acco wwt_withcd lstcd1 lstcd3 lfityp
INTO CORRESPONDING FIELDS OF TABLE itab_rets
FROM with_item AS w INNER JOIN bkpf AS b ON wbelnr = bbelnr
INNER JOIN lfa1 AS l ON wwt_acco = llifnr
WHERE ( bblart = 'OP' OR bblart = 'OT' OR b~blart = 'OE' )
AND w~witht = '15'
AND b~blart IN s_blart
AND b~budat IN s_budat
AND b~belnr IN s_belnr
AND b~gjahr IN s_gjahr
AND b~bukrs EQ s_bukrs
AND b~bldat IN s_bldat
AND w~wt_qsshh <> 0
AND w~wt_qbshh <> 0.