cancel
Showing results for 
Search instead for 
Did you mean: 

How to input data to RFC

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Answers (0)