on 05-02-2008 3:10 PM
: With quantity field as a positive value, the quantity has 4 decimal places.
The fourth decimal provided in the input quantity is 9 (greater than 5)
The third decimal will be rounded up to 7.
The quantity value input provided = 143.3469
The quantity field value is rounded as = 143.347.
give me code in UDF
Hi,
You don't required any UDF.
Use standard function FormatNumber.
In number format put 000.000
decimal separator is .(dot)
This will solve your both problems of less than and greater than 9.
Regards,
Rohit
Reward points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Check this It may Help you.
String app="";
if(value.length()>3)
{
app ="-";
}
BigDecimal test = new BigDecimal(value.substring(0,3));
test = test.setScale(2,BigDecimal.ROUND_HALF_UP);
String ret = ""test""+app;
return ""ret"";
https://forums.sdn.sap.com/click.jspa?searchID=11385102&messageID=5058989
Regards,
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.