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

regarding decimal points in scripts

Hi Everyone,

i have finished a script, where in the final output i am getting decimals, its a quantity field vbrp-fkimg, how do i avoid it....and where do i do it....

thanks in advance,

capc

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

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

    Hi,

    <b>&symbol(.N)&</b>- Display upto <b>N decimal places</b>

    Just specify 0 for not to display any decimals

    <b>&VBRP-FKIMG(.0)&</b>

    Check this link to get format options in scripts

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/sapscript&

    Thanks,

    Vinay

    Add a comment
    10|10000 characters needed characters exceeded

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

    Hi

    If you want always to print the number without decimals:

    &VBRP-FKIMG&(.0)

    If you need to print the number in according the measure unit, try to use a char variable:

    - In program

    WRITE: VBRP-FKIMG UNIT VBRP-MEINS TO FKIMG.

    - In sapscript

    &FKIMG&

    Max

    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.