cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify there is no translation value in Value Mapping

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

>>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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Any other inputs pls??

Cheers,

Valli.

Edited by: Sreevalli Sista on Jul 24, 2008 8:42 PM

Former Member
0 Kudos

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]

Former Member
0 Kudos

Hi,

Helpful PDF...

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5]

Former Member
0 Kudos

>>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

Former Member
0 Kudos

Aamir,

I am refering to value mapping and not the fixed mapping. Please let me know of this option is available for value mapping too as I dont find it. Help me with a screenshot if it exists.

Thanks,

Valli.

Former Member
0 Kudos

Oops my bad,i messed up between value mapping and fixed value:)

I m not sure about default value in Value mapping,lemme try to find it out and get back to you

Aamir

Former Member
0 Kudos

could anyone help me with this ASAP.

Thanks,

Valli.