<?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: Table Control Example in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342294#M516429</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;Table control is used to maintain set of records in tabular form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report demo_dynpro_table_control_1  message-id sabapdocu.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 10,&lt;/P&gt;&lt;P&gt;         mark,&lt;/P&gt;&lt;P&gt;        col1 type i,&lt;/P&gt;&lt;P&gt;        col2 type i,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data ok_code type sy-ucomm.&lt;/P&gt;&lt;P&gt;data ok_save type sy-ucomm.&lt;/P&gt;&lt;P&gt;data tab_lines type i.&lt;/P&gt;&lt;P&gt;data step_lines type i.&lt;/P&gt;&lt;P&gt;data offset type i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;controls table type tableview using screen 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module init output.&lt;/P&gt;&lt;P&gt;  set pf-status 'BASIC'.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module fill_itab output.&lt;/P&gt;&lt;P&gt;  describe table itab lines tab_lines.&lt;/P&gt;&lt;P&gt;  if tab_lines = 0.&lt;/P&gt;&lt;P&gt;    do 40 times.&lt;/P&gt;&lt;P&gt;      itab-col1 = sy-index.&lt;/P&gt;&lt;P&gt;      itab-col2 = sy-index ** 2.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;    describe table itab lines tab_lines.&lt;/P&gt;&lt;P&gt;    table-lines = tab_lines.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module transp_itab output.&lt;/P&gt;&lt;P&gt;  read table itab index table-current_line.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module lines output.&lt;/P&gt;&lt;P&gt;  step_lines = sy-loopc.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module exit input.&lt;/P&gt;&lt;P&gt;  leave program.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_pai input.&lt;/P&gt;&lt;P&gt;  ok_save = ok_code. clear ok_code.&lt;/P&gt;&lt;P&gt;  message s888 with 'TOP_LINE: ' table-top_line&lt;/P&gt;&lt;P&gt;                    ', LINES: '  step_lines.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_table input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'MARK'.&lt;/P&gt;&lt;P&gt;      if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;        message i888 with 'Zeile' table-current_line 'markiert'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'SETM'.&lt;/P&gt;&lt;P&gt;      modify itab index table-current_line.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_all input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'ALLM'.&lt;/P&gt;&lt;P&gt;      loop at itab.&lt;/P&gt;&lt;P&gt;        if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;          message i888 with 'Zeile' sy-tabix 'markiert'.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;    when 'DELE'.&lt;/P&gt;&lt;P&gt;      loop at itab.&lt;/P&gt;&lt;P&gt;        if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;          itab-mark = ' '.&lt;/P&gt;&lt;P&gt;          modify itab.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module scroll input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'PGDO'.&lt;/P&gt;&lt;P&gt;      offset = table-lines - step_lines.&lt;/P&gt;&lt;P&gt;      if table-top_line lt offset.&lt;/P&gt;&lt;P&gt;        table-top_line = table-top_line + step_lines.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'PGUP'.&lt;/P&gt;&lt;P&gt;      offset = step_lines.&lt;/P&gt;&lt;P&gt;      if table-top_line gt offset.&lt;/P&gt;&lt;P&gt;        table-top_line = table-top_line - step_lines.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        table-top_line = 1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'PGLA'.&lt;/P&gt;&lt;P&gt;      table-top_line = table-lines - step_lines + 1.&lt;/P&gt;&lt;P&gt;    when 'PGTO'.&lt;/P&gt;&lt;P&gt;      table-top_line = 1.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For More Info,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table Control Scrolling:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2957007"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2400693"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="741023"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3338799"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table Control with Wizard :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table control in BDC&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 09:21:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-08T09:21:33Z</dc:date>
    <item>
      <title>Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342289#M516424</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;I am looking for a good Table Control Example.I have never worked on Table Controls,I am not clear of the exact procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with this doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:16:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342289#M516424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342290#M516425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;CONTROLS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.&lt;/P&gt;&lt;P&gt;Go through this urls.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.saptechnical.com" target="test_blank"&gt;www.saptechnical.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com" target="test_blank"&gt;www.sap-img.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/howdo_a.htm" target="test_blank"&gt;http://www.planetsap.com/howdo_a.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.niraj.tripod.com/id25.html" target="test_blank"&gt;http://sap.niraj.tripod.com/id25.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342290#M516425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342291#M516426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have alook at these sample reports:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DEMO_DYNPRO_TABCONT_LOOP       Table Control with LOOP - ENDLOOP
DEMO_DYNPRO_TABCONT_LOOP_AT    Table Control with LOOP AT ITAB
DEMO_DYNPRO_TABLE_CONTROL_1    Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2    Table Control with LOOP AT ITAB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342291#M516426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342292#M516427</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;Data is displayed in the form of table.&lt;/P&gt;&lt;P&gt;Table control gives user the feeling of an actual table.&lt;/P&gt;&lt;P&gt;You can scroll through the table vertically as well as horizontally.&lt;/P&gt;&lt;P&gt;You can select rows and columns.&lt;/P&gt;&lt;P&gt;You can resize the with of columns.&lt;/P&gt;&lt;P&gt;You can have separator lines between rows and columns.&lt;/P&gt;&lt;P&gt;Automatic resizing of the table when the user resizes the window.&lt;/P&gt;&lt;P&gt;You can update information in the table control and it can be updated in the database table by writing code for it.&lt;/P&gt;&lt;P&gt;Steps for creating table control &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declaration of table control in module pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Designing of table controls on the screen.&lt;/P&gt;&lt;P&gt;Passing data to table control in flow logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declaration of TC in modulepool program &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;controls &amp;lt;name of table control&amp;gt; type tableview using screen &amp;lt;&amp;#145;screen no.&amp;#146;&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Designing Table control on screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.&lt;/P&gt;&lt;P&gt;Name the table control.(same name as given in data declaration).&lt;/P&gt;&lt;P&gt;From dictionary object OR from program fields select the fields and place them in the table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Passing data to table control &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually transfer of data from program to screen is automatic.&lt;/P&gt;&lt;P&gt;In case of TC, you need to explicitly transfer the data to table control.&lt;/P&gt;&lt;P&gt;ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Passing of data contd. &lt;/P&gt;&lt;P&gt;PBO.&lt;/P&gt;&lt;P&gt;Loop at &amp;lt;name of internal table&amp;gt; with control &amp;lt;name of table control&amp;gt; cursor &amp;lt;scroll variable&amp;gt;.&lt;/P&gt;&lt;P&gt;module&amp;#133;&amp;#133;.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;PAI.&lt;/P&gt;&lt;P&gt;Loop at &amp;lt; name of internal table&amp;gt;.Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scroll variables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Top_line : the row of table where the screen display starts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_line : the row currently being processed inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transfer of data from prg to TC. &lt;/P&gt;&lt;P&gt;With &amp;#145;Loop at &amp;#133;&amp;#146; statement, the first row is placed in the header of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The row in internal table is transferred to the TC as stated in the &amp;#145;Loop at&amp;#133;..&amp;#146; statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system encounters the &amp;#145;Endloop&amp;#146; statement and control is passed back to the next line of internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;just refer....&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/htmlviewer.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/htmlviewer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="380820"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="813872"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;suresh.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342292#M516427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342293#M516428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_tabcont_loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab TYPE TABLE OF demo_conn,&lt;/P&gt;&lt;P&gt;      fill TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TABLES demo_conn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lines TYPE i,&lt;/P&gt;&lt;P&gt;      limit TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE itab LINES fill.&lt;/P&gt;&lt;P&gt;  flights-lines = fill.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE fill_table_control OUTPUT.&lt;/P&gt;&lt;P&gt;  READ TABLE itab INTO demo_conn INDEX flights-current_line.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE read_table_control INPUT.&lt;/P&gt;&lt;P&gt;  lines = sy-loopc.&lt;/P&gt;&lt;P&gt;  MODIFY itab FROM demo_conn INDEX flights-current_line.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'NEXT_LINE'.&lt;/P&gt;&lt;P&gt;      flights-top_line = flights-top_line + 1.&lt;/P&gt;&lt;P&gt;      limit = fill - lines + 1.&lt;/P&gt;&lt;P&gt;      IF flights-top_line &amp;gt; limit.&lt;/P&gt;&lt;P&gt;        flights-top_line = limit.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'PREV_LINE'.&lt;/P&gt;&lt;P&gt;      flights-top_line = flights-top_line - 1.&lt;/P&gt;&lt;P&gt;      IF flights-top_line &amp;lt; 0.&lt;/P&gt;&lt;P&gt;        flights-top_line = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'NEXT_PAGE'.&lt;/P&gt;&lt;P&gt;      flights-top_line = flights-top_line + lines.&lt;/P&gt;&lt;P&gt;      limit = fill - lines + 1.&lt;/P&gt;&lt;P&gt;      IF flights-top_line &amp;gt; limit.&lt;/P&gt;&lt;P&gt;        flights-top_line = limit.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'PREV_PAGE'.&lt;/P&gt;&lt;P&gt;      flights-top_line = flights-top_line - lines.&lt;/P&gt;&lt;P&gt;      IF flights-top_line &amp;lt; 0.&lt;/P&gt;&lt;P&gt;        flights-top_line = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'LAST_PAGE'.&lt;/P&gt;&lt;P&gt;      flights-top_line =  fill - lines + 1.&lt;/P&gt;&lt;P&gt;    WHEN 'FIRST_PAGE'.&lt;/P&gt;&lt;P&gt;      flights-top_line = 0.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac4435c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac4435c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:20:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342293#M516428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342294#M516429</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;Table control is used to maintain set of records in tabular form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report demo_dynpro_table_control_1  message-id sabapdocu.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 10,&lt;/P&gt;&lt;P&gt;         mark,&lt;/P&gt;&lt;P&gt;        col1 type i,&lt;/P&gt;&lt;P&gt;        col2 type i,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;data ok_code type sy-ucomm.&lt;/P&gt;&lt;P&gt;data ok_save type sy-ucomm.&lt;/P&gt;&lt;P&gt;data tab_lines type i.&lt;/P&gt;&lt;P&gt;data step_lines type i.&lt;/P&gt;&lt;P&gt;data offset type i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;controls table type tableview using screen 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module init output.&lt;/P&gt;&lt;P&gt;  set pf-status 'BASIC'.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module fill_itab output.&lt;/P&gt;&lt;P&gt;  describe table itab lines tab_lines.&lt;/P&gt;&lt;P&gt;  if tab_lines = 0.&lt;/P&gt;&lt;P&gt;    do 40 times.&lt;/P&gt;&lt;P&gt;      itab-col1 = sy-index.&lt;/P&gt;&lt;P&gt;      itab-col2 = sy-index ** 2.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;    enddo.&lt;/P&gt;&lt;P&gt;    describe table itab lines tab_lines.&lt;/P&gt;&lt;P&gt;    table-lines = tab_lines.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module transp_itab output.&lt;/P&gt;&lt;P&gt;  read table itab index table-current_line.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module lines output.&lt;/P&gt;&lt;P&gt;  step_lines = sy-loopc.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module exit input.&lt;/P&gt;&lt;P&gt;  leave program.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_pai input.&lt;/P&gt;&lt;P&gt;  ok_save = ok_code. clear ok_code.&lt;/P&gt;&lt;P&gt;  message s888 with 'TOP_LINE: ' table-top_line&lt;/P&gt;&lt;P&gt;                    ', LINES: '  step_lines.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_table input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'MARK'.&lt;/P&gt;&lt;P&gt;      if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;        message i888 with 'Zeile' table-current_line 'markiert'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'SETM'.&lt;/P&gt;&lt;P&gt;      modify itab index table-current_line.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module check_all input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'ALLM'.&lt;/P&gt;&lt;P&gt;      loop at itab.&lt;/P&gt;&lt;P&gt;        if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;          message i888 with 'Zeile' sy-tabix 'markiert'.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;    when 'DELE'.&lt;/P&gt;&lt;P&gt;      loop at itab.&lt;/P&gt;&lt;P&gt;        if itab-mark = 'X'.&lt;/P&gt;&lt;P&gt;          itab-mark = ' '.&lt;/P&gt;&lt;P&gt;          modify itab.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;module scroll input.&lt;/P&gt;&lt;P&gt;  case ok_save.&lt;/P&gt;&lt;P&gt;    when 'PGDO'.&lt;/P&gt;&lt;P&gt;      offset = table-lines - step_lines.&lt;/P&gt;&lt;P&gt;      if table-top_line lt offset.&lt;/P&gt;&lt;P&gt;        table-top_line = table-top_line + step_lines.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'PGUP'.&lt;/P&gt;&lt;P&gt;      offset = step_lines.&lt;/P&gt;&lt;P&gt;      if table-top_line gt offset.&lt;/P&gt;&lt;P&gt;        table-top_line = table-top_line - step_lines.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        table-top_line = 1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'PGLA'.&lt;/P&gt;&lt;P&gt;      table-top_line = table-lines - step_lines + 1.&lt;/P&gt;&lt;P&gt;    when 'PGTO'.&lt;/P&gt;&lt;P&gt;      table-top_line = 1.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For More Info,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table Control Scrolling:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2957007"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2400693"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="741023"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3338799"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table Control with Wizard :&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table control in BDC&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342294#M516429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control Example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342295#M516430</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;Features:&lt;/P&gt;&lt;P&gt;Data is displayed in the form of table.&lt;/P&gt;&lt;P&gt;Table control gives user the feeling of an actual table.&lt;/P&gt;&lt;P&gt;You can scroll through the table vertically as well as horizontally.&lt;/P&gt;&lt;P&gt;You can select rows and columns.&lt;/P&gt;&lt;P&gt;You can resize the with of columns.&lt;/P&gt;&lt;P&gt;You can have separator lines between rows and columns.&lt;/P&gt;&lt;P&gt;Automatic resizing of the table when the user resizes the window.&lt;/P&gt;&lt;P&gt;You can update information in the table control and it can be updated in the database table by writing code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a step by step example. you can learn by following the steps:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.planetsap.com/online_pgm_main_page.htm" target="test_blank"&gt;http://www.planetsap.com/online_pgm_main_page.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Check out these demo programs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSDEMO_TABLE_CONTROL&lt;/P&gt;&lt;P&gt;DEMO_DYNPRO_TABLE_CONTROL_1&lt;/P&gt;&lt;P&gt;DEMO_DYNPRO_TABLE_CONTROL_2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/ab031.htm" target="test_blank"&gt;http://www.sap-img.com/ab031.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;through this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table control scrolling:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2957007"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2400693"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="741023"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3338799"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&amp;amp;content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D52%26threadID%3D45079%26messageID%3D459011%23459011" target="test_blank"&gt;https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&amp;amp;content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D52%26threadID%3D45079%26messageID%3D459011%23459011&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table control with wizard&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/6d/150d67da1011d3963800a0c94260a5/content.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at below link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2007 09:21:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-example/m-p/2342295#M516430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-08T09:21:56Z</dc:date>
    </item>
  </channel>
</rss>

