on 12-05-2004 2:18 PM
i try to process the values getting from a bapi call. but the iterator i get is always empty. Neither "it" nor "it1" has any values.
Any ideas?
Regards Jens
try {
wdContext
.currentIsa_Read_Catalog_Complete_InputElement()
.modelObject()
.execute();
Iterator it = wdThis.wdGetContext().nodeIsa_Read_Catalog_Complete_Input().nodeOutput().nodeItems().iterateChildNodes();
Iterator it1= wdThis.wdGetContext().nodeIsa_Read_Catalog_Complete_Input().nodeOutput().nodeItems().getNodeInfo().iterateChildren();
while (it.hasNext()) {
IItemsNode node = (IItemsNode) it.next();
}
wdContext.nodeOutput().invalidate();
} catch (Exception e) {
}
Hi Jens,
Incase you want to loop the elements of the node to get the values in attributes you can do in the following manner.
<i>for(int i = 0; i < wdContext.node<Name of the node>().size(); i++){
wdContext.node<Name of the node>().moveTo(i);
wdContext.current<Name of the Node>Element().get<Attribute Name>();
}</i>
Hope this helps.
Regards
Sidharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jens,
after "navigating" to the items node, you can loop through the elements of the node like:
for(int ix = 0; ix < wdContext.nodeX().nodeY().nodeItems().size(); ix++) {
IXElement element = wdContext.nodeX().nodeY().nodeItems().getXElementAt(ix);
/** Do something with the element */
}
Hope that helps.
Regards
Stefan
PS.: wdThis.wdGetContext() is exactly the same as the predefined instance member wdContext.
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.