on 07-20-2007 10:29 AM
how to Loop thru the RFC model
for(int i=0;i<wdContext.nodeEx_Org_Units().size();i++){
//how to get the attribute each and every columns
//mgr.reportSuccess("id" +nodeEx_Org_Units().getId());
}
Message was edited by:
yzme yzme
Hi,
When there is a RFC Model with table ouptut....every row in the table can be correlated to elements in the model node...
your model node : <i>nodeEx_Org_Units</i>
Now if you have 5 rows as output after executing the model...there will be 5 elements created under the node. Loop through all the elements and use the get methods as given below:
// assuming tht u have two columns(attributes) <i>col1 & col2</i>
// access the node
IPrivate<view>.IEx_Org_UnitsNode tableNode = wdContext.nodeEx_Org_Units();
// access the element under the node, do not initalize this element
IPrivate<view>.IwdContext.nodeEx_Org_UnitsElement tableElem;
//loop thrugh the elements
for(int i=0; i<tableNode.size(); i++)
{
tableElem = tableNode.getEx_Org_UnitsElementAt(i);
// access the attributes col1 & col2
tableElem.getCol1();
tableElem.getCol2();
}
Regards
Srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
Try this method..
IPublicyour_controller_or_view.IEx_Org_UnitsElement saveElement=null;
for(int i=0;i<wdContext.nodeEx_Org_Units().size();i++)
{
saveElement = wdContext.nodeEx_Org_Units().getEx_Org_UnitsElementAt(i);
Now u can use saveElement.get() methods to get the contexts..
}
Regards
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.