Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue With Table Control in Module Pool

0 Kudos

Hi All,

I am facing issue with below code:

IN PBO Event :

tc_100-lines = Lines( gt_itab ).

Loop at gt_itab with control tc_100 cursor tc_100-current_line.

Module Popup_recs.

Endloop.

IN PAI Event:

loop at gt_itab.

module fetch_recs.

endloop.

My table control entries (itab) are 110 records. But Visible entries in Tc_100  is 20 only.

As per above loop in PAI, loop should be executed 110 times. but my loop will be executing based 20 times as per sy-loopc count .

Please suggest me how to increase the value.

Note: End of Loop i gave passed tc_100-lines value into sy-loopc. its not working.

Thanks & Regards

Sandy

5 REPLIES 5

ipravir
Active Contributor

Hi Sandeep,

Please insert the below code in PBO event of screen.

Loop at gt_itab into wa with control tc_100.

    

DESCRIBE TABLE  gt_table LINES Table_control-current-line.

Endloop.

Regards,

Praveer.

0 Kudos

I have tried with above logic and it was looping 20 times only based sy-loopc (Visible records in Table control)

0 Kudos

Hi,

You generate the table control manually or with help of wizard . if you create manually try once with wizard for solution.

ipravir
Active Contributor
0 Kudos

Hi Sandeep,

Actually, it's a table control feature.

It's depends on table control area or i can say total no of line is displaying in table control.

only that many times only the PBO table control loop will execute, then it will go to some screen level of coding to display the information.

Once you do scroll, then again it will execute PBO and based on the index, it will display information.

You can check the same to reduce or increase the table control size.

Regards,

Praveer.

0 Kudos

Hi All,

Thanks For your reply.

Even i had verified with TC using Wizard.

My issue got resolved. I have placed the code in Module After the Loop and do the code changes accordingly.

Thanks & Regards

Sandy