cancel
Showing results for 
Search instead for 
Did you mean: 

doubt on mapping

Former Member
0 Kudos

Hi friends, I have a doubt on mapping. always after SplitByValue function why we use CollapseContext function. As far as i know SplitByValue is used to add context change in the target structure, but again if we use collapse context the context change will be removed.Is int it?

Please check the blog where the functions are used as i said

"New functions in the Graphical Mapping Tool SP13"

field>SplitByValue[Value Changed]->CollapseContext----->field

Please help me with the answers.

Regards,

Suresh.

Accepted Solutions (1)

Accepted Solutions (1)

former_member518917
Participant
0 Kudos

Hi Suresh,

First thing it is not always necessary to use CollapseContext function after SplitByValue function.It depends on the requirement.

Collapse Context function takes first value from one context and removes the context change.

eg. input queue is :

1,2,ContextChange,3,4,5,ContextChange,6,7

then after Collapse Context, output will be

1,3,6

explaination: From 1st context it will take "1", then from second context will take 3 etc.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Suresh,

depends upon the requirement...

Normally you wont use CollapseContext function in most of the cases...

Better you will get idea abt these two here...

The functionality of "SplitByValue" can be understood by below example.

Example: Suppose you have input data like this

MMM

MMM

MMM

VVV

VVV

KKK

KKK

SPACE

SSS

SSS

1. The output will be when you select "Each Value" as shown below

Note: CC --> Context Change

MMM

CC

MMM

CC

MMM

CC

VVV

CC

VVV

CC

KKK

CC

KKK

CC

SPACE

CC

SSS

CC

SSS

2. When "Value Changed" the output will be:

MMM

MMM

MMM

CC

VVV

VVV

CC

KKK

KKK

CC

SPACE

CC

SSS

SSS

3. When "Empty Value" the output will be:

MMM

MMM

MMM

VVV

VVV

KKK

KKK

CC

SPACE

CC

SSS

SSS

________________

Former Member
0 Kudos

Hi suresh,

In the mapping, field>SplitByValueValue Changed->CollapseContext----->field

the splitbyvalue will insert a context whenever the value changes in a queue, and collapse context will collect 1st value from each input context.

So here you will get each individual values in the target queue within a single context, so this mapping will remove duplicacy in your source field values.

**Reward points if helpful.

--Sankar Choudhury

Former Member
0 Kudos

Hi Suresh,

It is not mandatory to use Collapse Context function every time after SplitByValue. It handles the first values from the queue.

For quick reference you can go through the below link.

http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

Regards,

Vijay N

Former Member
0 Kudos

hi,

it does not required to use CollapseContext after every SplitByValue.

CollapseContexts copies the first value from all contexts to one context.

for detail refer to the below link

http://help.sap.com/saphelp_nw70/helpdata/en/d9/cea942ad920c31e10000000a1550b0/frameset.htm

--please reward point if helpful

regards,

Arijit