on 03-19-2014 10:51 PM
Hi All,
I have a Java mapping requrement for which I would like some suggestions.
I have 3 variables:
1) price
2) price factor
3) pricing condition
There is already quite a bit of logic determining these.
The new requirement is that if the price has a precision greater than 2 (eg 1.234 but not 1.23) then:
1) set price = price * 10
2) set price factor = 10
3) set pricing condition = "ZMPE"
Since it is unclear to me that there is an easy way to modify the current logic, I would rather try to take the current output for these 3 variables and override their values in the way described above. (I did try modifying the current logic but I have found it gave me problems.)
So is there a simple way that I can take the current values and override them in the way described. For instance can I do this with a single User Defined Function.
Thanks in advance.
Cheers
Gerard
Hello,
I think, u can do it.
BTW, i believe u are using graphical mapping? right?
So what u can do is, create a UDF having 3 inputs (Price, Price Factor and PricingConditions) and 3 outputs (3 Results) and inside ur udf evaluate conditions.
For instance if the number of digits after decimal is greater than 2 then output ur new values otherwise (in the else block) pass the input (which is nothing but your current output) as the output of ur UDF.
Just to add, the input to ur UDF will be ur current output.
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.