on 11-18-2011 7:28 AM
Hi Experts,
I have an RFC with few input attribures and input nodes.
Please help me to execute this RFC,
-ZCandiadateNode(RootNode)
-
PersonalNode(SubNode)
-
name_value(SubNode Attribute)
-
addr_value(SubNode Attribute)
-
candidateIDvalue(RootNode attribute)
Above is the node structure i have.
(PersonalNode is a subnode inside ZCandiadateNode)
I am able to send the -candidateIDvalue data to backend.But not able to set values for name and addr.
Kindly help me with the code to execute this RFC.
Thanks,
John
Edited by: john paul on Nov 18, 2011 8:29 AM
Hi,
You can set the value for name_value and addr_value as follows:
wdContext.nodePersonalNode().createPersonalNodeElement().setName_value(<some value>);
wdContext.nodePersonalNode().createPersonalNodeElement().setAddr_value(<some value>);
After this execute the RFC anc check.
Hope this helps you
Regards,
Jithin
Edited by: jithus on Nov 18, 2011 8:46 AM
Edited by: jithus on Nov 18, 2011 8:47 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the input,
Its not working... following is my code
try{
ZCandiadateNode input_save = new ZCandiadateNode();
wdContext.ZCandiadateNode().bind(input_save);
input_save.setCandidateIDvalue("00312176");
wdContext.currentZCandiadateNodeElement().modelObject().execute();
}
The above code is working and i am able to input CandidateID.
Kindly help me to input other two parameters inside subnode.
Thanks,
John
Hi John,
Try this code,
try{
ZCandiadateNode input_save = new ZCandiadateNode();
wdContext.ZCandiadateNode().bind(input_save);
input_save.setCandidateIDvalue("00312176");
//Create instance of child node and add it back to parent node after setting the attributes
PersonalNode childEle = new PersonalNode();
childEle.setname_value("Name");
childEle.setaddr_value("Address");
input_save.addPersonalNode(childEle );
wdContext.currentZCandiadateNodeElement().modelObject().execute();
}
Regards,
Vishweshwara P.K.M.
Hi Vishwa,
Thanks for the inpu.
I am facing issue in child node.
Problem is this is a model node and the child node PersonalNode is not showing in my code.
PersonalNode childEle = new PersonalNode();
on above code PersonalNode is not listing. Personal node cardinality is (0.1)
Could you plz help me.
Regards,
John
When you have a Model Node in your context, the name of the class you have to instance is not the name of the Node but the name of the model class that it's referenced. If you select Properties of Personal node, in modelClass you will get the name of the corresponding class, for example: ZPersonal, and then you can do ZPersonal persona = new ZPersonal().
Regards.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.