cancel
Showing results for 
Search instead for 
Did you mean: 

How to Iterate through a BAPI table

kai_unewisse3
Active Contributor
0 Kudos

Hi i am calling a BAPI with the Adaptive RFC and want to store the returning information in a tree.

For getting e.g the field URL in the current node named C_T_Nodes i can use :

String URL = wdContext.currentC_T_NodesElement().getUrl();

Is that correct ?

but that is just one entry. how can i loop through the whole list?

Thanks, Kai

Accepted Solutions (1)

Accepted Solutions (1)

kai_unewisse3
Active Contributor
0 Kudos

Might this work ?

int tableSize = wdContext.nodeReportList().size();

String valueTable[][] = new String[tableSize][6];

for(int i=0;i<tableSize;i++)

{

valueTable<i>[0] = wdContext.nodeC_T_Nodes().getC_T_NodesElementAt(i).get<Column1>;

valueTable<i>[1] = wdContext.nodeC_T_Nodes().getC_T_NodesElementAt(i).get<Column2>;

}

Former Member
0 Kudos

Hi Kai,

The code is very similar to what you have written. But you are getting the size of 'ReportList' node, but is iterating through 'C_T_Nodes'. Get the size of the node that you want to iterate through & proceed.

Best Regards,

Nibu.

Answers (0)