on 09-10-2014 2:25 PM
I have a complex table with two fields in it. One is an ID field and the other is a decimal value field. I tried setting the decimal value field to a Number type but the values got rounded to an integer. I then changed it back to the default ASCII field type so I could have the full precision. I am using this complex table for a drop down on a transaction screen. The value I select in the complex table drop down is getting saved fine without rounding. However, when I try to use it in a PROD function within an update rule it appears to be rounding the value returned from the drop down. For example:
ComplexTableDropDownField = 1.5
OtherField = 2
PROD(ComplexTableDropDownField, OtherField) = 2
I have confirmed that it is not rounding the other field and that the rule is working correctly if I hard code the values. It only seems to round the complex table drop down value. Any ideas on how to get around this issue?
Christopher,
Where is your PROD rule being used? You say the value is being used as a drop-down on screen. How do you have that screen field configured? Is it tied to a transaction property? If so, what data type is the transaction property? Please post a screen shot of your rule and any other relevant screens concerning the screen field setup, transaction property, etc...
Is the data type of the field where you are using your PROD rule set up as a decimal? If not, that might cause this behavior. Another guess is that you need to convert the complex table field data to a decimal number with the FROM_DECIMAL_NUMBER conversion function before using it with PROD.
Need more info to help.
Jason Latko - Senior Product Developer at SAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick reply Jason! The PROD rule is being used as an update rule in another field on the transaction screen. The drop down field is tied to a decimal transaction property. I've tried using the FROM_DECIMAL_NUMBER function around the ShuntAmv field in the rule below but it didn't seem to make a difference.
Here is the rule:
Here is the complex data drop down field:
Transaction Property:
Christopher,
What client are you using? Do you get different results depending on the client? Try on the ATE (Agentry Test Environment) where you can turn on debugging for your rule to see what is happening.
I think you said if you hard-code the decimal value, it works, correct? So your field setup must be fine. I can't understand why that would happen. Try getting at the drop-down value differently using:
SCREENFIELDVALUE
ShuntAmv (This is a hand-typed constant)
You could also try looking up the value again in the CT, rather than using the already chosen value:
COMPLEXTABLE
tablename
SCREENFIELDVALUE
ShuntAmv (This is a hand-typed constant)
indexname
returnfield
The second way is redundant obviously because you are using the value already returned in the drop-down to look up the same value again from the CT, but maybe this would help. It seems something about referencing the field directly is rounding it.
Jason Latko - Senior Product Developer at SAP
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.