on 08-30-2007 7:43 AM
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>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....
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<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 !!!
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.