cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal problem in Alternative formula for condition base value

former_member377333
Participant
0 Kudos

Dear All,

For Basic value calculation we have used the below Alternative formula for condition base value with help of our ABAP guy.

It was working for single decimal (12.5%) only.

Now we unable to change this for two decimal(12.75%) .

our ABAP guy forgotten how to do this.

Pl. guide me.

eg:

Billing price Inculding Tax : 2500

TAX %                                  : 12.75 %

Basic value (Formula )  : 2500 / [ (100+12.75)/100 ]

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

*&---------------------------------------------------------------------*

*&      Form  FRM_KOND_BASIS_901

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

FORM FRM_KOND_BASIS_901.

* To calculate the basic price from billing price in pricing procedure.

*

*

   DATA: V_RATE TYPE VBAP-KWMENG,

   DATA: WA_XKOMV TYPE KOMV.

   CLEAR: WA_XKOMV.

   CLEAR: XKWERT.

   LOOP AT XKOMV INTO WA_XKOMV WHERE KSCHL = 'JIVP'.

      V_RATE = WA_XKOMV-KBETR .

      V_RATE = ( 100000 + V_RATE ) / 100 .

   ENDLOOP.

    IF V_RATE IS NOT INITIAL.

             XKWERT ( XWORKD * 1000 / ( V_RATE ).

         ELSEIF


         XKWERT = XWORKD.

    ENDIF.

   ENDFORM.    

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks and regards,

Sarran

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I'm not sure why you need ABAPer to calculate tax value which is included in Basic price.

You can maintain calculation type 'H', for a specific condition type which has this tax % and in pricing procedure pass the basic price value to this condition type. It will calculate the 12.75% which is included in the basic price and gives you the value.

Regards,

Sridhar.

former_member377333
Participant
0 Kudos

Hi Sridhar,

We are not calculating TAX value.

We are calculating Basic value from Billing value including tax.

ie. having condition type for Billing value including tax

Regards,

Sarran

Former Member
0 Kudos

Hi,

I believe your client is having price of the material including Tax, so you want to take the tax value from it to get only the price of the material.

If I'm right what I have guessed above, the solution which I have proposed will work.

Ur example of Billing Price including tax : 2500 (Eg: PR00)

Tax % is 12.5% (Eg :JIVP)

Define another condition type lets say ZIVP which has reference condition type as JIVP (this is maintained at V/06 for ZIVP). Maintain same access sequence as JIVP.

Miantain ZIVP calculation type as 'H'.

Since this is refernce condition for JIVP u don't have to maintain seperately 12.5% for ZIVP again. It will populate automatically.

Now in ur pricing pass the Billing value 2500/- to ZIVP and maintain alternate cal type '80' for ZIVP.

Now this ZIVP have value -277.78.

Now in next step take the sum of Billing value (PR00) and ZIVP which will give 2222.22, which is actual value of material.

Now u can adjust your pricing accordingly.

Hope this is helpful.

Regards,

Sridhar.

former_member377333
Participant
0 Kudos

Hi Sridhar,

Thanks for your reply.

Is it work for multiple tax also?

like

Billing price = Basic + VAT+ VAT on VAT

Billing price = 2222.22+ (2222.22 X 12.75 %) + [(2222.22 X 12.75 %)*1%]

pl. guide me.

Regards,

Sarran

Former Member
0 Kudos

Hi,

If I'm not wrong U r asking about surcharge calculation which is included in Billing value.

The same process u can follow as suggested earlier by creating one more condition type Eg: ZIVX (Surcharge on VAT) with Calculation Type 'H', and maintaing '80' calculation type.

Pass ZIVP value to ZIVX to get the surcharge value on VAT. Now sum up Billing price (PR00),

ZIVP and ZIVX, you will get Basic value excluding Tax and surcharge.

Regards,

Sridhar.

former_member377333
Participant
0 Kudos

Hi Sridhar,

I have tested as your steps.

Its working for VAT only case. For VAT and Surcharge case coming some difference.

Pl. guide me.

System Actual (Manual)
ZBPBP incl Tax4620INR4,620.004620.00
ZIVPVAT12.5%-513.33-512.764
ZVOVVonVAT1%-5.08-5.12764
ZBPRBasic Price100%4,111.754,102.11
JIVPVAT12.5%513.97512.7636
JVOVVonVAT1%5.145.127636
ZTAXTotal Tax Amount100%519.11517.8912
Inv Val Excl Freight4,623.61INR4,630.864,620.00

Regards,

Sarran

Former Member
0 Kudos

Hi,

 

I have gone thru ur pricing, few calculations u need to make to
get the correct value and of taxes.

 

One thing which I proposed earlier for ZVOV, replace the calculation type 'H' with 'A' as surcharge is calculated over VAT but not included in VAT value.

 

The calculation I'm pasting below.

ZBP        BP incl Tax                                           4,620.00              

ZIVP       VAT                       12.50%                  -513.33

 

ZVOV    VonVAT                  1%                          -5.13     

 

ZBPR      Basic Price                                           4,101.54              Sum of ZBP,ZIVP,ZVOV

 

                Surcharge                                            5.13                     Cpy from ZVOV With Alt cal '80'

 

                Base for VAT                                      4,106.67               Sum of ZBPR and srchrg

JIVP       VAT                       12.50%                  513.33  

JVOV     VonVAT                 1%                         5.13       

 

ZTAX      Total TaxAmount                                518.46  

Hope this will help you.

Regards,

Sridhar.

former_member377333
Participant
0 Kudos

Hi sridhar,

while calculating ZIVP from ZBP value we have to consider ZVOV value also. 

ie,

The correct Base price (ZBPR)  is 4102.11= (Billing price 4620 - VAT 512.76 -SUR 5.12)

VAT 12.50%:  512.76

Surchar 1 %: 5.12

Total : 4620

Regards,

Sarran

+919677066272

esarran@gmail.com

Former Member
0 Kudos

Hi Sarran,

I'v understood ur requirement clearly now, better option in this case is to maintain condition records for total % of tax in a condition type and pass the billing value to this condition type which has  calculation type 'H' and Alt cal '80'.

512.76 + 5.12 = 517.88 is 12.62% of 4620. (12.5% + 1% on 12.5% = 12.62%).

So maintain seperate condition type with access sequence for fetching 12.62% in pricing.

Anyways u r maintaining JIVP and JVOV as 12.5% and 1% respectively So taxes will be correctly calculated on 4102.11.

No need to maintain ZIVP/ZVOV in this case.

ZBP        BP incl Tax                                           4,620.00              

ZTXT      VAT                       12.62%                  -517.70

               Tax base                                              4102.30 (Sum of ZBP and ZTXT)

JIVP                                     12.5%                     512.7 

JVOV                                   1%                            5.12

This will solve ur issue. There might be slight variance in decimals as the figures are not rounded.

Regards,

Sridhar.