cancel
Showing results for 
Search instead for 
Did you mean: 

regarding decimal points in scripts

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

thanks a lot problem solved

Answers (1)

Answers (1)

Former Member
0 Kudos

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