on 02-17-2011 7:21 AM
Hi all,
I have a parent node P and a child node C now for a particular attribute of parent node I check the value and populate C node attribute accordingly ie say P has an attribute A so P.A = 1 now if it is equal to 1 then in child no C Ineed to populate its 2 attribute ie value and code as C.value=xyz and C.value= 1. This population I am doing after executing the rfc taking values from its output node and checking condition and populating but I am getting null pointer exception.
The code I am using is follows:
if(rfcouputnode.attribute.equalignorecase("1")
{
ICElement ele = wdcontext.nodeC.createCElement;
ele.setCode("1");
ele.setValue("xyz");
wdContext. nodeP.nodeC.addelement(ele)
}
The parent node cardinality is 0..n
selection 0..n
singleton true
Child node cardinality is 0..n
selection 0..1
singleton false
Kindly let me know wut could i possibly be doin wrong.
Thank you
Regards,
Preet
You nead to create the element of the Child Node, add this new element to Child Node and them, bind the Child Node to the Parent Node.
Best regards,
Ana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Preet,
Have you created any element of node P before creating elements of C. Only then you would be able to set values to attributes or even create an element of C.
One more doubt. You must be executing the BAPI and comparing the values returned in the output structure with the desired value. I would suggest you to check if you are correctly pulling up values from output structure. You can print and check.
Regards,
Tushar S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.