Skip to Content
author's profile photo Former Member
Former Member

Pricing discount calculation

Hi,

I have a pricing codition and a discount condition is applied on it. If you look in billing document the discount is shown as 8.000 and unit as % . But where as this value is stored in KONV table as 80.00(KBETR). So the same value is being retrieved in my coding, and if try to calculate the percentage getting wrong value. How to get the correct value in my print program? In this case it should be 8.000 not 80.00. How to convert this 80.00(KBETR) to the correct value 8.000 in my code for calculating correct discount vlaue?

Your help is appreciated.

Thank you,

Surya.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 16, 2009 at 06:07 PM

    Hi Surya,

    I faced a similar issue while i was creating a Invoice smartform in which i had to calculate discount on each line item in VBRP table.

    following is the solution----->>

    all the percentage values stored in KONV and KONP table in KBETR field have to be divided by 10 to get the exact percentage value,so u r doing correct take the KBETR value i.e 80.00 and divide by 10 so it will become 8, all % values in KONV-KBETR Field have to be divided by 10 in order to get exact % value.

    Example---->>>

    CLEAR WA_KONV.
          READ TABLE T_KONV INTO WA_KONV  WITH KEY KNUMV = WA_VBRK-KNUMV
                                                KSCHL = 'ZCSV'
                                                KPOSN = WA_VBRP-POSNR.
          IF SY-SUBRC = 0.
            WA_FINAL-ZCSV   = WA_KONV-KBETR / 10.  " percentage value of zcsv divided by 10.
          ENDIF.
    
    

    here, i had earlier filled T_KONV table with values from KONV table,

    now when i am reading the 'ZCSV' Condition which in in % ,

    see the above code we are dividing the KBETR value from KONV table for condition 'ZCSV' as its a % amount.

    Hope this resolves ur issue,

    Regards,

    Akash Rana

    Edited by: AKASH RANA on Aug 16, 2009 8:20 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.