cancel
Showing results for 
Search instead for 
Did you mean: 

add model node element

Former Member
0 Kudos

Hi all,

I've read very threads about this, but I'm not capable to do this:

I've a binded context to table from Model data from R3 like this:

I_Zrapp

-> proj

-> name

-> etc

After executing the bapi, in this table I can see the results correctly.

I need to add a row.

thans a lot,

david

Accepted Solutions (0)

Answers (4)

Answers (4)

monalisa_biswal
Contributor
0 Kudos

Hi David,

For model nodes adding elements to the node will not suffice.You have to add references of type subnode model class to the parent model node's reference.

<Parent model class> <ref1> = new <Parent model class>();

wdContext.node<parent model node>().bind(<ref1>);

<Child Model Class> <ref2>=new <Child Model Class>();

<ref1>.add<Child Model Node's supplying relation role>(<ref2>);

<ref2>.set<attr1>("");

<ref2>.set<attr2>("");

roberto_tagliento
Active Contributor
0 Kudos


wdContext.nodeI_Zrapp().addElement(
   wdContext.nodeI_Zrapp().createI_ZrappElement(  new ModelI_ZrappCLASS())
);
wdContext.nodeI_Zrapp().moveLast();
wdContext.currentI_ZrappElement().setATTR1("");
wdContext.currentI_ZrappElement().setATTR2("");
wdContext.currentI_ZrappElement().setATTR3("");
wdContext.currentI_ZrappElement().setATTR4("");

Try this.

Former Member
0 Kudos

Hi,

I need the previous step.

I've two FM. Read and update functions.

The first one, return a table results.

I will add in this table some information using webdynpro, and execute the function module to update.

I've implemented the addElement like a Node, but an errors appear.

thanks

david

Former Member
0 Kudos

Hi David,

You want to add row in the backed ??

In that case FM functionality sould be in such a way that when you call execute() method on the Input_XX modelnode then it will takecare of adding the row.

Regards,Anilkumar