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

Rounding the value

Hi Guru's,

i am getting one problem while doing the sales order.i am using two condition types.mwst-service tax

mwes-Education cess

i have given the calculation type 17 for Education cess in the pricing procedure.

in the sales order its showing that suppose if the service tax is Rs 2.78 , system is takling RS2.80. i want this value to be Rs 3.

If Service tax Is Rs 2.28 paise i want it rounded to be Rs 2.

Thanks in advance

Regards

Satya.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 06:29 AM

    Hi Satya,

    You can write a routine in 'VOFM" and include that in front of your condition types in Pricing Procedure.

    Reward points if it helps.

    Regards

    Karan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 11:40 AM

    Hi Satya,

    you can modify condition value formula to always round up for your condition type.

    Something like :

    • round up result

    z_arbfeld = ( xkomv-kawrt * xkomv-kbetr ).

    if z_arbfeld ge 0.

    z_arbfeld = ( z_arbfeld + 49999 ) / 100000.

    else.

    z_arbfeld = ( z_arbfeld - 49999 ) / 100000.

    endif.

    xkwert = z_arbfeld.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 06:22 PM

    Hi,

    With the help of Abaper, you will be able to use this as a solution for rounding to rupees.

    -


    Include RV64A601

    • rounding rule for closest interger value

    FORM FRM_KONDI_WERT_601.

    • data: da_xkwerx(15).

    • unpack xkwert to da_xkwerx.

    *

    • move '00' to da_xkwerx+13.

    *

    *

    *

    • pack da_xkwerx to xkwert.

    data : lgort1 like lips-lgort .

    data : d1(13) , d6(13) .

    data : d2 type p decimals 2 .

    data : d3 type p decimals 0 .

    data : d4 type p decimals 2 .

    data d5(2) .

    data : d8(3) .

    unpack xkwert to d1 .

    d2 = d1 .

    d3 = d2 .

    unpack d3 to d6.

    d5 = d6+11(2) .

    if d5 >= 50 .

    d8 = 100 - d5 .

    d1 = d6 + d8 .

    else .

    d1 = d6 - d5 .

    endif .

    *pack d1 to xkwert .

    select single lgort into lgort1 from lips where

    vbeln = komp-vgbel and

    posnr = komp-vgpos .

    IF SY-SUBRC = 0 .

    if lgort1 = 'JSTO'.

    d1 = 0 .

    pack d1 to xkwert.

    else .

    pack d1 to xkwert.

    endif .

    ELSE .

    pack d1 to xkwert.

    ENDIF .

    -


    Regards,

    Rajesh Banka

    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.