on 02-27-2014 8:40 AM
Hi all.
Bellow you can see a message that I will get after file content conversion.
The structure repeats it self after each orderheader.
The number of segments bellow the OrderHeader can differ but there will always be at least one of each segment.
For example there can be 1...unbounded LineItems in one OrderHeader.
Bellow is a picture of the of the mapping structures.
As you see there are two entrys of OrderHeader and that is just because I tested to create one with a RecordSet befor.
This is what i would like to achive.
Each entry of the OrderHeder in the incoming message should trigger either OrderHeader in the bottom of the target structure or a RecordSet including a OrderHeader.
For me it doesen't matter wich one because i will make an other mapping after thisone.
At the moment I have no problems triggering a RecordSet for each OrderHeader but the problem is the rest of the segments.
The context does not work for me so i just populate the first OrderHeader in the target with all the values for CustomerData, LineItems, PriceRecords, ItemTexts and so on.
How would i perform the mapping to keep the segments for each OrderHeader to turn upp in the correct OrderHeader in the target structure?
Result of RecordSet mapping.
Thanks for all help I can get.
Andreas
Hi
Please provide your input structure and the expected output structure so that we can help you better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas,
You said for any field occurrence would be 1..unbound.
But they will also be in proper format. I mean suppose Lineitem is comming two time in input file they will come one after another. Not like the way you have shared in incomming xml.
I believe for each LineItem one PriceRecords is associated. You can change the context level for FirstValue to to ProfitUnit and then map to target field. Hope it will work.
If still facing issue, please let us know, will try to create dummy mapping.
Regards
Jitender
Hi Andreas,
you can not achieve the output with graphical mapping because of line item. How you will differetiate the line item belongs to first order header or second order header.
the possible options are
regards,
Harish
Hi Andreas - How did you configure the record set structure?
Incase you would like to have a separate recordset for each orderheader from the input file set it to
orderheader,1,other segments... instead of orderheader,*,other segments...
If your requirement is to create separate file/message for each order header then you can even set the recordset per message to 1.
Morning.
Attached you have an axample of the incoming text file.
Line with F0000 is the stratrecord of the file. Has to be present and valid or the file is to end up in error.
Line with H0101 is the orderheader start.
Line with H0402 is CustomerData.
Line with H4002 is the InvoiceFee
Line with R0402 is the LineItem
Line with R0457 is the ProfitUnit
Line with R0620 is the PriceRecords
Line with H0150 is the ItemTexts
Line with F9999 is the EndRecord and has to be present and valid or the file should end up in error.
//Andreas
Yes.. i was referring to the channel configuration itself..
Incase you always get separate StartRecord per each order then what the above configuration does is
whenever it encounters the StartRecord in the input file, it creates separate recordset from there..
But if you get just one StartRecord per file and has multiple orders in it then it doesn't work.. like in your case
May be you can go for java mapping to convert flat xml to nested xml
Make use of the below blog..
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.