cancel
Showing results for 
Search instead for 
Did you mean: 

Contexts

Former Member
0 Kudos

Hi,

I want to know exactly what is meaning of

remove context,CollapseContext, SplitbyValue.

Suppose source occurence is 1--9999

and target occurance is one what we have to use

,

Suppose source occurence is 0--9999

and target occurance is one what we have to use

Suppose source occurence is 1

and target occurance is 0-9999 what we have to use

Tell me scenarios exactly when we use what.

Thanks,

Ganesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You have to use the Context for diffent kind of occernances.

Source Target Context Type

0--999 1 use collapse context

1-999 0 use remove context

1 0-999 use split context

Reward points if needful.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

Collapse context : It removes the supress and empty values that are in the same context, when

we have source side n occurencess and target side 1 occurance and we need to

populate the target node for a particular condition then we use Collapse context.

Remove Context : It producess plain stream of values. It removes all level contexts, when

we have source side n occurencess and target side 1 occurance then we use this.

Split by value : It inserts the context after events specified. events are each value, value changed and empty value.

Suppose source occurence is 1

and target occurance is 0-9999 then use one as many.

One as Many : we have one value in the source side, but we can use that many times in the target sede in this

conditions we can use this node function.

Here it takes 3 inputs, first value represents the value to populate in the target side

second value represents howmany times the first value occur in the target side and the

third value represents where the context should change.

watch this blog for one as many node function. /people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

GabrielSagaya
Active Contributor
0 Kudos

source occurence is 0--9999 and target occurance is 1

Prefer CollapseContext

http://help.sap.com/saphelp_nw04/helpdata/en/4b/d11e3e1c3b120ae10000000a114084/content.htm

Suppose source occurence is 1--9999 and target occurance is 1

Prefer RemoveContext

http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/content.htm

source occurence is 1 and target occurance is 0-9999

Prefer SplitByValue

http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm

former_member193376
Active Contributor
0 Kudos

Hi

It totally depends on Context handling. ie right clicking the sourse node and setting the context accordingly.

It all depends on the scenario.

Thanks

Saiyog

former_member193376
Active Contributor
0 Kudos

Hi

CollapseContext

collapseContexts()copies the first value from all contexts to one context. Empty contexts are replaced with an empty string.This can be useful if an upper-level node is to be created each time a lower-level node exists, for example. The function is useful in combination with the function SplitByValue().

RemoveContext

We use removeContext() to delete all the higher contexts for an element. This deletes all

higher hierarchy levels, so that all elements of the target queue are assigned to a root

element of the source queue.

Advanced user-defined functions can import either just one context into the input arrays, or complete queues. Make your selection by selecting or deselecting the Save Entire Queue in Cache checkbox in the function editor.

SplitByValue

SplitByValue() is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. A maximum of minOccurs top node target fields can be inserted here.

Thanks

Saiyog

Former Member
0 Kudos

check this blog

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii