cancel
Showing results for 
Search instead for 
Did you mean: 

Context Objects

Former Member
0 Kudos

When do we use Context Objects ?

Please give some example.

Thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

If u have multiple receiver system then to determine the reciever u can use context object.....

the alternative of context objetc is X-Path...

Check out these

http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm

/people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object

Here is a scenario where context objects were used for BPM

Get the details here:

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

Technical Context Objects :

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

A list of the Technical Context Objects names can be found here:

http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm

Difference between context object and x-path:

Thanqx

Biplab

Former Member
0 Kudos

Hi,

The Context Object we can use insted of Xpath. For your better under stand i can give you an example.

Suppose have to send a message with ClientID

<Record>

<Client>100</Client>

<Name>xxxx</Name>

</Record>

<Record>

<Client>200</Client>

<Name>yyyy</Name>

</Record>

If you create a context object to the <Client> then you can set the condition at Receiver Determination level. If <Client> 100 then the message goes to client 100. If <Client> 200 then the message goes to client 200.

Thanks,

Satish.

Former Member
0 Kudos

Hi,

We will use Context Obj. or X-paths when ever you want to place a condition on a particular field in the Source file

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

/people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object

Receiver Det- Xpath:

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

XPATH in Interfce Det:

/people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service

Regards

Seshagiri

Former Member
0 Kudos

Hi,

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

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

/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi

I think it will be helpfull to U.

Regards,

Sharanya.

Former Member
0 Kudos

Hi Check this

context object -

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>

To access the content of the <postalCode> field, you would use the following expression in XPath:

/InvoiceOut/customerData/address/postalCode

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

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

Please have a look at the below blog

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

Regards

Abhishek

Former Member
0 Kudos

hi,

Context objects are a simple alternative to XPath expressions for accessing the contents of a message.

It is used for condition based routing. You create a context object in IR and assign it to a interface in IR. You can use the same in ID in receiver agreement(condition) to check the value at run time... Based on the value you can decide the receiver at run time..

If XPATH is complex that it cannot be referred to easily in the design / config time, it is easier to encapsulate the path of the data in a Context Object and then use this Context Object to refer to the entire XPATH.

Please refer below link for example

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

/people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object

Thanks

Swarup

Edited by: Swarup Sawant on Feb 12, 2008 12:24 PM

Edited by: Swarup Sawant on Feb 12, 2008 12:24 PM