Showing results for 
Search instead for 
Did you mean: 

Cardinality of subnode(Model node)

Former Member
0 Kudos

Hello all,

is it possible to change the cardinality of a sub node...which belongs to a Model node?

For example:

node: Zbapi




outtable <---this table is coming from bapi.....

tables are bi-directional data container....i can pass the data to the bapi using these...

I cannot change the cardinality of the table so i am getting null pointer exception...if i try to set any attribute of outtable....any help on this....will be greatly appreciated....


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can't change the cardinality of a child model node. Instead you can create and add suitable elements to the node and then pass the values.

A pseudo code will look something like this:

IZBapiElement bapiElem = WdContext.nodeZBapi().createAndAddZBapiElement();
IOutputElement outElem = bapiElem.nodeOutput().createAndAddOuputElement();


Answers (2)

Answers (2)

Former Member
0 Kudos

solved the issue...

My problem was not initializing the imported table.

my context was like this:



-ztab <this table was coming from bapi under the import parameter and is type of ztab1 which is the table type in data dictionary.

what i did is declare a variable of type

Zbapi input = new Zbapi();

ztab1 tab;


tab = new ztab1();



the "size" is coming from user input value from previous view...

this for loop is in wdDoInit() method of component controller.

Thanks for your help

Former Member
0 Kudos

Hello there,

I am not able to see "createAndAddZBapiElement()" function...what version are you on? I still cannot input data to the table...

I think i might change the bapi to get the input in import tab....and than fill in table one row at a time...

any other ideas???