cancel
Showing results for 
Search instead for 
Did you mean: 

Can anybody suggest a site which gives me example for context handling ?

Former Member
0 Kudos

Can anybody suggest a site which gives me example for context handling ? and also some exersices for handson?

Accepted Solutions (1)

Accepted Solutions (1)

former_member8655
Active Participant
0 Kudos

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi AnilKumar,

Pls find the below links for context handling.

I will give you brief info on context handling to you.

Supoose an xml is look like.

<meterial>

<matno/> 1-1

<mattext> 0-unbound

<langkey> 1-1

<text> 1-1

</mattext>

</meterial>

if we want to send text to description tag in target msg structure is like below

<productdef>

<fileno/>

<descrption.>

</productdef>

The languages should be differ.

but the condition is if lang is en then only send text to description. In this case we need context handling, why because. if you match with out context handling.

mattext is 1 to outbout so it may repete more than 1 time.

if the first occurance is en the condition sucess. it wont check other occurances there may be chance english should be present. so if you dont maintain context negitive testing fails.

so if you set context to above element. It will check all occurences at a time.

Reward points if needful

Thanks,

RamuV

vijay_b4
Active Contributor
0 Kudos

Hi Anil,

See this blog..

Context handling -- https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0f6991e5-0901-0010-e0b0-dc2...

Reward points if this helps

Regards

Vani.

former_member537867
Active Contributor
0 Kudos

Hi Anil,

Context of an element is nothing but just the level with reference to its parent node where the XML tag appears in the given XML document.Level of any element is set to the immediate parent node by default. All the nodes and elements that belong to the same parent node are said to be in the same context.

Check this

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool

Remove context -

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

Collapse context -

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

http://help.sap.com/saphelp_nw70/helpdata/en/bd/ca1105c81c6742a0f8c8d49f8834bf/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/35/fb8c4057d5701de10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/42/f7293b2dbe1a71e10000000a422035/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/79/2835b7848c458bb42cf8de0bcc1ace/frameset.htm

Regards,

Vinod.

Former Member
0 Kudos

hi

go thru the below links thoroughly

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

Check this links.

http://help.sap.com/saphelp_nw2004s/helpdata/en/bd/ca1105c81c6742a0f8c8d49f8834bf/content.htm

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:

code

<header>

<field1></field1>

<field2></field2>

</header>

[/code]

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:

code

<header>

<field1></field1>

</header>

<header>

<field2><field2>

</header>

[/code]

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

Note: reward points if solution found helpfull

Regards

Chandrakanth.k

former_member556603
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Anil

Also few Important blogs

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

https://www.sdn.sap.com/irj/sdn/event/webinars?rid=/library/uuid/0f6991e5-0901-0010-e0b0-dc2a26cc038...

Regards

Abhishek Mahajan

Former Member
0 Kudos

Hi Anil

Please go through the following PPT

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e...

Page 19-32

Regards

Abhishek Mahajan

**Please reward Points if helpful**