cancel
Showing results for 
Search instead for 
Did you mean: 

In the mapping we we exactly use Context handanling

Former Member
0 Kudos

hi all ,

please tell me why exactly we use Context handanling , and go for remove context , i dont get exactly why this are used ., i was told that it is used fMapping for fileds that exist in different node , and with different occurence,

thanking you

sridhar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The reason that context changes can occur in mapping is because sometimes you want to manipulate the structure of the message that's being transferred between systems. For example, lets say you have a message being sent from one system as an XML file, and the structure looks similar to the following:


<header>
     <field1></field1>
     <field2></field2>
</header>

However, the system that the message is being sent to has a requirement that each field be split into individual <header> format (I know, this is not a real world example), then you want to use context changes to make the format look something like this instead:


<header>
     <field1></field1>
</header>
<header>
     <field2><field2>
</header>

Essentially, you use context mapping when your requirements ask you to change the structure of the XML message, not just strictly apply transformations to each field. You can also check out my blog that incorporates user-defined functions for advanced context changes: /people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sridhar,

I wl give a small example, assume that your sender field is at child node level and your receiver field is at header node level.

Ex:- if you are sending IDOC to some external system.

Your sender IDOC-segment is having occurance of 0-9999, it means each iteration, the value of that particular field input will be changing. In this case though you have mapped it target field, you may not be getting the required functionality. In those cases we will be using the context handling etc.. etc..

As mentioned by the other members, Sravya's blog's are really worth reading and understanding the mapping functionality. plz go thru them.

regards

Former Member
prabhu_s2
Active Contributor
0 Kudos

<a href="http://www.youdzone.com/signature.html">Understand Context Handling in Message Mapping</a>

prabhu_s2
Active Contributor
0 Kudos

Also check with

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm">Message Mapping Simplified - Part I</a>

<a href="/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii Mapping Simplified – Part II</a>

hope this make u clear on context handeling