cancel
Showing results for 
Search instead for 
Did you mean: 

What is Context object?

Former Member
0 Kudos

Hi,

any one help me out what is context object.

thaks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Context object is used to specify the XML tag.

or

Context objects are a simple alternative to XPath expressions for accessing the contents of a message. Take the following message instance as an example:

<InvoiceOut>

<customerData>

<address>

<name> ... </name>

<postalCode> ...</postalCode>

...

</address>

...

</customerData>

</InvoiceOut>

thanks,

suresh

Answers (8)

Answers (8)

Former Member
0 Kudos
GabrielSagaya
Active Contributor
0 Kudos

Context object is a shorter mode of referring to the xpath. This is used when the field is under a deep heirarchy.

You can create context objetct in IR and assign it to a particular field in Message interface.

Conext Objects are nothing but a short way to reference XPATH.

When you have a deep nested XPATH, and you need to use it in multiple locations it can become tricky and so in your Ir you create a conext object to refer to the XPATH.

Creating Conext Objects --> Quite Simple.

1. Create a new context object --> Right Click on Context Object --> New --> and then give the type of the conext element. Integer, char ,etc.

2. Now, go to the Message Interafce and you will find the column Context object . To the corresponding XML element , give your context object name

Former Member
0 Kudos
Former Member
0 Kudos

Very Useful WEBINAR notes...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f...

Please Reward Points if helpful...

Edited by: Arman Eker on Jul 16, 2008 2:37 PM

Former Member
0 Kudos

Hi Ganesh,

Context Object will be used to change the Hierarchy level.

Ex:

<address>

<house no>77777</house no>

<street>aaaaa</street>

if you change the context of street it will point to address element.

If you change the context if more than 1 address element will come then it deals all address elements.

In UDF you will get context object.

Reward points if needful

Thanks,

RamuV

Former Member
0 Kudos

Context of an element is nothing but just the level, where the XML tag appears in the given XML document. Level of any element is set to the immediate parent node by default.

Check this link for more details

http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm

Context Change : Context change is just changing the level of XML tag(element level in XSD) in the XML document.

This means when we map one source field to one target field then that both field segments should be at samelevel.

Former Member
0 Kudos

ref this also

for context and context change

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

Former Member
0 Kudos