on 12-21-2006 1:40 PM
hi experts in my forms one weight field is there like 'brgew'. but it displaying some decimal. i don't want decimals what to do. how can i round that value.
Hi Pammi,
If your field is EKPO-MENGE and wants to display without decimals then use the following statement in your script editor.
<b>/: &EKPO-MENGE&(.0)</b>
Syntax:
<b>&symbol(.N)&</b>
Here N represents how many decimals should be on to output of a symbol.The symbol should be one of the data types DEC, QUAN or FLTP.
Check this link for formatting options about scripts
http://help.sap.com/saphelp_47x200/helpdata/en/d1/8032cc454211d189710000e8322d00/frameset.htm
Thanks,
Vinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use (.1) in your variable..
Example..
&EKPO-MENGE(.0)&..
I believe this round it..
Check this link for help..
http://help.sap.com/saphelp_46c/helpdata/EN/d1/803479454211d189710000e8322d00/content.htm
Thanks,
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
take second variable of type i and move variable1 to variable 2 then your value gets roundoff like 219.67 to 220
or
take second variable of type c and in write statement
write v1 to v2 decimals 0
go through type conversions you can solve all these kind of issues
Regards
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use as ur requerment for rounding..
check this example...
DATA: I TYPE I,
P TYPE P DECIMALS 2,
M TYPE F VALUE '-3.5',
D TYPE P DECIMALS 1.
P = ABS( M ). " 3,5
I = P. " 4 - business rounding
I = M. " -4
I = CEIL( P ). " 4 - next largest whole number
I = CEIL( M ). " -3
I = FLOOR( P ). " 3 - next smallest whole number
I = FLOOR( M ). " -4
I = TRUNC( P ). " 3 - integer part
I = TRUNC( M ). " -3
D = FRAC( P ). " 0.5 - decimal part
D = FRAC( M ). " -0.5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's not decimal places in weight filed some value like 441.967 values is coming i have to round that in forms like 442.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
take field as data: V1 type p decimals 2,
V2 type p.
move brgew to V1.
now, move V1 to V2 due to which decimals are truncated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.