cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping for a particular field

Former Member
0 Kudos

HI Friends,

In my source structure i have field called "Purchase ID". I need to map this field to target based on one criteria as follows :

Only the following Purchase ID's should be considered from source xml.

Purchase ID

100

101

102

103

104

I should not pick any other values. If i get any other values. we should throw expection.

Kindly guide me friends.

Renu

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Use function "FixValues" for this.

Add all values to the function, click on "throw exception"

Former Member
0 Kudos

Hi ,

I used Fixed Values. I added all the values under 'value column' and chose 'throw expection' option

What i have to use under Key column ?

When i places some dummy texts under key column and tried to test in Test tab. I got the following error

Exception:[java.lang.IllegalArgumentException: No value found for '101'] in class com.sap.aii.mappingtool.flib7.TextFunctions method fixed_values[101, FixedValues{ purchase1=101}, com.sap.aii.ib.bom.flib.types.ValueMappingStrategy@1f5c37b, , com.sap.aii.mappingtool.tf7.rt.Context@6a12bdc] com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.IllegalArgumentException: No value found for '101'] in class com.sap.aii.mappingtool.flib7.TextFunctions method fixed_values[101, FixedValues{purchase1=101}, com.sap.aii.ib.bom.flib.types.ValueMappingStrategy@1f5c37b, , com.sap.aii.mappingtool.tf7.rt.Context@6a12bdc]

kindly guide me

Former Member
0 Kudos

Hi,

U have to pass the source values like 101,102 etc under "Key" column and in the value section u need to enter the data which u want to pass to the target filed.

Thanks

Amit

stefan_grube
Active Contributor
0 Kudos

> I used Fixed Values. I added all the values under 'value column' and chose 'throw expection' option

> What i have to use under Key column ?

The same values. key and value should be identical.

Former Member
0 Kudos

Hi Stefan,

Thank you much Stefan. It is working now.

Thank you Team .

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

it is very simple, write simple UDF to check the value is in list or not, if it is not thorw java execption,that means your mapping will be failed,

are you sure that you want throw execption??

Regards,

raj

Former Member
0 Kudos

Hi Raj,

Can you give udf code for this requierment ?

Renu