cancel
Showing results for 
Search instead for 
Did you mean: 

Quiet Simple Mapping problem

Former Member
0 Kudos

Hi,

I am trying to map constant value based on some condition from source field. Its throwing error. The scenario is as follows.

The design is,if some parameter at source X = "OSP" then, set "ST" = target-field.

I am getting an error ""Compilation of xxx successful Cannot produce target element /xxx/Loop-ST/Loop-HL/Loop-N1/Segment-N1/Element-98. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"".

Is I need to write java UDF for the above mapping? Can't I do with Graphical mapping?. since, I am trying with graphical mapping(source_element EqualString constant(OSP) IfWithOutElse Constant(ST) Target_Element) but getting error.ITs working fine with UDF.

if (X == "OSP")

return "ST";

Thanks

Manmadha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

make sure that all the mandatory fields have been mapped and also the root node has been mapped correctly to receiver root node.also check if <i>Element-98</i> has been mapped correctly

Thanx

Aamir

Pl:Give meaningful subject to your thread

Message was edited by:

Aamir Suhail

Former Member
0 Kudos

Hi Aamir,

Thank you for your quick reply.

All The root nodes I have mapped to Constants and All mandatory fields are mapped.My scenario is working fine, just I am curious to know whether I can do with graphical mapping or not i.e Without using UDF? for this same kind of situations, I have created around 10 UDF's rather than doing graphical mapping.

Note:- If I am getting the error with inappropriate mapping, then it shouldn't work for UDF and my scenario couldn't execute from EDI-ECC.

Thanks

Manmadha.

Former Member
0 Kudos

ofcourse you can do this without UDF,if you say all the nodes have been mapped correctly and the UDF is working fine then the problem will be in the way you have implemented If-Else standard function.

in case If-Else does not work and UDF does then just drop the idea of using If-Else and use UDF for it:)

Thanx

Aamir

Former Member
0 Kudos

Aamir,

<<<<<<"

ofcourse you can do this without UDF,if you say all the nodes have been mapped correctly and the UDF is working fine then the problem will be in the way you have implemented If-Else standard function

">>>>>>

Can you please help me in this regard that where couldn't I did Correct..

(Source field)E1ADRM1-->PARTNER_Q EqualS(Text Equal Operator) "OPS"(Constant) ifWithoutElse "ST"(Constant) (Target field) Element-98

If there is any problem in the above mapping step,please suggest.just i have used 6 buttons(2 constants, 1-IF, 1-equal, 1-source, 1-destination). Just for curious and I need help in this regard ,why this is not working?

Thanks

Manmadha

bhavesh_kantilal
Active Contributor
0 Kudos

Is the output field a 1..1 field?

What happens when when this field is not equal to OPS?

Not sure how your contexts are , but to the output of the Ifwithout else, put a removecontexts and give this a shot.

Regards

Bhavesh

Former Member
0 Kudos

>>EqualS(Text Equal Operator

which function is this?

we have equalsS(which you have to use in your case,used in case of string) or we have Equals(used in case of boolean values,you don't have to use this)

make sure u have used equalsS of the <i>Text</i> category

Thanx

Aamir

Message was edited by:

Aamir Suhail