Application Development and Automation 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: 
Read only

Table control issue

sanjana_lingras
Active Participant
0 Likes
1,028

Hi experts,

We are facing strange issue for table control. We have added vertical scroll bar in table control we are trying to read table control values in internal table, it always taking only first 13 entries (i.e. value of sy-loopc ...values visible on screen) after that it comes out of that loop immediately in PAI module.After that it does not trasfer the other entries after first 13 to internal table.

We tried to change value of sy-loopc and tried to add conditions on counter value still its not working.

Searched already available discussion but no solution. It comes out of the loop after it reaches to 13th entry.

7 REPLIES 7
Read only

Former Member
0 Likes
1,001

Hi,

Use Describe statement to check the number of line items in internal table then pass count

in Table control-Lines field it will work.

Example:-

DESCRIBE TABLE ITAB LINES L_CUTIL_COUNT.

TC-LINES = L_CUTIL_COUNT.

Salil....

Read only

0 Likes
1,001

No this is not working. In PAI it loops only sy-loopc value times and then come out of the loop.

Read only

0 Likes
1,001

Use this logic in PAI before loop.

Read only

0 Likes
1,001

yes, follow the Chavan logic, check the no.of lines. customize your number while debug.

still if you face same problem, while debug, delete 14 row from itab before looping, debug again.

might be 14th have invalid char or values.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,001

The WITH CONTROL is implicit in PAI LOOP.

This is normal behavior, the PAI only manage the displayed lines (so 13 for one PAI/PBO cycle) why would it manage records not displayed? These rows could not have been modified, so nothing to modify in the internal table ?

Question : What is your actual requirement, checking (again) some values not displayed ?

Regards,

Raymond

Read only

0 Likes
1,001

in table control we have added vertical scroll bar, now if visible no. of lines are 13 and if you scroll down its having 20 rows then LOOP is always processing 13 rows only i.e. value of sy-loopc. it does not process further rows it directly comes out of loop.

Read only

0 Likes
1,001

Hi Please try the below code.

PROCESS BEFORE OUTPUT.

MODULE STATUS_9000.

*

 
LOOP AT  lt_tab

   
WITH CONTROL tct_bil CURSOR tct_bil-current_line.

   
MODULE tct_bil_get_lines.

 
ENDLOOP.



PROCESS AFTER
INPUT.



 
LOOP AT lt_tab.

   
MODULE modify_tctrl.

 
ENDLOOP.



 
MODULE user_command_9000.

MODULE tct_bil_get_lines OUTPUT.

 
DATA lv_lines TYPE i.

 
DESCRIBE TABLE lt_tab LINES lv_lines.

  tct_bil
-lines = lv_lines.

ENDMODULE.                 " TCT_BIL_GET_LINES  OUTPUT

The loop in PAI module loops only the records shown in the screen, and when you scroll down, it will loop the next set of records in the screen.

This will work as Salil mentioned.

Regards,

SPR