cancel
Showing results for 
Search instead for 
Did you mean: 

Condition type with reverse pricing

Former Member
0 Kudos

Hi,

We want a condition type which would be calculated based on previous condition value.

Example is below

S.noFromTo C.TypAlt Cal typeAmountQtyCond Value
10ZFNN100055000
20ZVAT9015238.10

ZFNN

Condition class-Surcharge/Discount

Calculation type-Quantity

ZYYY

Condition class-Surcharge/Discount

Calculation type-G(Formula)

Here for ZYNN i want to key in KBETR value 5 manually.

I wanrt the condition value of ZVAT to be =5000*5/(100+5)

The routine 901=should calculate the value like this 5000*5/(100+5),so that Condition value will become as 238.10

We have created routine for alternate calculation.

But my ZYYY value is coming as 250 but not 238.10

I am little new in using routine.

What will be the Condition class,Calcualtion type to be used for ZYYY,should i use From ,to value for this.

Kindly advise me.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

My only doubt now is why the condition type ZVAT is in grey color,

We cannot edit ZVAT in Sales order.Currenlty in the line item condition tab,i add ZVAT with amount 5 and clicked enter,the value is getting updated but it is grey in color,i cannot further edit it.

I have maintained manual entry have priority.In the pricing procedure it is maintained as manual entry only,inspite of this why is it behaving like this.

Former Member
0 Kudos

Now it is working fine,there was a problem with logic,

FORM FRM_KONDI_WERT_901.

*{   INSERT         IRDK900244                                        1

DATA: WA_XKOMV TYPE KOMV,

         V_ZAMT TYPE KBETR,

         V_ZAMT1 TYPE KBETR,

         V_ZVAL TYPE KBETR value '100.00',

         V_ZTOT  TYPE KBETR.

   READ TABLE XKOMV INTO WA_XKOMV WITH KEY KPOSN = XKOMV-KPOSN

                                           KSCHL = 'ZFNN'.

   IF SY-SUBRC = 0.

     V_ZAMT = WA_XKOMV-KWERT.

   ENDIF.

   READ TABLE XKOMV INTO WA_XKOMV WITH KEY KPOSN = XKOMV-KPOSN

                                           KSCHL = 'ZVAT'.

   IF SY-SUBRC = 0.

       IF V_ZAMT IS NOT INITIAL AND

        WA_XKOMV-KWERT IS NOT INITIAL.

         V_ZAMT1 = V_ZVAL + WA_XKOMV-KBETR.

       V_ZTOT = V_ZAMT * WA_XKOMV-KBETR / V_ZAMT1.

       CLEAR : XKOMV-KWERT.

     wa_XKOMV-KWERT = V_ZTOT.

     xkwert = wa_xkomv-kwert.

     MODIFY XKOMV.

     ENDIF.

   ENDIF.

Now it is good.