cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Help

Former Member
0 Kudos

Hi Experts,

I need ur valuble suggestion to do mappping for the following structures

Source Target
A         A(1...1)
B         ---B(1....unbounded)
C         ------C(1...1)
D         ---------D(1....unounded)
E          ------------E(1....1)

I did the graphical mapping. But here the problem i got was

All the C,D&E fields got mapped with the first occurance of B itself.

So for the second occurance of B it is giving an error message as unable to produce the field /A/B[2]/C.

I am doing an File to IDoc scenario.

Please dont refer any blogs or links. The scenario is able to execute sucessfully except this error.

Please help me out in writing and UDF to do this....

Thanks in Advance....

Surely Points will be awarded for the helpfull answers

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Okay, when you've a nested structure in your target XML document you'll have to set the context changes at the correct place.

For example, if you have a target structure like that:

A occurs once

B occurs twice

C occurs twice (one below B[1] and one below B[2])

D occurs four times (two below C[1] and two below C[2])

B: you should map B directly from soure element B. There should not be a context change between both values in the queue as they're on the same level:

value1

value2

C: you should map C directly from source element C. There should be a context change between both values in the queue:

value1

[ContextChange]

value2

😧 you should map D directly from soure element D. There should be a context change between value2 and value3 in the queue:

value1

value2

[ContextChange]

value3

value4

But I don't know your rule from your flat structure how the elements C/D/E should be inserted below the B node to set the ContextChanges between the right elements. Without that information I cannot give you a hint for your UDF. Maybe you can give a small source and target message as an example?

Former Member
0 Kudos

Hi Saravana,

that should be possible without writing a UDF as you have the same source / target structure.

When you map the node C/D/E(Source) --> C/D/E(Target), be sure that you always have a context change between your values when you have a look at the queues in the test tab. The context change shows the different B nodes you'd like to match for your C/D/E values. When you have all values just in your first B node, I think you actually have all C/D/E values in just one context.

As a prerequisite, is your B (Target) node correct what means does it repeat as often as you have it in the source structure?

Best regards

Lars

Former Member
0 Kudos

Sorry, just have seen that you wrote B/C/D/E are on the same level. I thought from your graphical representation that C/D/E are below the B tag.

Former Member
0 Kudos

>>that should be possible without writing a UDF as you have the same source / target structure.

I have the same source and target structure but the source is a flat structure and the target is a nested structure..

>>As a prerequisite, is your B (Target) node correct what means does it repeat as often as you have it in the source structure?

Yes the B node repeats in target as many times as it is in source...

When I do a one-to-one mapping all the node of D & E comes under the first occurance of C itself.So for the Second occurance of C i.e C[2] it is not able to produce the node D. this is my error....

Former Member
0 Kudos

Hi there....

Any inputs on this mapping by using an UDF.....

Message was edited by:

saravana kumar

former_member214364
Active Contributor
0 Kudos

Hi saravana,

Whats the hierarchy of element in source structure.

All A B C D E nodes in source strucutre are in same level?

i look forward to hearing from you.

Cheers,

Jag

Former Member
0 Kudos

Hi Jagadish,

Yes all A B C D E are in same level in source.

I have done a content conversion from file in the source so they are in the same level.

Can we do two level hierarchy in FCC..

Shabarish_Nair
Active Contributor
0 Kudos

<i>Yes all A B C D E are in same level in source.

I have done a content conversion from file in the source so they are in the same level.</i>

>>>

In such a case, you will not be able to achieve the results via Graphical mapping. Ypu will have to go in for XSLT or Java mapping here.

<i>

Can we do two level hierarchy in FCC..</i>

>>>

unfortunately ... NO !!!

Former Member
0 Kudos

Thank u Sabarish

I have not done Java Mapping till now.

Can u give me an overall picture of how doing to do this mapping....

Jagadish: I am looking for your response tooo...

former_member214364
Active Contributor
0 Kudos

Hi Saravana,

Could you please tell me occurrences of Source nodes(A,B,C,D,E)?

Shabarish_Nair
Active Contributor
0 Kudos

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

Thats a good guide about java Mapping.

Former Member
0 Kudos

Hi Jagadish,

It is same a the target...

A 1...1

B 1... Unbounded

C 1...1

D 1... Unbounded

E 1....1

former_member214364
Active Contributor
0 Kudos

Hi Saravana,

i just want to confirm with you that

if B in source message repeating twice then all elements under B i.e C,D,E must repeat 2 times as node B.

and is there any common element in Nodes B,C,D and E ?

Former Member
0 Kudos

Hi jagadish....

Thanks for your reply....

>>is there any common element in Nodes B,C,D and E ?

No such comman elements.....