on ‎2012 Jan 02 8:07 AM
Hi All,
I am trying to compare Target value is more than 1 million.
Target value is a extension field in Contracts where user will enter amount and based on this value I have display some message.
I got the value using method doc.getExtensionField, but I am unable to compare it.
I tried parsing to integer, direct comparision with 1 Million but no success.
Can anyone help me in converting currency value to interger and then compare or any other alternative to compare it.
Regards,
Prabhat
Request clarification before answering.
Hi
Try using the following:
Value=doc.getExtensionField("EXTENSION FIELD ID").get().getPrice();
Regards
Mudit Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mudit.
I have tried this and I got error" Sourced file: inline evaluation of: ``//developed by SAP //imports import java.sql.PreparedStatement; impo . . . '' : Type mismatch in operator. class java.math.BigDecimal cannot be used with class java.lang.Integer".
Which method can be used to convert 1000000 value to Float value, I am getting this error because I am trying compare float value with integer.
Solved it by using Float.parseFloat("VALUE").
Regards,
Prabhat
Edited by: Prabhat Pandey on Jan 2, 2012 3:02 PM
Solved it by using method Float.parseFloat().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.