cancel
Showing results for 
Search instead for 
Did you mean: 

Value Mapping Default Value

Former Member
0 Kudos

Hi,

Is it possible to set a default value in the value mapping of XI.

For example:

<b>Value1a</b> should be<b> Value1b</b>

<b>Value2a</b> should be <b>Value2b</b>

and all other possible values should be "<b>Default</b>"

I don't see such a possiblity in the Value mapping configuration of the Directory.

Regards,

Robin

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Robin,

Did you get how to default value in Value Mapping table? I have the simmilar requirment. Please share the soloution, if you have.

Regards,

Shweta.

Former Member
0 Kudos

Hey,

we can set default value by using FIX Values function in conversions.

for Ex: DCO -> 100, SCO->200 and all other options it points to default value

( which you have to set in Default tab in the Fixvalues)

Cheers.,

Esha

Former Member
0 Kudos

I know that i can do this in the mapping .. but is there any possibility within the value mapping function. Without touching the mapping.

Regards,

Robin

Former Member
0 Kudos

Hi Robin,

Just a thought, but may not relate to ur scenario..

If we access Value Mapping via Java Mapping and if no look up value is found, then we can catch that exception and return a default value.

But we need to check if there is any way to do this in graphical mapping.

Regards,

Sudharshan

former_member189558
Contributor
0 Kudos

Robin,

There is a function for populating default --- "<b><i>mapwithDefault</i></b>" under the node functions ....

It is meant for that ...

Cheers,

Himadri

Former Member
0 Kudos

No,

that will only set a default if source field in empty.

But my isn't empty ... i have for example

30 possilbe source countrys and my value mapping to language look like:

Switzerland-> CH

France -> FR

Germany -> DE

Croatia -> HK

And all other Country should be map with default language "EN".

Regards,

Robin

Former Member
0 Kudos

Hi Robin,

it's a little bit tricky but you could try this approach:

<b>value mapping table</b>:

- Switzerland: CH

- France: FR

- Germany: DE

- Croatia: HK

- DEFAULT: EN

<b>Mapping blocks</b> (with graphical mapping, but the description is Java like style for easy description):

if ( valuemapping(source) == source ){ //not found

target = valuemapping(source)

}else{

target = valuemapping("DEFAULT")

}

It's just an idea,

Hope it helps,

Kind Regards,

Sergio

Former Member
0 Kudos

Another possibility is to use the mapping functions in the DESIGN part, in the message mapping (in this case you have for sure the "DEFAULT" case managment) :

Executes a value mapping using a fixed value table that you complete using the function properties. The table is saved together with the most current message mapping and can only be used once.

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm">Docu</a>

Regards,

Sandro