‎2006 Nov 06 4:26 PM
hi i have an internal table...itab
f1***f2*****f3*****f4***f5********f6***totalcost
1 ***218.02*312.03*0.00*110.00*****R***
2**** 109.01**416.04*0.00*110.00*****R***
3**** 109.01**416.04*0.00*110.00*****u***
4**** 19.01***46.04*0.00**110.00*****R***
5**** 19.01***46.04*0.00**110.00******DNLAB
i need to find out totalcost = ( f2 (1 + f4 )f5 + f3 (1+f4)f5
but here condition is we should use the f4 value where f6= dnlab.
can you help me to find out this
thanks
Hari
‎2006 Nov 06 9:25 PM
I think what you are asking for, simply coded, is:
if f6= "dnlab".
totalcost = (f2 * ((1 + f4) * f5)) + (f3 * ((1 + f4) * f5)).
else.
totalcost = (f2 * f5) + (f3 * f5).
endif.
Of course this would be done in a loop. Does this help?
Andy Zugay
‎2006 Nov 06 9:25 PM
I think what you are asking for, simply coded, is:
if f6= "dnlab".
totalcost = (f2 * ((1 + f4) * f5)) + (f3 * ((1 + f4) * f5)).
else.
totalcost = (f2 * f5) + (f3 * f5).
endif.
Of course this would be done in a loop. Does this help?
Andy Zugay