<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fixed rows and columns in Table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073611#M1178641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE status_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP WITH CONTROL tab_control.&lt;/P&gt;&lt;P&gt;MODULE Populate_table.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Write this Code in PBO..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_1000 OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'ST_STAT'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR 'T_CREATE'.&lt;/P&gt;&lt;P&gt;CLEAR wf_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Number of lines of table control&lt;/P&gt;&lt;P&gt;tab_control-lines = 10..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " STATUS_1000 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2009 06:44:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-03T06:44:27Z</dc:date>
    <item>
      <title>Fixed rows and columns in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073609#M1178639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can we create a table control with fixed rows and columns( say example 5 rows and 10 columns ) without horizontal and vertical scrolling bars. and i want 4 rows totals in the fifth row. above four rows should be editable fileds and fifth is only output fields ( total of four rows ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have unchecked  horizontal and vertical scrolling parameters but it's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly reply if u know the solution for the above requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 06:26:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073609#M1178639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T06:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed rows and columns in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073610#M1178640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have an internal table with four records containing some INT values. And in the fifth row you need to display the sum of the four fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, first you need to alter the internal table for the fifth record, that should contain the sum.&lt;/P&gt;&lt;P&gt;So, using the values in the above rows for the corresponding columns, calculate the sum for each column and append it to the fifth row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have internal table with five records.&lt;/P&gt;&lt;P&gt;What you need to do is to display the first four row as editable and the fifth row as display only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the group1 for all textbox in table control as &lt;STRONG&gt;'ABC'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code:-&lt;/P&gt;&lt;P&gt;At screen logic:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  loop with control tab_ctrl.
    module modify_screen.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In PBO:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
module modify_screen.
  read table itab into wa index tab_ctrl-currentline.
  if sy-subrc eq 0. "if record found
    if sy-tabix eq 5. "to disable 5 row in table control
      if screen-group1 = 'ABC'.
        loop at screen.
          screen-input = 0.  "disable for input
          screen-active = 0.
        endloop.
        modify screen.
      endif.
    endif.
  elseif sy-subrc ne 0. "if no record found then disable rest rows
    if screen-group1 = 'ABC'.
      loop at screen.
        screen-input = 0.  "disable for input
        screen-active = 0.
      endloop.
      modify screen.
    endif.
  endif.
endmodule.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you have more records, the don't use &lt;STRONG&gt;sy-tabix eq 5&lt;/STRONG&gt;, but instead use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
describe itab
lines line_count.

if sy-tabix eq line_count.
  "code to disable
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Tarun Gambhir on Feb 3, 2009 12:12 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 06:37:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073610#M1178640</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-02-03T06:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fixed rows and columns in Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073611#M1178641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE status_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP WITH CONTROL tab_control.&lt;/P&gt;&lt;P&gt;MODULE Populate_table.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Write this Code in PBO..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_1000 OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'ST_STAT'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR 'T_CREATE'.&lt;/P&gt;&lt;P&gt;CLEAR wf_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Number of lines of table control&lt;/P&gt;&lt;P&gt;tab_control-lines = 10..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " STATUS_1000 OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 06:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fixed-rows-and-columns-in-table-control/m-p/5073611#M1178641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T06:44:27Z</dc:date>
    </item>
  </channel>
</rss>

