cancel
Showing results for 
Search instead for 
Did you mean: 

cal Message Mapping - SplitByValue - part 2

Former Member
0 Kudos

Hello experts

My first problem is solved on:

Now, every Unique EAN can have multiple start dates

EAN | Start Date

541449011000110968 01.01.2007

541449011000110968 01.02.2007

541449011000110968 01.03.2007

541449011000110968 01.04.2007

541449011000110968 01.05.2007

541449011000110968 01.06.2007

541449011000110968 01.07.2007

541449011000110968 01.08.2007

541449011000110968 01.09.2007

541449011000110968 01.10.2007

541449011000110968 01.11.2007

541449011000110968 01.12.2007

541449011000110968 01.01.2008

541449011000110968 01.02.2008

541449011000110968 01.03.2008

541449011000110968 01.04.2008

541449011000110968 01.05.2008

541449011000110968 01.06.2008

541449011000110968 01.07.2008

541449011000110968 01.08.2008

541449011000110968 01.09.2008

541449011000110968 01.10.2008

541449011000110968 01.11.2008

541449011000110968 01.12.2008

541449020000612242 01.11.2006

541449020706752129 01.01.2007

In my target structure, there is 1 segment for each unique EAN. That's ok.

Now I need, within the correct segment, all the data from an EAN.

Segment with EAN 541449011000110968

Segment with date 01.01.2007

Segment with date 01.02.2007

Segment with date 01.03.2007

Segment with date 01.04.2007

...

Segment with EAN 541449020000612242

Segment with date 01.11.2006

Segment with EAN 541449020706752129

Segment with date 01.11.2007

Please advice.

Thanks a lot

Dimitri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First you need to creat the parent node for start date and then you need to move the respective value into them... so do it like this.

Create Parent Node for date

Date Source >RemoveContext>Sort>SplitByValue(on value change)->CollapseContext-->Target Segment.

Now Move Date to respective Fields

Date Source >RemoveContext>Sort>SplitByValue(on value change)->CollapseContext>SplitByValue(each value)>Target Fields.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

If I do what you mentioned in "Create Parent Node for date", I get all the segments created in 1 big segment.

But I need them created, based on the EAN number.

Thanks

Dimitri

Former Member
0 Kudos

Ya, you are right above solution will not help. So now we have to use the std func called "FormatByExample". It is simple to use. So we will go like this..

First we will create parent node for date

Soruce Date --->RemoveContext------------->| 
                                            FormatByExample ---> Target Segment.
 use the mapping of EAN segment here------>|

Mapping of Date values into their respective fields.

Source Date Field -


>SplitByValue(on each)--->Trarget Field.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

This did the trick: http://www.flickr.com/photos/45449397@N03/4185251384/

Thanks a lot !!

Dimitri

Former Member
0 Kudos

Content deleted..

Edited by: Sarvesh Singh on Dec 16, 2009 11:47 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

For mapping segment EAN

EAN -->splitByValue value change -->collapse context --> target EAN

For mapping Date that is for getting date of same EAN to one

use formatByExample node function with

1st input --> Date

2nd input --> EAN followed by splitByvalue value change

output of formatByExample to target Date.

Former Member
0 Kudos

Hi Mugdha,

The EAN field will not be mapped, but is needed to determine the number of unique entries

Kidn regards

Dimitri

former_member194786
Active Contributor
0 Kudos

Hi Dimitri,

For this you will have to use Sort and SortByKey functions. Using sort function first sort all the EAN fields and then using EAN as the reference use SortByKey function to sort your start dates.

Thus you will have all the start dates corresponding to one EAN together. Then you can use splitByValue function, with "value change" property, on start dates to get them aligned with EAN.

Hope it helps.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

You mean something like: http://www.flickr.com/photos/45449397@N03/4184384627/ ?

Kind regards

Dimitri