cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Comparing target value is more than 1 Million

Former Member
0 Likes
207

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi

Try using the following:

Value=doc.getExtensionField("EXTENSION FIELD ID").get().getPrice();

Regards

Mudit Saini

Former Member
0 Likes

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

Answers (1)

Answers (1)

Former Member
0 Likes

Solved it by using method Float.parseFloat().