Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

database query

Former Member
0 Likes
308

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
287

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

1 REPLY 1
Read only

Former Member
0 Likes
288

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