on 05-28-2015 3:58 PM
So i've got a flat file pi is picking up. Two fields for price, unit price and price..
I've written a if statement like the attached.
I was hoping that in there, because i've written a EqualsS and used IF. I could pass values that have 0.00 value and send them as 0.01 values, the reason for this is the purchase requisition in ECC cant handle 0.00 values.
This doesnt seem to work as the XML being passed still is having 0.00 values as per the test source file im sending in..
Attached is my source file, below is my output in XML. Any ideas what im doing wrong?
EqualS should work. Did you test your mapping locally? You can even use the displayqueue(right click on if then else -> display queue) function to verify the same.
Make sure that the mapping objects is activated and cache is updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mapping works internally, results below. Just when the XML is generated, it comes out with an incorrect price. Its like it loses whatever PI does to the file when the xml is generated...
I've also been told to handle blank prices. Would i just create another IF statement - any ideas how i can handle both blank prices and those with 0.00 price?
Hello George,
1. Since its working in your local testing, there seems to be issue with Cache. Can you do some dummy changes, SAve & Activate again. Check whether Cache is Up To Date in monitoring.
2. For your next query on checking for Blank, you cna simply add 1 more OR condition to your check.
UnitCost equalsS 0.00
OR
UnitCost equalsS ""
Ands then pass the Output of this OR to IF Else Condition.
Hope it helps
Regards,
Azhar
Hi George,
The mapping logic is good. The issue might be due to cache issue. Just copy that message mapping with another name in ESR. Mention this new MM in your OM. After this, test end to end and check the output.
Regarding your blank query, I echo with Azhar, besides comparing with 0.00 value, also check with a balnk value and give these two outputs to a OR boolean function-->remaining everything remains as it is.
Regards
Vishnu
Thanks Azhar,
This has been helpful and i've gotten it to pass the right data.
But now theres another issue, in that i need to handle a 3rd condition. If the price comes across as as single zero. i.e '0'
Should i just put a if statement in that says 'If prices = less than 0.01, then use constant of 0.01. and then the OR if price = ' ' then use constant 0.01?
What would be useful is an example of the mapping functions - including graphics. Does anybody know of such a Url?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.