‎2008 Jan 30 4:16 AM
hi gurus,
i hv to count the rows of the table control and basing the no. of row i hv to put the loop (do x times).so plz send me the code to count the rows.
thanks & regards,
santosh.
‎2008 Jan 30 4:17 AM
in your table control structure there is a field called LINES that tell about total rows in table.
reward if useful
keep rockin
vivek
‎2008 Jan 30 4:19 AM
HI,
write this somewhere in PAI of the screen
Describe <itab> lines <Variable>.
itab is the table that u passed to table control.
variable has the no of lines.
Cheers,
Will.
‎2008 Jan 30 4:28 AM
hi,
i want to giv the valus to the table control at the run time and after that i want to count the rows i'm not getting any value from the internal table.i hv to count the rows first and then i have to populate the internal table.
thanks
Edited by: santosh nayak on Jan 30, 2008 5:34 AM
‎2008 Jan 30 4:38 AM
It is not possible first you will have to populate the internal table from any SAP or Z table then calculate the Number of rows and pass the internal table to the table control.
Without populating the data how can you count the no of rows in the internal table. Do you not think it is illogical to count the no of rows in any internal table without populating it.
‎2008 Jan 30 4:44 AM
HI,
On any user action(say enter) on the screen PAI of that screen ll be triggered......so u can include a module say 'count' in the PAI of ur screen and write the code(describe........) inside it.....
Cheers,
Will.
‎2008 Jan 30 4:20 AM
You are passing any internal table to the table control and displaying it.
Put DESCRIBE command on that internal table and you can check the no of rows in the table control.
‎2008 Jan 30 5:11 AM
Hi,
Usually for table controls,we have limit the lines of table control in the PBO itself.
ie, Descirbe table <itab> lines <tblctrl>-lines.
In your case , if you require no of lines of tblctrl,
take the number of lines of tblctrl in the PAI.
ie,
line = <tblctrl>-lines.
tblctrl = Table control name,
itab = internal table used for populating data in table control
line = variable of type i.