cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Context

former_member207019
Participant
0 Kudos

Hello Experts,

Difference between removeContext() and CollapseContext() ? If possible give me clear explanation.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Refer this link you have complete idea about context

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1...

check this weblogs where they have illustrated with an examples:

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

Regards,

Surya

Answers (6)

Answers (6)

Former Member
0 Kudos

Hey,

removeContext:

We use remove context to remove the context of a queue

A ->removeContext-> A

B B

C C

here each line under an alphabet denotes context change.

One thing about context change is it will not show you null values coming in input.

A ->removeContext-> A

C

C

in above example -- represents only context change no value in this place(null).

Collapscontext :

It works very much same way of removecontext but it also considers null values and gives [] for null values (if Context of Field is on its Preceeding parent otherwice it will work as remove context)

A ->CollapsContext-> A

[] (Blank value)

C C

One more chane is if there are multiple values in a context then it will only select first value from that queue

A ->CollapsContext-> A

D B

B C

C

As you can see in above example A & D falls under one context hence D is Removed

reward points if useful,

regards,

Milan

former_member182455
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

Refer this blog

Message Mapping Simplified u2013 Part II

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

Former Member
0 Kudos
Former Member
0 Kudos

HI

Remove context:

You use remove Contexts to delete all the top contexts for an element. This removes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue.

It removes all level contexts.

Remove Contexts: We use it to remove Header Contexts from source side. If we donu2019t want header context to repeat in target structure, use this. It removes repeated header contexts and all the items come under the same contexts.

Collapse Context:We use it, if we have to create empty tags in target for every context change in the source.

Collapse context : It removes the supressed and empty values that are in the same context.

Collapse context:

Using collapse Contexts() puts the first values of all contexts into a context. Empty contexts are replaced with an empty string:

cheers

aashish_sinha
Active Contributor
0 Kudos

Hi,

>>>>What is difference between removeContext and collapseContext?

check this weblogs where they have illustrated with an examples:

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

Regards

Aashish Sinha

<removed by moderator>

Edited by: Mike Pokraka on Aug 4, 2008 2:39 PM