cancel
Showing results for 
Search instead for 
Did you mean: 

3 Condition types to be added

Former Member
0 Kudos

Hello,

We have 3 custom condition types defined in pricing procedure. We need to add the values of all these 3 conditions and add into the last (i.e. 3rd condition).

Basically we want to collect the sum of all 3 conditions into the third condition value.

How can we use a condition value formula for it?

STEP Condition Type From To Subtotal AltCty

90 ZTST1 B

100 ZTST2 B

110 ZTST3 B 987 ?

But how can Formula 987 will collect the total of all these 3 conditions ZTST1, ZTST2 and ZTST3 ?

Thanks to advice,

Anand

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Good Day,

Please Try below code in your formula.

***form frm_kond_basis_987.

data : kwert_1 like xkomv-kwert .

data : it_komv like xkomv occurs 0 with header line.

refresh it_komv.

clear it_komv.

it_komv[] = xkomv[].

kwert_1 = 0.

loop at it_komv.

if it_komv-kschl = 'ZTST1' or it_komv-kschl = 'ZTST2'

or it_komv-kschl = 'ZTST3' .

kwert_1 = kwert_1 + it_komv-kwert.

endif.

endloop.

xkwert = kwert_1.

*****endform.

Best Regards,

KSK

Answers (1)

Answers (1)

Former Member
0 Kudos

Don't you think you are bound to get ito a loop?

regds

Jude

Former Member
0 Kudos

hello,

i did not get you. could u pls elaborate ?

rgds,

anand