cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect Net Price in Pricing proceduere

Former Member
0 Kudos

Hello Gurus,

Wrt to above screenshot, it is evident that Net price displaying on top is different from the line item.

In top it is adding condition type znct value , i.e. 115.98= -116+0.02

I am not able to understand why the value of ZNCT is added to the net price and hence giving wrong Net price at top of the Pricing schema.

Please share your thoughts.

Regards

Rohit

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Rohit,

problem is with your pricing procedure...

1) ZPR2 = 0.01 * 2 (qnty) = 0.02

you are calculating " net price after disc" from ZPR2 i.e 0.02

( check your pricing procedure - from and to columns - value 5)

again you are calcaulating ZPD3 (net value) from " net price after disc" i.e 0.02

(check your pricing procedure - ZPD3 contains 45 in from and to columns of ZPD3)

Please note that from and to columns are to summation of those condition types.

Since you are using only ZPR2 value i.e 0.02, for ZPD3 also it is showing 0.02 only....

no wrong with your routine..... 

maintain From and To columns properly....

Former Member
0 Kudos
Former Member
0 Kudos

Hi Rohit,

Can you show us the coding of CalTy 907 assigned to for e.g. ZNET?

Awaiting your reply in this regard.

Regards

SD

Former Member
0 Kudos

Hi Samir,

Thanks for revert. Here is the code  for the Caltype 907.  I have asked for abaper to check it but according to him the issue is not because of this. However please look into it.

Regards

Rohit

FORM FRM_KONDI_WERT_907.

*{   INSERT         DEVK902868                                        5

***DATA : w_tax TYPE VKPBR,

***       l_tax TYPE kwert,

***       l_kwert TYPE ekpo-NETWR,

***       l_kwert_1 TYPE ekpo-NETWR,

***       L_KOMV TYPE KOMV.

***

***CLEAR : w_tax,w_tax,

***       l_kwert ,

***       l_kwert_1 ,

***       L_KOMV.

***

***data : w_tax type VKPBR,

***       l_div type p decimals 5,

***       l_sum type p decimals 5,

***       l_kbetr type konv-kbetr,

***       l_kwert TYPE ZCURR,"konv-kbetr,"ekpo-NETWR,

***       L_KOMV TYPE KOMV.

***

***clear : l_div , l_sum.

***if Xkomv-kschl eq 'ZPD2'.

***LOOP AT XKOMV INTO l_komv.

***  CASE l_komv-kschl.

***    WHEN 'ZVAT' or 'ZVCE' or 'ZCST' or 'ZCCE' or 'ZADD' or 'ZSVT'.

***      l_div = l_komv-kbetr * 100000.

***      l_div = l_div / 1000.

***      l_div = l_div / 100.

***      l_sum = l_sum + l_div.

***  ENDCASE.

***ENDLOOP.

***

*** READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZPD1'.

*** IF sy-subrc is INITIAL.

***   l_sum = l_sum + 100000.

***   l_kwert = l_komv-kwert * 100000.

***   if l_sum is not initial.

***   l_kwert = l_kwert / l_sum.

***

***   Xkwert = l_kwert.

***   Xkomv-kbetr = l_kwert.

***   Xkomv-kwert = l_kwert.

***   endif.

*** endif.

***endif.

DATA : w_tax TYPE VKPBR,

        L_KOMV TYPE KOMV,

        l_temp type komv,

        l_cal type komv,

        l_kwert_round type kwert,

        l_tax TYPE ekpo-NETWR,"kwert,

        l_kwert TYPE ekpo-NETWR,

        l_k_TOTC type ekpo-NETWR,

        l_tot type char16,

        l_int type char13,

        l_dec type char2,

        l_div type p decimals 5,

        l_sum type p decimals 5,

        l_cess type p decimals 5,

        l_cess1 type p decimals 5,

        l_kbetr type konv-kbetr,

        wa_ans type i,

        l_kwert_1 TYPE ekpo-NETWR.

***IF Xkomv-kschl eq 'ZPD2'.

***

***LOOP AT XKOMV INTO l_komv.

***  CASE l_komv-kschl.

***    WHEN 'ZVAT' or 'ZVCE' or 'ZCST' or 'ZCCE' or 'ZADD' or 'ZSVT'.

****      l_amt = l_komv-KBETR.

****      w_tax = w_tax + ( ( l_amt / 10 ) ).

***      l_tax = l_tax + l_komv-kwert.

***  ENDCASE.

***ENDLOOP.

***

***endif.

**-------------Start of comment to comment the explicit ZNET calculation---------**

***IF  Xkomv-kschl eq 'ZNET'.

***    READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZPD1'.

***    IF sy-subrc is INITIAL.

***       l_kwert_1 = l_komv-kwert .

***       read table xkomv into l_temp with key kschl = 'TOTV'.

***       IF sy-subrc is initial.

***        l_kwert =   l_temp-kwert.

***        IF l_kwert < 0.

***          l_kwert = l_kwert * -1.

***        ENDIF.

***       ENDIF.

***       clear : l_temp.

***       read table xkomv into l_temp with key kschl = 'TOTC'.

***       IF sy-subrc is initial.

***        l_k_totc =   l_temp-kwert.

***        IF l_k_totc < 0.

***          l_k_totc = l_k_totc * -1.

***        ENDIF.

***       ENDIF.

***       clear : l_tot , l_int , l_dec, l_tax.

***       l_tax = l_kwert_1 - ( l_kwert + l_k_totc ).

***       l_tot = l_tax.

***       condense l_tot.

***       split l_tot at '.' into l_int l_dec.

***       IF l_dec+0(1) GE '5'.

***         l_int = l_int + 1.

***         elseif l_dec+0(1) < '5'.

***         l_int = l_int .

***       ENDIF.

***       clear : L_tax.

***       l_tax = l_int * 100.

***          Xkomv-kbetr = l_tax .

***          Xkomv-kwert = l_tax .

***          Xkwert = l_tax.

***   endif.

***   elseif Xkomv-kschl eq 'ZPD2' .

***

***if Xkomv-kschl eq 'ZPD2' .

***   READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZNET'.

***   IF sy-subrc is initial.

***     l_kwert_1 = l_komv-kwert .

***          Xkomv-kbetr = l_kwert_1 .

***          Xkomv-kwert = l_kwert_1 .

***          Xkwert = l_kwert_1.

***   ENDIF.

***

***   elseif Xkomv-kschl eq 'ZPR0'.

**-------------End of comment to comment the explicit ZNET calculation---------**

     case    Xkomv-kschl.

*      when 'ZNET'.

*        READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZPD1'.

*        IF sy-subrc is initial.

*          l_kwert = l_komv-kwert.

*          l_tax = l_kwert.

*        ENDIF.

*       l_tot = l_tax.

*       condense l_tot.

*       split l_tot at '.' into l_int l_dec.

*       IF l_dec+0(1) GE '5'.

*         l_int = l_int + 1.

*         elseif l_dec+0(1) < '5'.

*         l_int = l_int .

*       ENDIF.

*       clear : L_tax.

*       l_tax = l_int * 100.

*          Xkomv-kbetr = l_tax .

*          Xkomv-kwert = l_tax .

*          Xkwert = l_tax.

      when 'ZPD1'.

        clear : l_kwert.

         READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZNET'.

         IF sy-subrc is initial.

           l_kwert = l_komv-kwert.

         ENDIF.

        LOOP AT XKOMV INTO l_komv.

           CASE l_komv-kschl.

               WHEN 'ZVAT' or 'ZVCE' or 'ZCST' or 'ZCCE' or 'ZADD' or 'ZSVT'.

                 l_tax = l_tax + l_komv-kwert.

           ENDCASE.

        ENDLOOP.

        l_kwert = l_kwert + l_tax.

        l_tax = l_kwert.

               l_tot = l_tax.

        condense l_tot.

        split l_tot at '.' into l_int l_dec.

        IF l_dec+0(1) GE '5'.

          l_int = l_int + 1.

          elseif l_dec+0(1) < '5'.

          l_int = l_int .

        ENDIF.

        clear : L_tax.

        l_tax = l_int * 100.

           Xkomv-kwert = l_tax .

           Xkwert = l_tax.

           Xkomv-kbetr = l_tax .

       when 'ZPD2'.

         clear : l_kwert.

        READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZNET'.

         IF sy-subrc is initial.

           l_kwert = l_komv-kwert.

         ENDIF.

*       LOOP AT XKOMV INTO l_komv.

*          CASE l_komv-kschl.

*              WHEN 'ZVAT' or 'ZVCE' or 'ZCST' or 'ZCCE' or 'ZADD' or 'ZSVT'.

*                l_tax = l_tax + l_komv-kwert.

*          ENDCASE.

*       ENDLOOP.

*       l_kwert = l_kwert + l_tax.

        l_tax = l_kwert.

               l_tot = l_tax.

        condense l_tot.

        split l_tot at '.' into l_int l_dec.

        IF l_dec+0(1) GE '5'.

          l_int = l_int + 1.

          elseif l_dec+0(1) < '5'.

          l_int = l_int .

        ENDIF.

        clear : L_tax.

        l_tax = l_int * 100.

           Xkomv-kwert = l_tax .

           Xkwert = l_tax.

           Xkomv-kbetr = l_tax .

       when 'ZPR0'.

         clear : l_div , l_sum.

       LOOP AT XKOMV INTO l_komv.

           CASE l_komv-kschl.

               WHEN 'ZVAT' or   'ZCST'  or 'ZADD' .

                 l_div = l_komv-kbetr * 100000.

                 l_div = l_div / 1000.

                 l_div = l_div / 100.

               when 'ZVCE'.

                 clear : l_cess , l_cess1.

                   l_cess = l_komv-kbetr * 100000.

                   l_cess = l_cess / 1000.

                   l_cess = l_cess / 100.

                 clear : l_temp.

                 read table xkomv into l_temp with key kschl = 'ZVAT'.

                 IF sy-subrc is initial.

                   l_cal-kbetr = l_temp-kbetr / 10.

                   l_cal-kwert = l_cess * l_cal-kbetr.

                   l_cess1 = l_cal-kwert.

                   l_cess1 = l_cess1 / 1000.

                   l_cess1  = l_cess1 / 10.

                   l_div = l_cess1.

                 ENDIF.

               when 'ZSVT' .

                   clear : l_cess , l_cess1.

                   l_cess = l_komv-kbetr * 100000.

                   l_cess = l_cess / 1000.

                   l_cess = l_cess / 100.

                 clear : l_temp.

                 read table xkomv into l_temp with key kschl = 'ZVAT'.

                 IF sy-subrc is initial.

                   l_cal-kbetr = l_temp-kbetr / 10.

                   l_cal-kwert = l_cess * l_cal-kbetr.

                   l_cess1 = l_cal-kwert.

                   l_cess1 = l_cess1 / 1000.

                   l_cess1  = l_cess1 / 10.

                   l_div = l_cess1.

                 ENDIF.

               when 'ZCCE'.

                   clear : l_cess , l_cess1.

                   l_cess = l_komv-kbetr * 100000.

                   l_cess = l_cess / 1000.

                   l_cess = l_cess / 100.

                 clear : l_temp.

                 read table xkomv into l_temp with key kschl = 'ZCST'.

                 IF sy-subrc is initial.

                   l_cal-kbetr = l_temp-kbetr / 10.

                   l_cal-kwert = l_cess * l_cal-kbetr.

                   l_cess1 = l_cal-kwert.

                   l_cess1 = l_cess1 / 1000.

                   l_cess1  = l_cess1 / 10.

                   l_div = l_cess1.

                 ENDIF.

           ENDCASE.

           l_sum = l_sum + l_div .

           clear : l_div.

      ENDLOOP.

*Calculate at kbetr value.

       READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZMRP'.

       IF sy-subrc is INITIAL.

         l_sum = l_sum + 100000.

         l_kwert = l_komv-kbetr * 100000.

           if l_sum is not initial.

             l_kwert = l_kwert / l_sum.

             IF l_kwert < 0.

              l_kwert = l_kwert * -1.

             ENDIF.

             l_tax = l_kwert.

           endif.

       endif.

        l_tot = l_tax.

*       condense l_tot.

*       split l_tot at '.' into l_int l_dec.

*       IF l_dec+0(1) GE '5'.

*         l_int = l_int + 1.

*         elseif l_dec+0(1) < '5'.

*         l_int = l_int .

*       ENDIF.

*       l_tax = l_int * 100.

        Xkomv-kbetr = l_tax .

        clear : L_tax.

*calculate at kwert value.

clear : l_kwert.

       READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZMRP'.

       IF sy-subrc is INITIAL.

         l_kwert = l_komv-kwert * 100000.

           if l_sum is not initial.

             l_kwert = l_kwert / l_sum.

             IF l_kwert < 0.

              l_kwert = l_kwert * -1.

             ENDIF.

             l_tax = l_kwert.

           endif.

       endif.

        l_tot = l_tax.

*       condense l_tot.

*       split l_tot at '.' into l_int l_dec.

*       IF l_dec+0(1) GE '5'.

*         l_int = l_int + 1.

*         elseif l_dec+0(1) < '5'.

*         l_int = l_int .

*       ENDIF.

*       clear : L_tax.

*       l_tax = l_int * 100.

           Xkomv-kwert = l_tax .

           Xkwert = l_tax.

    when others.

      l_kwert_round = Xkwert.

      l_tot =  l_kwert_round.

        condense l_tot.

        split l_tot at '.' into l_int l_dec.

        IF l_dec+0(1) GE '5'.

          l_int = l_int + 1.

          elseif l_dec+0(1) < '5'.

          l_int = l_int .

        ENDIF.

        clear :  l_kwert_round.

         l_kwert_round = l_int * 100.

         IF xkomv-kschl = 'ZDS1' or xkomv-kschl = 'ZDS2' or xkomv-kschl = 'ZDS3' or xkomv-kschl = 'ZDS4' or xkomv-kschl =  'ZDS5'

            or xkomv-kschl = 'ZTED' or xkomv-kschl = 'ZNVA' OR xkomv-kschl = 'ZNCT'.

           l_kwert_round = l_kwert_round * -1.

         ENDIF.

      Xkwert = l_kwert_round.

*     Xkomv-kbetr = l_kwert_round .

      Xkomv-kwert = l_kwert_round.

      endcase.

***w_tax = w_tax + '1.00' .

***CLEAR : l_komv.

*** READ TABLE  xkomv INTO l_komv WITH KEY KSCHL = 'ZPD1'.

*** IF sy-subrc is INITIAL.

***   l_kwert_1 = l_komv-kwert .

***   l_kwert =   l_kwert_1  - l_tax.

****   l_kwert =  ( l_kwert_1 / w_tax ) * 100 .

***   Xkomv-kbetr = l_kwert .

***   Xkomv-kwert = l_kwert .

***   Xkwert = l_kwert.

***

*** ENDIF.

***Data : w_rty  type p decimals 3 ,

***      w_mrp like konv-kbetr,

***      w_var1  type p decimals 3,

***      w_i type p decimals 3 ,

***      w_i3 type p decimals 3 ,

***      w_i2 type p decimals 3 .

***

***BREAK pwc.

***clear w_rty.

***if Xkomv-kschl eq 'ZPD2'.

***loop at Xkomv.

***

*** Case xkomv-kschl.

***   when 'ZVAT'.

***

***  w_rty  =  W_rty + xkomv-kbetr.

***

***

***   when 'ZVCE'.

***

***  w_rty  =  W_rty + xkomv-kbetr.

***   when 'ZADD'.

***

***  w_rty  =  W_rty + xkomv-kbetr.

***    when 'ZSVT'.

***

***  w_rty  =  W_rty + xkomv-kbetr.

***    when 'ZCST'.

***

***  w_rty  =  W_rty + xkomv-kbetr.

***    when 'ZCCE'.

***   w_rty  =  W_rty + xkomv-kbetr.

***

***endcase.

*** endloop.

***

***Read table xkomv with key kschl = 'ZPD1'.

***  If sy-subrc eq 0.

****   w_mrp = xkomv-kawrt .

***   w_mrp = xkomv-kwert.

***   endif.

***

***  Read table xkomv with key kschl = 'ZPD2'.

***

***  If sy-subrc eq 0.

**** sunil -  Please change this part of code

**** need to send   to this condition  = Net MRP /  ( 1 + sum of all the taxes which is stored in w_rty ).

***w_var1 =   ( w_rty / 100 ) .

***

***w_i2 =  w_var1   *  10 .

***

***

****w_var1 = w_var1 / 10 .

***

***

***

***if w_var1 is not initial .

***    w_i = w_mrp .

***    w_i = w_i * 10 .

***   Xkwert = w_i / w_i2.

***w_i3  = w_i / w_i2.

***Xkwert =  ( w_mrp  /  w_i2 )   .

***Xkwert =  xkwert * 1000 .

***Xkomv-kbetr = xkwert .

***Xkomv-kwert = xkwert .

***Clear w_var1 .

***endif.

***endif.

***

***endif.

*}   INSERT

*{   INSERT         DEVK902868                                        4

*

*}   INSERT

*{   INSERT         DEVK902868                                        3

*

*}   INSERT

*{   INSERT         DEVK902868                                        2

*

*}   INSERT

*{   INSERT         DEVK902868                                        1

*

*}   INSERT

ENDFORM.

moazzam_ali
Active Contributor
0 Kudos

Hi

I got your current calculations. Now what exactly you want system to show in net price and in tax?

Meanwhile please check these.

Why VPRS is not coming here?

Why have you assigned 25 routine with your ZNCT condition type. You have no value in KZWI1 so what is the purpose of using this 25?

Try this pricing schema without 907 routine. I think this is the cause as I can see you have hard coded condition types in routine coding. I am not very good in coding but I have a feeling that this could be the cause. Test without 907 routine once and see the net value.

Thank$

Former Member
0 Kudos

Hi,

I want only the Net price to be displayed.

Why ZNCT have been assigned 25 routine....

To make it a negative condition type, so that customer does not have to pay VAT /CST as this is a replacement good under waranty.

I have tried the pricing schema w/out 907 but no positive result.

Anyhow, I appreciate your inputs.

Regards

Rohit

moazzam_ali
Active Contributor
0 Kudos

I want only the Net price to be displayed.

Does it mean you don't want to display tax in tax field?


To make it a negative condition type, so that customer does not have to pay VAT /CST as this is a replacement good under waranty.

This is another thing which we do in a different way. If this is a material under warranty which means it is free item and customer won't pay for it. Why don't you use free goods pricing on it instead of making tax negative?

Thank$

Former Member
0 Kudos

Hi Moazzam,

As regards to Net Price, I want only net price to be displayed as same as it is coming in the line item.

Tax field can remain displayed too.

Now coming to Free goods pricing,  The client does not wish to use separate order type for free goods.

In the same pricing procedure, we have to accomodate both the scnearios.

Like free goods replacement  within Warranty Period ..

Purchased Free goods post warranty.

Further , the problem resolved when I checked the conidition Type Znct and checked its Text Determination Procedure and changed it to  'Discount /Surcharge'.

Now I need to figure this out.. What has Text Determibnation got to do with Net Price Calculation.

Any ideas..

Regards

Rohit

moazzam_ali
Active Contributor
0 Kudos

Hi

Its strange. Text determination has nothing to do with pricing calculation. Moreover we can use normal pricing and free goods pricing in same order type. Difference will be there in iem category level. We don't create separate order for free goods. Check TAN and TANN item categories for example.

Thank$

moazzam_ali
Active Contributor
0 Kudos

Hi

You need to show us screen shot of your pricing procedure as well.

Thank$