cancel
Showing results for 
Search instead for 
Did you mean: 

remove context

Former Member
0 Kudos

hi every one

can any one of you help me with the removecontext function as it is used only when the reciever fields cardinality is 0-1

and not sure wether mapping will generate this particular field

if so please confirm and please can you give ur inputs regarding the remove context any how it is used for suppressing the reciever's field .and one more basic querie can any one brief me about what does actually context means i will be very thankfull to your reply

thanks and regards

sandeep

Accepted Solutions (0)

Answers (4)

Answers (4)

Jitendra_Jeswan
Contributor
0 Kudos

context are used while handling/processing Queues of the fields in the XML structure.

Remove Context: this function is used to remove context changes, it removes the CC from the Queue of the field in question.

context change: Context is said to be changed for field A having parent as B, when B appears again and has the value A in it. Whenever there is change in the level in XML document there is a context change in the hierarchy.

Former Member
0 Kudos

Hi Sandeep,

Context can be explained as the separation of different nodes in a hierarchial format. All the nodes and elements that belong to the same parent node are said to be in the same context. Hence, the nodes and elements that belong to different parent nodes have to be separated by a context change.

RemoveContext() can be used for any cardinality.

This function is used to eliminate the context changes. It places all the nodes in the same context.

You can refer to this blog which talks about context handling and queues.

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3537] [original link is broken] [original link is broken] [original link is broken];

The following blog explains RemoveContext() quite well.

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2792] [original link is broken] [original link is broken] [original link is broken];

Hope this helps solve your doubts.

Regards,

Lavita.

Former Member
0 Kudos

Hi Sandeep,

Have a look at this blog.

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2792] [original link is broken] [original link is broken] [original link is broken];

Thanks and Regards,

Induja

Former Member
0 Kudos

Hi,

You use removeContexts () 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.

Advanced user-defined functions can import either just one context into the input arrays, or complete queues. Make your selection by selecting or deselecting the Save Entire Queue in Cache checkbox in the function editor.

Working with Contexts or Queues in User defined function

Information in Cache Implications

Context Advanced functions that only import one context do not have an identifiable context change. You can of course insert a context change into the results list.

Queue Since one or more entire queues are imported in this case, this option is more memory-intensive and is not suitable for very large messages.

For more node function refer below link:

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

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

Thnx

Chirag

VijayKonam
Active Contributor
0 Kudos

Hi,

removecontext function as it is used only when the reciever fields cardinality is 0-1

The above statement is not true.

Understand or treat context as parent (just an analogy. Not exactly). When ever there is a parent change, its called context change. When should one use remove contexts??

When you have a repeating node with elements under it and u want all these elements to come under one single node.. (Observe that from changing parent to we are going to one parent) in such situations you use remove contexts.

I donno how better I can explain other than like this.

VJ

Former Member
0 Kudos

Hi VJ

thank you for the reply i got the complete picture about it . i hava one more querie regarding the remove context. if at all if we ceate any user define fuctions in message mapping , and use the both funcion in mapping will the remove context will have any impact on the user defned functions.

thanks and regards

sandeep

Pendyala

VijayKonam
Active Contributor
0 Kudos

If the UDF is inserting some context changes programmatically inside it, Remove contexts would remove them. Did I understand your question correctly??

VJ

Jitendra_Jeswan
Contributor
0 Kudos

Any UDF that you create, which will eventually be used in MM(Message Mapping) will have the same queue as for other functions.. So yes it would impact the UDF that you create and same Queue concepts (Context change, Suppress..etc) would apply as on others..

Award points if helpful

Regards.

Jeet.