cancel
Showing results for 
Search instead for 
Did you mean: 

Value not getting resetted for Node inside Node

Former Member
0 Kudos

Hi All

I have created the node structure as below

A (Value Node)

|_ID (value attribute)

|_B (Value Node)

|__Val (Value Attribute for Node B)

Now the code is as follows

for(i = 0 ; i < n ; i++ ){

Ele Aele = createElement

Aele.setID("1")

nodeA.addElement(Aele)

for(j = 0 ; j < n ; j++ ){

Ele Bele = createElement

Bele.setVal("Val1")

nodeB.addElement(Bele)

}

}

,

Now i want for ID - 1 , Val - a,b,c

when sec time loop iterates

ID - 2 , Val - d,e,f

But the problem is that

For ID - 1 , i am getting Val - a,b,c,d,e,f

when sec time loop iterates

ID - 2 , Val - a,b,c,d,e,f

I hope you all can get what my problem is..

Kindly comment and help me out

Regards

Sonal Mangla

Message was edited by:

Sonal Mangla

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Sonal,

change singleton property of I_B to true.

i think you will get desiored output

With Regards

Naidu

Former Member
0 Kudos

Hi Naidu

Thanks for the prompt reply. I did that also - change singleton property of I_B to true.

But alas !!!

Problem remains

Regards

Sonal

Former Member
0 Kudos

Hi,

You have to use the reference of the parent element aele and create the child b elem .. so that child belem1 is linked to aelem1 .. belem2 to aelem2 etc..,

You are creating child b without proper reference.. and hence its adding it to the default lead selected element.

Hope it clarifies your question.

Bharathwaj

Former Member
0 Kudos

Hi Bharathwaj

Thanks for your valuable suggestion.

Yes i want to link node B with A. How can i do that?

Regards

Sonal

Former Member
0 Kudos

Hi ,

There are a lot similar posts in forum.

You can also search help.sap.

Try this link. They have explained creation of similar context structure.

http://help.sap.com/saphelp_nw04/helpdata/en/13/4cde139306304480e89d815ffcf891/frameset.htm

Regards

Bharathwaj