title: Table control does not display all rows
body: <p>I have a problem where not all of the rows of my table control are being displayed in ABAP 740 SP13.</p>
  
  <p>For example, I have a table with these two rows:</p>
  
  <p><a href="https://i.stack.imgur.com/B6YFm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B6YFm.png" alt="Values of LT_TRANSFER_CONFIRM_TC"></a></p>
  
  <p>This is the state of the table where this code is executed:</p>
  
  <pre><code>CALL SCREEN 0300 STARTING AT 10 5
                   ENDING AT 85 16.
  </code></pre>
  
  <p>This goes immediately into my Process Before Output code:</p>
  
  <pre><code>*----------------------------------------------------------------------*
  *                        PROCESS BEFORE OUTPUT                         *
  *----------------------------------------------------------------------*
  PROCESS BEFORE OUTPUT.
    MODULE status_0300.
    LOOP AT lt_transfer_confirm_tc
           INTO ls_transfer_confirm_tc
           WITH CONTROL tc_transfer_confirm
           CURSOR tc_transfer_confirm-current_line.
      MODULE tc_transfer_confirm_get_lines.
    ENDLOOP.
  </code></pre>
  
  <p>where <code>status_0300</code> is:</p>
  
  <pre><code>MODULE status_0300 OUTPUT.
    SET PF-STATUS 'STATUS_0300'.
    " Confirm Material Number Count
    SET TITLEBAR 'T05'.
  ENDMODULE.
  </code></pre>
  
  <p>and is <code>tc_transfer_confirm_get_lines</code>:</p>
  
  <pre><code>MODULE tc_transfer_confirm_get_lines OUTPUT.
    g_tc_transfer_confirm_lines = sy-loopc.
  ENDMODULE.
  </code></pre>
  
  <p>At the end of the first iteration of the loop in my PBO, the <code>ls_transfer_confirm_tc</code> value matches with the first row of the <code>lt_transfer_confirm_tc</code> table, <code>tc_transfer_confirm-current_line</code> is <code>1</code>, and <code>g_tc_transfer_confirm_lines</code> (in <code>tc_transfer_confirm_get_lines</code>) is set to <code>10</code>. </p>
  
  <p>The second iteration of the loop never processes. The cursor hops from <code>ENDLOOP</code> (from the first iteration) to the line saying <code>CURSOR tc_transfer_confirm-current_line.</code> (as it is the end of the <code>LOOP</code> statement), and finally to <code>ENDLOOP</code> without stopping on the <code>MODULE tc_transfer_confirm_get_lines</code> line. At the end of this loop, <code>ls_transfer_confirm_tc</code> is initial, <code>tc_transfer_confirm-current_line</code> is still <code>1</code>, and <code>g_tc_transfer_confirm_lines</code> is still <code>10</code>. All the while, the <code>lt_transfer_confirm_tc</code> table still has two rows in it as shown in the image at the top of this question.</p>
  
  <p>At this point, the screen is displayed as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/CQnOK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CQnOK.png" alt="Table Control displayed by SCREEN 0300"></a></p>
  
  <p>I'm not sure why this loop doesn't process the second row of my table, and therefore doesn't display it on the screen. </p>
  
  <p>Thanks. </p>