|
|
Rank: Newbie
Joined: 6/18/2008 Posts: 8 Location: Canada
|
I have a situation where I need to split a single EDI 850 (Purchase Order) into 1 or more Sales Orders based on the items listed on the PO.
The mapping uses a single ANSI X.12 4010 850 EDI PO for the input, and a single CSV for the output.
The CSV file is structured as follows
SH....(Sales Order Header for order 1) SD....(Sales Order Line for order 1) SD....(Sales Order Line for order 1) SH....(Sales Order Header for order 2)
and so on
What I would like to do is, split the incoming PO into multiple outbound Sales Orders based on the Item Keys.
For example, all Items that Start with A* should be grouped together in one Sales Order and all Items that Start with B* should be grouped toghether in a second Sales Order.
This is because we create a separate Sales Order for each warehouse location and all A* items are in one warehouse, and all B* items are in another warehouse.
The incoming PO's may have 5 lines for example, in a random order, so
Line 1 A* Line 2 A* Line 3 B* Line 4 A* Line 5 B* and so on...
I would like to group all the all A*'s from the single PO into one Sales Order, and all the B* items into another Sales Order.
Any help to point me in the right direction would be greatly appreciated.
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 551 Location: Mauritius
|
First of all, you need MapForce v2010.
Then everything should be easy: you use a group-by function with an input key built as a substring(item-name,1,1), i.e. the first character. You can use output key node to build a file name and this will automatically generate you a file per different key.
Vlad
|
|
Rank: Newbie
Joined: 6/18/2008 Posts: 8 Location: Canada
|
Thank you, I do have a couple of questions. Please forgive my ignorance. Also, I am using Mapforce 2010 Enterprise Edition.
1. Where do I connect the output node Groups? 2. Where do I connect the output node key?
Thanks
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 551 Location: Mauritius
|
As I said in my answer, you use the output key node to build file name. Just as a trial you can simply connect key to the file name directly, and once you understand what happens, make the file name properly constructed by using concat and constants.
Vlad
|
|
|
guest |