on 09-14-2008 6:23 PM
Hello all,
is it possible to change the cardinality of a sub node...which belongs to a Model node?
For example:
node: Zbapi
-
output
-
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....
Thanks...
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();
outElem.nodeOutTable().createAndAddOutTableElement();
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved the issue...
My problem was not initializing the imported table.
my context was like this:
Zbapi
---output
-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;
for(i=0;i<size;i++){
tab = new ztab1();
input.addztab(tab)
}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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???
Thanks....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.