Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

3 Condition types to be added


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,


Former Member
Former Member replied


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.



xkwert = kwert_1.


Best Regards,


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question