<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756767#M641548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Create table control in screen.&lt;/P&gt;&lt;P&gt;2) Now put(drag and drop)  input/output fields in the table control. While you define the name of these fields also at the bottom mention whether they are input fields or output fields. This way you can have the fields updatable.&lt;/P&gt;&lt;P&gt;3) Your screen flow logic should have a logic similar to this for your table control where FIELDS is your table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE fields_change_tc_attr.&lt;/P&gt;&lt;P&gt;  LOOP AT   gt_fields&lt;/P&gt;&lt;P&gt;       INTO gs_fields&lt;/P&gt;&lt;P&gt;       WITH CONTROL fields&lt;/P&gt;&lt;P&gt;       CURSOR fields-current_line.&lt;/P&gt;&lt;P&gt;    MODULE fields_get_lines.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT gt_fields.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD gs_fields-name.&lt;/P&gt;&lt;P&gt;      FIELD gs_fields-desc.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  MODULE fields_user_command.&lt;/P&gt;&lt;P&gt;  MODULE user_command_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) In these modules you can read and display desired data by filling data in an intermal table, here gt_fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PS :- You  may also create these table control using the SAP wizard, the icon is just under the icon for table control. It is very fast and saves a lot of work.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this is helpful, in case you dont understand something, I may help you with more information if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2007 15:28:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-03T15:28:30Z</dc:date>
    <item>
      <title>Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756766#M641547</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 m new to modulepool.When i click the update radio button in report output then table control should open with table fields.&lt;/P&gt;&lt;P&gt;But 2 colums shld be disabled and other 3 colums shld be updatable.&lt;/P&gt;&lt;P&gt;User can change the existing values then update the new data in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls send step by step..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 13:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756766#M641547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-03T13:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756767#M641548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Create table control in screen.&lt;/P&gt;&lt;P&gt;2) Now put(drag and drop)  input/output fields in the table control. While you define the name of these fields also at the bottom mention whether they are input fields or output fields. This way you can have the fields updatable.&lt;/P&gt;&lt;P&gt;3) Your screen flow logic should have a logic similar to this for your table control where FIELDS is your table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE fields_change_tc_attr.&lt;/P&gt;&lt;P&gt;  LOOP AT   gt_fields&lt;/P&gt;&lt;P&gt;       INTO gs_fields&lt;/P&gt;&lt;P&gt;       WITH CONTROL fields&lt;/P&gt;&lt;P&gt;       CURSOR fields-current_line.&lt;/P&gt;&lt;P&gt;    MODULE fields_get_lines.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT gt_fields.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD gs_fields-name.&lt;/P&gt;&lt;P&gt;      FIELD gs_fields-desc.&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  MODULE fields_user_command.&lt;/P&gt;&lt;P&gt;  MODULE user_command_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) In these modules you can read and display desired data by filling data in an intermal table, here gt_fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PS :- You  may also create these table control using the SAP wizard, the icon is just under the icon for table control. It is very fast and saves a lot of work.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this is helpful, in case you dont understand something, I may help you with more information if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 15:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756767#M641548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-03T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756768#M641549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sudha karan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the transaction ABAP DOCU with the example&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_tabcont_loop_at.&lt;/P&gt;&lt;P&gt;in ABAP userdialogs -&amp;gt;Screens -&amp;gt; complex screen elements -&amp;gt; eg:Table control with modifications&lt;/P&gt;&lt;P&gt;The output shows two colums as display mode and 2 as editable when using a button which is the same scenario you are requested to implement in SAP system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the example&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_tabcont_loop_at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"Data and table control declarations&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.&lt;/P&gt;&lt;P&gt;DATA: cols LIKE LINE OF flights-cols,&lt;/P&gt;&lt;P&gt;      lines TYPE i.&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;DATA: itab TYPE TABLE OF demo_conn.&lt;/P&gt;&lt;P&gt;TABLES demo_conn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"Data fetching&amp;lt;/b&amp;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;&amp;lt;b&amp;gt;"Hiding the first 2 columns permenantly&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;LOOP AT flights-cols INTO cols WHERE index GT 2.&lt;/P&gt;&lt;P&gt;  cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;  MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"Calling screen with the table control&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"PBO Of screen 100&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE STATUS_0100.&lt;/P&gt;&lt;P&gt;    LOOP AT ITAB INTO DEMO_CONN WITH CONTROL FLIGHTS.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"PAI of screen 100&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  MODULE CANCEL AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;    module read_table_control.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  module user_command_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"PBO module&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;&amp;lt;b&amp;gt; "Counting the internal table lines&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE itab LINES lines.&lt;/P&gt;&lt;P&gt;  flights-lines = lines.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"PAI MODULES for screen 100&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;MODULE cancel INPUT.  "Back button&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;&amp;lt;b&amp;gt;"Modify data of a line from screen if user changes it&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;MODULE read_table_control INPUT.&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;&amp;lt;b&amp;gt;"Capturing user command&amp;lt;/b&amp;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 'TOGGLE'.&amp;lt;b&amp;gt;   "the diplay-change mode button on the screen&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;      LOOP AT flights-cols INTO cols WHERE index GT 2.&lt;/P&gt;&lt;P&gt;        IF  cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;          cols-screen-input = '1'.&lt;/P&gt;&lt;P&gt;        ELSEIF  cols-screen-input = '1'.&lt;/P&gt;&lt;P&gt;          cols-screen-input = '0'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    WHEN 'SORT_UP'.&amp;lt;b&amp;gt;  "the sort up button action on the screen&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        SORT itab STABLE BY (cols-screen-name+10) ASCENDING.&lt;/P&gt;&lt;P&gt;        cols-selected = ' '.&lt;/P&gt;&lt;P&gt;        MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'SORT_DOWN'. &amp;lt;b&amp;gt;  "the sort down button action on the screen&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        SORT itab STABLE BY (cols-screen-name+10) DESCENDING.&lt;/P&gt;&lt;P&gt;        cols-selected = ' '.&lt;/P&gt;&lt;P&gt;        MODIFY flights-cols FROM cols INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    WHEN 'DELETE'.  &amp;lt;b&amp;gt; "deleting a row from screen&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        LOOP AT itab INTO demo_conn WHERE mark = 'X'.&lt;/P&gt;&lt;P&gt;          DELETE itab.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;Hope it gave you a clear picture&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Pls reward all helpful answers as an encouragement to thier commitment towards helping&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 02:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756768#M641549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T02:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756769#M641550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sudha, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   This is only a suggestion : Y dt you try changing the attributes of table control  columns as ' Inactive ' in the PAI event of your screen .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 07:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2756769#M641550</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-09-04T07:53:21Z</dc:date>
    </item>
  </channel>
</rss>

