cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in message mapping

Former Member
0 Kudos

Hi All,

In my scenario, I am getting a string with length 14.

I need to extract 8 digit date from it and map it to target field of length 8. Problem is that, when i look into the display queue in mapping, I am getting correct result. But whenever I am trying to test the whole mapping its giving error on that perticular field as

Cannot produce target element . Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd .

Thanks in advance,

Reyaz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi reyaz,

you can try FormatNum function under Arithmetic.

or you can also go for user define finction which can convert string value into date format using simple java code

regards,

navneet

Former Member
0 Kudos

I am already using an udf. It is able to produce required string. and I am able to see it in queue. But at the target field Iam getting error as

Cannot produce target element

target field is string of length -8

my result is also string of -8 lengeth

Regards,

Reyaz

Former Member
0 Kudos

Hi Riyaz,

This problem occurs when you have a mistyped source field name or a mandatory field not filled or any issues like that.

Go thouroughy through the field list, And make sure you are not missing anything.

thanks

Sebin

prateek
Active Contributor
0 Kudos

1. Does the date u r trying to send has some separator? Like "/" in 06/12/1983, then there is a length mismatch.

2. Also the UDF output is in string format and i think ur target element is date field and not a string

3. Are u checking with the blank field also? Have u handled that situation.

Regards,

Prateek

Former Member
0 Kudos

HI prateek,

content of result(ddmmyyyy) is date but target field is string of length 8. If i pass a constant of length 8 , its working fine.

Thanks,

Reyaz

Answers (0)