# Variant Pricing Discount Condition

Different Discount for Each Variant in Sales Document

While implementing variant pricing we came across a specific requirement where the business want a different % discount for  each variant.

For example.

In Sales order below is the pricing structure with variant pricing.

 Condition Type Variant Price VA00 I-CPU 1000 VA00 16 GB 400 VA00 A-Graphic Card 200 VA00 Modem 50

The requirement was to calculate different % of discount on each variant.

 Condition Type Variant Price VA00 I-CPU 1000 VA00 16 GB 400 VA00 A-Graphic Card 200 VA00 Modem 50

Discount

 Condition Type Variant % Amount I-CPU 5% 50 16 GB 2% 8 A-Graphic Card 3% 6 Modem 1% 0.5

Solution:-

We copied VA00 condition type and created ZY00 and changed below fields

1. Calculat. Type   = A (Percentage)

Plus/minus = X (Negative)

Variant Cond. = Activated.

Create a Pricing routine under Condition Formula for Basis (Condition Base Value)  and write below code.

FIELD-SYMBOLS: <fs_xkomv> TYPE komv_index.

CHECK sytcode NE ‘VA23’.
LOOP AT xkomv ASSIGNING <fs_xkomv>
WHERE kschl   EQ ‘VA00’
AND varcond EQ xkomvvarcond.
xkwert
= <fs_xkomv>kbetr.
ENDLOOP.

Assign the pricing routine to discount condition type in pricing procedure.

### Assigned Tags

You must be Logged on to comment or reply to a post.

Thanks.

Hi,

We have a similar problem like you. We also want to apply discounts – which ONLY relates to a specific variant condition.

The difference, compared with your problem is that our discounts should be applied manually (using a Request for Quotation scenario). If I understand your solution – it would work when you have pre-entered the ZY00 conditions via VK11?

So – we will not have any discounts maintained in the system – they should be applied directly on the transaction.

If I just add a condition type manually in the order – I don’t have the possibility to enter any variant name. –> So the text/name that occurs in the description field is the name of the “Condition Type”.

Do you have any idea if this is possible to solve?

Eg

If I place an order on a configurable product which results in the following 3 variant condtions are given:

 Condition Type Variant Price VA00 I-CPU 1000 VA00 16 GB 400 VA00 A-Graphic Card 200

I now want to provide the customer with a unique discount only on this specific order for the I-CPU on 5%. A mentioned - If I would add the ZY00 condition in the order - it would not give me the option to specify the variant it should be applied on... and the "text" shown would be the name of this condition... If I could enter the variant name - then maybe your code above could support this scenario?

… how can I do that? Is it even possible? I personally don’t believe that the scenario is completely unrealistic, but as far as I have seen SAP don’t support this. Any ideas?

BR / Alex