Hi
I think that reason of poor performance is DB I/O time for reading a DSO. If you want to look at DB I/O time, let you trace load Operation after setting T-Code ST05 and manually executing DTP.
I have some question.
1. Is DOCNUM of where conditions AR document no?
2. Is bilno of result package SD billing Document no?
3. do your source have a purpose of reading AR Data of relating SD Billing?
If your answer of 3 question will be "YES", I think that where conditions is a wrong and a result of select have 0 record.
but If docnum of FI and bilno of result package is the same, let you change where conditions that have an additional fields of including "Document year" + "Company Code".
beacause FI document have a huge data , FI have a configuration of basically reusing doc. no range each year. So Primary Key of FI document including BKPF(Header)/BSEG(Item) basically compose compay code(BUKRS) + Document year + Document no. To imporve reading peformance on SAP ERP, "where conditions" of ERP standard source of being related FI alwasy use 3 fields of above.
As result of changing where conditions , let you use the following clause.
WHERE FIELD of FI doc's year = FIELD of result package's year of relating FI doc.
and FIELD of FI doc's compay code = FIELD of reuslt package's company code.
and docnum = result_package-bilno
and posky = '02'.