on 10-23-2005 5:21 AM
Dear All,
I have a modal table filled with the data from R/3 using BAPI. Now i hv created one more value table in the view which takes the data from modal table. But i'm getting exception..<b>java.lang.indexoutofbonds.exception, index1 size 1</b>
Pls suggest..
Regds,
Anup.
hi Anup ,
you can copy the data in the model node like this
for(int i=0; i<wdcontext.node<model node name>.size(); i++)
{
iprivate<yourviewname or yourcontrollername>.i<valuenodename>element ve = wdcontext.create<valuenode>element();
ve.set<attributename>(wdcontext.node<modelnodename>.getElementAt(i).get<Attribute name>();
// this way set all the coreesponding attributes of model node and vale node
wdcontext.node<valuenodename>.addElement(ve);
}
hope this code snippet will help you.
regards,
Rahul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anup
Saves lot of headches if you base the value node with the same structure binding as of the model node you are copying from.
In which case you can use the <b>WDCopyService.copyElements</b> to copy from the source node to target node
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Index out of bounds exception is because u are trying to access somethin which is not yet created.
Are u trying to copy data from model node to value node.
Did u check the size of the model node.Is data available in it ?
Have u created elements in the value node ?
Check these.If the error still persists..please elobarate on wat you have done.. along with code snippets if any.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.