cancel
Showing results for 
Search instead for 
Did you mean: 

RemoveContext

Former Member
0 Kudos

I have read the definition of this function multiple times. It is taking me sometime to grasp its meaning.

If I am understanding correctly, it generates a list by deleting all heirarchy fields and removing higher level contexts....Not sure if I even understand this, but...

I had a field in a node being inbound to XI Mapping. the node occurred twice. I wanted to add the fields using SUM, but not until I added RemoveContext to the mapping did it accurately add the two fields in the two nodes.

Do you always have to use function RemoveContext when using function Sum if more than one node with the value you are looking for exists?

Thank-You

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Context change occurs when there is a change in hiearchy. For example:

<item>

....<cost>100</cost>

</item>

<item>

....<cost>200</cost>

</item>

for cost, it will translate to:

start

100

-context change-

200

end

there are 2 contexts in the above.

SUM will act only on 1 context. Therefore, it must be:

start

100

200

end

This is why the context change must be removed.

Regards,

Bill

Answers (1)

Answers (1)

Former Member
0 Kudos

Hay Tom,

the whole point of RemoveContext is to access a list of values without caring in what context they are given (hance the name), the idea is that if you want to SUM the number of apples the kids in the class have you don't care how many apples each child have (suppose you have an XML with child_name and apple_number you use RemoveContext to ommit the child_name and then you have just a list of numbers in apple_number that you can SUM).

Hope that makes it clear for ya.

Uri Lifshitz.

and it always Help to have the help:

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

Former Member
0 Kudos

I like the analogy...Thanks!