Hi,
If possible use a JOIN between bw_table and result_package table.
If it's not possible, assure that the values of the fields in FAE-table used in WHERE-clause of SELECT are unique.
Use a SORTED TABLE for it_bw_table to optimize access in LOOP with WHERE-clause.
Example:
DATA it_bw_table type SORTED TABLE of ltype_bw_table
with non-unique key cond1 cond2 cond3.
LOOP AT Result_package ASSIGNING <result>.
COLLECT <result>-condx into condx_table. "assumption: <result>-condx is non-numeric
ENDLOOP.
SELECT * FROM bw_table
INTO TABLE it_bw_table
FOR ALL ENTRIES IN condx_table
WHERE cond1 = condx_table-table_line.
LOOP AT Result_package ASSIGNING <result>
LOOP AT it_bw_table INTO ls_bw_table
WHERE cond1 = <result>-cond1
AND cond2 = <result>-cond2
AND cond3 = <result>-cond3
IF statement
ELSEIF statement
ENDIF
ENDLOOP
ENDLOOP
Best Regards, Randolf