Hi,
I have tried Rule Groups where SKF=CS149 on the one and CS158 on the other one, but unfortunately did not work.
After some more research it seams the best place to do it is in the End Routine...
I have tried the below code, but get the idea that one can not loop twice through the result package so to speak.... my scenario is similar to the document on top, only difference I am not getting the "price" from a different table, as all are in the same table, just against different statistical key figures and plant.
data: e_s_result type _ty_s_TG_1.
data: e_s1_result type _ty_s_TG_1.
data: e_t_result type _ty_t_TG_1.
data: price like e_s_result-value-lc.
loop at result_package into e_s_result.
price = e_s_result-value_lc.
cred = e_s_result-creditor.
mat = e_s_result-material.
loop at result_package into e_s1_result.
if cred = e_s1_result-creditor and mat = e_s1_result-material and e_s1_result-stkeyfig = 'cs149'.
move price to e_s_result-value_lc.
append e_s_result to e_t_result.
endif.
endloop.
endloop.
refresh result_package.
move e_t_result[] to result_package[].
Best Regards
Rudi