How to write the if condition on the AMDP in HANA
i have to check condition for two fields in AMDP , currently i have written the select query in amdp then i used a abap program to calculate the if condition and display the value in alv, but i dont want to use the if condition on the abap program , i want to do these if conditions on the AMDP program itself.
IF wa_mseg-bwart = '101' AND wa_mseg-sobkz = 'K'.
wa_final-mix_mat_qty_101 = wa_mseg-menge.
ELSEIF wa_mseg-bwart = '102' AND wa_mseg-sobkz = 'K'.
wa_final-mix_mat_qty_102 = wa_mseg-menge.
ELSEIF wa_mseg-bwart = '122' AND wa_mseg-sobkz = 'K'.
wa_final-cleaned_qty_122 = wa_mseg-menge.
please give me a solution for this , i want this conditions to be checked and the data should be feeded on the internal table on amdp..then i just want to use abap program to get value from internal table and display that in ALV.
thanks a lot .