Hi,
Did you create secondary index on LOOK DSO with REF_DOCNUM and REF_DOCITM?
Still you have issue means, please add log in monitor of once each step completed in routine..like once SELECT statement is completed add Information log stating SELECT is completed..
similarly you can add log once DSO records are appended into result_package from i_result.
Like this please add log for each step [before and after] and then you can the duration in data load monitor with timestamp - you can see where exactly its taking more time.
I expect mostly in SELECT statement since you are selecting from DSO based on NON-KEY fields which likely more costly operation at DB level.
Please let us know your results.