on 01-04-2006 1:19 PM
Hi,
Is it possible to remove context only for one level?
For Eg:If I apply [RemoveContext] function to <Item>
I will get {A1,A2,B1,B2,C1,C2,C3,C4}
<SourceRoot>
<A>
<Item r="a">A1</Item>
<Item r="b">A2</Item>
</A>
<A>
<Item r="a">B1</Item>
<Item r="b">B2</Item>
</A>
<A>
<Item r="a">c1</Item>
<Item r="b">c2</Item>
<Item r="c">c3</Item>
<Item r="d">c4</Item>
</A>
</SourceRoot>
But I need only those coming under a particluar <A> .
Like {B1,B2}.
Any way to do this?
Can anyone help.
Thanks in Advance
Message was edited by: Chemmanz
When you want to increase the context reference by one level, you right click on the source element and set the context here instead of using the function removeContext.
But in your case there are only two levels for item, so it would not make any difference.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I was just trying to give an example. In my real case
SOURCE - INVOIC01 IDoc
TARGET - cXML Structure for Invoice.
When it goes to Line item level the complexity comes.
A similar situation as i explained needs to be solved.
[REMOVECONTEXT] helped me a lot.
But I this situation I want to restrict it to a single level.
For Ex:
<INVOIC02>
<IDOC>
<EIEDP01>
<EIEDP02 QUALF="001">.. </EIEDP02>
<EIEDP02 QUALF="002">.. </EIEDP02>
..
<EIEDP02 QUALF="0xx">.. </EIEDP02>
...
</EIEDP01>
<EIEDP01>
<EIEDP02 QUALF="001">.. </EIEDP02>
<EIEDP02 QUALF="002">.. </EIEDP02>
..
<EIEDP02 QUALF="0xx">.. </EIEDP02>
...
</EIEDP01>
....
</IDOC>
</INVOIC02>
1.<EIEDP01>
<=== mapped directly to ==> <InvoiceDetailOrder>
Then internal things are organized differently in
<InvoiceDetailOrder> compared to IDoc element<EIEDP01>
Ex:
I want to take all the <EIEDP02>s coming under one line Item <EIEDP01>
<EIEDP02> cannot be mapped diectly to cXML element. It can be done only after checking it's own attribute QUALF.
For this I applied [REMOVECONTEXT], but i am getting all the QALF values.
I need to restrict it to <EIEDP01> level.
Regards
Chemmam
Now I see. The problem is not the EIEDP02, this has the correct context reference. It is QUALF. As attribut the context reference is EIEDP02.
When you have
QUALF
= - createIf - InvoiceDetailOrder
001 /
Then right click on QUALF and set the context reference to EIEDP01.
I hope, I have understood the problem correctly.
Regards
Stefan
Hi,
You should be able to do that, but for that one need to know how to select a particular <A> tag. For the mapping of <Item>, we have combine a condition where in it checks for the <A> condition and then removes all other item values.
Could you post the required condition for what <A> tag needs to be selected.
Thanks,
Renjith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I will explain it more clearly
Source Structure
=================
<SourceRoot>
<A>
<Item r="a">A1</Item>
<Item r="b">A2</Item>
</A>
<A>
<Item r="a">B1</Item>
<Item r="b">B2</Item>
</A>
<A>
<Item r="a">c1</Item>
<Item r="b">c2</Item>
<Item r="c">c3</Item>
<Item r="d">c4</Item>
</A>
</SourceRoot>
Target Structure
=================
<DestRoot>
<AA>
<AAItem></AAItem>
<AA>
</DestRoot>
Mappings
=========
<SourceRoot> <====> <DestRoot>
<A> <====> <AA>
<Item> <== only those items Where r="a" is to be mapped to ===> <AAItem>
I tried like this
If r->[REMOVECONTEXT]->[Equals "a"]->then Map <Item> to <AAItem>
After [REMOVECONTEXT] it will produce {a,b,a,b,a,b,c,d} in all the three rows.
Which produces unwanted results.
I want only {a,b} in row1.
I want only {a,b} in row2.
I want only {a,b,c,d} in row3.
That is I want to restrict [REMOVECONTEXT] to only one level, not for the complete XML Document.
Regards
Chemmam
User | Count |
---|---|
95 | |
11 | |
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.