on 07-24-2008 1:20 AM
Hi ,
I am using value mapping to translate one of the fields of data. Whenever the input has a translation value, the output is the translated value. But when there is no translation value for the given input in the runtime cache, the output is the input itself. But my requirement is to either error out or send a blank value as output when it doesnt find a corresponding translation value for the given input.
Example:(A,1)(B,2)(C,3) are the values present in the value mapping runtime cache. When the message looks for value mapping for A , as expected it gives an output of 1. Similarly for B and C.
But if the input is "Z", the output is "Z" since there is no lookpu value fo r"Z",which is an anamoly.
Please let me know if you had a prioir experience on this issue and a solution to this.
Thanks,
Valli.
>>But when there is no translation value for the given input in the runtime cache, the output is the input itself
Are you using Java or Message mapping?
The default behaviour of Value mapping is, it throws an error "ValueMappingException" when there is no input values maintained. I guess you are using Java mapping and doing some operation in Catch block.
Regards,
Jaishankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jaishankar, I am pretty much using Messag emapping. Also if you could go through my intial problem statement, when there is no translation value for a given input, it will still give us the input itself as an output and not any ValueMapping Exception. Please help me with a screenshot of the valuemapping exception you are talking of. That would be great help.
Thanks,
Valli.
U can call value mapping functionality in UDF. Write a UDF with VM parameters.... Validate in the Source Value( U can also raise exception in the UDF).
Here is the link...
[http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/value/api/XIVMService.html|http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/value/api/XIVMService.html]
>>But my requirement is to either error out or send a blank value as output
In value mapping table,all the way on the top there is a single column called "Default",just give blank there, if there is no match in the table then the "Default" value is picked which is blank in your case.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.