on 11-22-2007 5:43 AM
Hello,
IDOC - File
The receiver structure:
+MT_CR_AT
++RECV
+++Header
++++field1
++++field2
++++field3
++++field4
+++Orderitm
++++field1
++++field2
++++field3
++++field4
+++Orderchild
++++field1
++++field2
++++field3
++++field4
header is 1....1 which occurs only once
Orderitm and Orderchild are 1.. unbounded which can occur 'n' no of times
As you can see Header, Orderitm, Orderchild are al placed at the same heirarchy
now in the receiver file, I am getting like this:
header data
Orderitm1
Orderitm2
Orderitm3
Orderchild1
Orderchild2
Orderchild3
I want the output to be in the following way:
header_data
Orderitm1
Orderchild1
Orderitm2
Orderchild2
Orderitm3
Orderchild3
If I include Orderitm and Orderchild inside Header node,all the existing mapping will be deleted.
Can I get the required output without changing the Mapping and without changing the heirarchy?
Nikhil.
Hi nikhil,
Make ur strucutre like
+MT_CR_AT
++RECV
+++Header
++++ HeaderFields
+++ORDERS(Add New Node) 0..Unbounded
++++Orderitm 0..1
+++++OrderFields
++++Orderchild 0..1
+++++OrderChild fields
Mapping to the node ORDERS is same as how you have mapped for Orderitm earlier.The content converison parameters are remain same.You will get the desired output as you wish.
I have tested the same at my end.
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi nikhil,
Have you made that ur Orderitem and Orderchild nodes are as subsegments of which was inserted a new node at Header level.Occurence of newly created node is like 0..Unbounded and Occurences for Orderitem and Orderchild is like 0..1.After doing this u r mapping of new node is as similar as you have done for Orderitem. And mapping for Orderitem and Orderchild just map with constants.
It should work and u will get the desired structure. Can you post the strucure how you have tried this?
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI nikhil,
Yes, you will get the desired output, i have done the same at my end.YOu need to add one more node and ur oderitem and OrderChild nodes are to be subsegments of new node.
To ensuring this create that strucutre just with one field of all segments and test the mapping.In your test u can view the desired output. Mapping to the new node as similar as how you did for Orderitem node currently and Mapping for Orderitem and Orderchild nodes are just map with Constant.If you confirm the desired output is coming then go for full structure.
While creating the data type see the strucure once in my previous post.
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nikhil,
You can do like this by making the OrderChild as subsegment for Orderitem segment.
+MT_CR_AT
++RECV
+++Header
++++ HeaderFields
+++Orderitm
++++OrderFields
++++Orderchild
+++++OrderChild fields
Or you can create another DT,MT&MI for above strucuture and do another mapping. In this mapping source message is target message of first mapping and Target message is newly created one. In this way the mapping would be just one to one. Test the MM, if it is giving required strucutre you can go furhterly.
In interface mapping take target MI is as newly created MI.And specify the two mappings. Accordingly change u r Configuration sceanrio. i guess it wouldnot take that much time to do this.
Try this one and let me know your proceedings
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now, I changed the sequence
its working but its displaying in the following way
header
Orderitmfields1|orderchildfields1
Orderitmfields2|orderchildfields2
Orderitmfields3|orderchildfields3
I need it to be
header
Orderitmfields1
orderchildfields1
Orderitmfields2
orderchildfields2
Orderitmfields3
orderchildfields3
Veera,
Now the DT is created in the following way as per your first suggestion:
+MT_CR_AT
++RECV
+++Header
++++ HeaderFields
+++Orderitm
++++OrderFields
++++Orderchild
+++++OrderChild fields
now its displaying one after the other
Header
itm | child
itm2 |child2
itm3 |child3
I did a dummy mapping n the MM is getting disturbed if I add a new node on the top of Orderitm
so, can I do anything that will allow me to put
itm
child
itm2
child2
itm3
child3
in the above manner
thanks
Nikhil
hi nikhil,
as your requirment is you can try as follows.
make one data type of :
+++Orderitm
++++field1
++++field2
++++field3
++++field4
+++Orderchild
++++field1
++++field2
++++field3
++++field4
<b>and add this data type after header in one other data type which is your MT_CR_AT so you will have a bunch of this two Orderitm and Orderchild.</b>
then you can easily copy thuis structure into message mapping and it will be in a proper sequence as your requirment.
hope this will help
regards
HONEY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Honey,
Let me gist you what I understood
create DT at the heirarchy above Header (at the RECV level)
hmm.... i guess in that the order wont be maintained and there is a chance that MM delete as the heirarchy changes
I have a plan in mind that...
make Orderitm and Orderchild subnodes to Header
it will work but I hav to re map (around 200+ fields:( ), also Orderitm and Orderchild records will be concatnated on a single line they wont come in seperate lines in this case.
But I am trying without making changes to heirarchies... Cant it be achieved?
> I have a plan in mind that...
> make Orderitm and Orderchild subnodes to Header
> it will work but I hav to re map (around 200+
> fields:( ), also Orderitm and Orderchild records
> will be concatnated on a single line they wont come
> in seperate lines in this case.
Hi Nikhil, you can save mapping to local system,open it in XMLSpy and can make changes easily and reimport mapping after changing the target structure.
if you want to know how to do this let me know.
Thanks,
Jag
hi nikhil,
i was tellin like this
<b>make a data type suppose Test in which your Orderitm and orderchild will be there</b>.
then make a other data type like your MT_*** then use header after this add one node in that <b>your data type Test</b> will be there, <b>right click on data type it will send to the list of user data types in last option.</b>
so this will give you the proper sequence in mapping when you copy the whole structure test.
hope this willl help
regards
HONEY
Message was edited by:
Honey Gyanani
Hi Nikhil,
Could you please give target message structure?
Thanks,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.