<?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/2403900#M535730</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;Check the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztest_tc_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS: tc TYPE TABLEVIEW USING SCREEN '100'.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_data OCCURS 0,&lt;/P&gt;&lt;P&gt;       mark  type c,&lt;/P&gt;&lt;P&gt;       sel   TYPE c,&lt;/P&gt;&lt;P&gt;       aufnr TYPE aufnr,&lt;/P&gt;&lt;P&gt;       lead  TYPE aufnr,&lt;/P&gt;&lt;P&gt;      END OF it_data.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_data1 OCCURS 0,&lt;/P&gt;&lt;P&gt;       mark  type c,&lt;/P&gt;&lt;P&gt;       sel   TYPE c,&lt;/P&gt;&lt;P&gt;       aufnr TYPE aufnr,&lt;/P&gt;&lt;P&gt;       lead  TYPE aufnr,&lt;/P&gt;&lt;P&gt;      END OF it_data1.&lt;/P&gt;&lt;P&gt;DATA: v_lead TYPE aufnr .&lt;/P&gt;&lt;P&gt;DATA: fname(14) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: ind(2).&lt;/P&gt;&lt;P&gt;DATA:  col TYPE cxtab_column.          "column of table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 100.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 200.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 300.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;  it_data1[] = it_data[].&lt;/P&gt;&lt;P&gt;  DELETE it_data1 WHERE aufnr = v_lead.&lt;/P&gt;&lt;P&gt;  v_lead = 100.&lt;/P&gt;&lt;P&gt;  CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  modify_screen  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE modify_screen OUTPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;    IF it_data-aufnr &amp;lt;&amp;gt; v_lead AND it_data-lead = v_lead.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'IT_DATA-SEL'.&lt;/P&gt;&lt;P&gt;        screen-input       = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " modify_screen  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'STATUS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Flow logic....&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;&lt;/P&gt;&lt;P&gt;  MODULE status_0100.&lt;/P&gt;&lt;P&gt;  LOOP AT it_data WITH CONTROL tc.&lt;/P&gt;&lt;P&gt;    MODULE modify_screen.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jun 2007 11:26:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-29T11:26:49Z</dc:date>
    <item>
      <title>table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403892#M535722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using table control to display data. is it necessary that we have to send final internal table to the table control in module pool to display data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403892#M535722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403893#M535723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the PBO you have a loop statement involving the table control.&lt;/P&gt;&lt;P&gt;In this loop you have to pass the internal table values to the screen variables in your table control. Then the values will be shown on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab with control xxxx.&lt;/P&gt;&lt;P&gt;  ...here pass itab values to your screen variables...&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403893#M535723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403894#M535724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narasimha Kulkarni,&lt;/P&gt;&lt;P&gt;                It is neccesary to move data from Internal table to TC to display ur records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz go through the below mention Example :&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE STATUS_0001.&lt;/P&gt;&lt;P&gt;  MODULE PB01.&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB WITH CONTROL TC .&lt;/P&gt;&lt;P&gt;    MODULE MOVE-DATA-T0-SCREEN.&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;MODULE PB01 OUTPUT.&lt;/P&gt;&lt;P&gt;  IF STATUS1 = '0'.&lt;/P&gt;&lt;P&gt;    SELECT * FROM ZSP_ACCOUNT INTO CORRESPONDING FIELDS OF TABLE ITAB.&lt;/P&gt;&lt;P&gt;    STATUS1 = '5'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " PB01  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE MOVE-DATA-T0-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;DATA COUNT1 TYPE I.&lt;/P&gt;&lt;P&gt;MOVE ITAB TO ZSP_ACCOUNT.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " MOVE-DATA-T0-SCREEN  OUTPUT&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;Raghavendra.D.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403894#M535724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403895#M535725</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;YES, a table control is nothing but a collection of SCREEN FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So have to loop through your internal table and update the screens fields of each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is why we have to have LOOP AT itab with TABLE CONTROL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403895#M535725</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-29T08:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403896#M535726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Yes it is necessary that we have to send final internal table to the table control in module pool to display data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code will help you to send internal table data to table control and send table control data to internal table&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 STATUS_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB WITH CONTROL TABLE-ATT.&lt;/P&gt;&lt;P&gt;MODULE MOVE-DATA-TO-SCREEN.&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;module leave_screen.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;MODULE MOVE-DATA-FROM-SCREEN.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Report ZPR_TEST02.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module MOVE-DATA-TO-SCREEN OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE MOVE-DATA-TO-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : zpr_table.&lt;/P&gt;&lt;P&gt;controls table_att type tableview using screen 100.&lt;/P&gt;&lt;P&gt;DATA: ITAB LIKE ZPR_TABLE OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;data : itab1 like itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING ITAB TO ZPR_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 "MOVE-DATA-TO-SCREEN OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Report ZPR_TEST02.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module MOVE-DATA-FROM-SCREEN INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE MOVE-DATA-FROM-SCREEN INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF OK_CODE = 'ENTER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INDEX TABLE_ATT-CURRENT_LINE.&lt;/P&gt;&lt;P&gt;   MOVE-CORRESPONDING ZITEM_RFQ TO ITAB_ITEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;     MODIFY ITAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;  APPEND ITAB.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 08:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403896#M535726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T08:31: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/2403897#M535727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi narashiman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes internal is nessasary for table control. when you enter datas in table control it will go to internal table then it will move onto corresponding table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u have any doubts try this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;  MODULE STATUS_1002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2 WITH CONTROL CARSEM.&lt;/P&gt;&lt;P&gt;    MODULE MOVE-DATA-TO-SCREEN.&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;  MODULE USER_COMMAND_1002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2.&lt;/P&gt;&lt;P&gt;    MODULE MOVE-DATA-FROM-SCREEN.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;In Module inside do like this.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF OK_CODE = 'ENTER'.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB2 INDEX CARSEM-CURRENT_LINE.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING ZSEN_ME41_01 TO ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;        MODIFY ITAB2 INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        APPEND ITAB2.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF OK_CODE = 'SAVE'.&lt;/P&gt;&lt;P&gt; LOOP AT ITAB2.&lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING ITAB2 TO ZSEN_ME41_01.&lt;/P&gt;&lt;P&gt;          INSERT ZSEN_ME41_01.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if your problem solves, reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 09:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403897#M535727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T09:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403898#M535728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi narasimha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    table control is just to view the datas.the syntax is&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CONTROLS contrl TYPE TABLEVIEW USING SCREEN dynnr.&amp;lt;/b&amp;gt; where dynnr - screen number&lt;/P&gt;&lt;P&gt;in TOP INCLUDE you need to create,two modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)MODULE data_retrieval OUTPUT.//where you write the select query&lt;/P&gt;&lt;P&gt;select single * from table into corresponding fields of itab.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " data_retrieval  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)MODULE populate_screen OUTPUT.//where you populate datas like&lt;/P&gt;&lt;P&gt;if sy-stepl = 1.&lt;/P&gt;&lt;P&gt;tc100-lines = tc100-top_line + sy-loopc - 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;move-corresponding wa to structure.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " populate_screen  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL............&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 11:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403898#M535728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T11:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403899#M535729</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;It is necessary that we have to send final internal table to the table control in module pool to display data. &lt;/P&gt;&lt;P&gt;Refer this link:http://sts1.sts.tu-harburg.de/teaching/sap_r3/ABAP4/contro02.htm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example processes a table control with LOOP with parallel loop using an internal table. By using function codes you can sort columns and delete rows from the internal table. The ready for input status of the table control fields is controlled using a function code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_tabcont_loop_at.&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;DATA: cols LIKE LINE OF flights-cols,&lt;/P&gt;&lt;P&gt;lines TYPE i.&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;&lt;/P&gt;&lt;P&gt;      TABLES demo_conn.&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;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;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 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;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;  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 'TOGGLE'.&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'.&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'.&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'.&lt;/P&gt;&lt;P&gt;      READ TABLE flights-cols INTO cols &lt;/P&gt;&lt;P&gt;                              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;The layout of screen 100 is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A resizable table control called FLIGHTS is defined. The fields of the table control are transferred from the structure DEMO_CONN in the ABAP Dictionary. The first two columns are lead columns. The corresponding fields are output fields. A title bar, columns headers, and a selection column are created. The component MARK of type character with length 1 from structure DEMO_CONN is assigned to the selection column. You can select one column and several lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has the following flow logic:&lt;/P&gt;&lt;P&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;&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;A loop is executed at PBO and PAI using the table control FLIGHTS and is also executed using the internal table ITAB of the ABAP program. During the PBO loop, no module is called to fill the table control from table ITAB of the ABAP program. However, during the PAI loop, a module is called to modify table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO the component LINES of control structure FLIGHTS is filled explicitly with the current number of rows of the internal table before the PBO loop to install the scroll bar of the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the PBO loop, in the module FILL_TABLE_CONTROL the work area DEMO_CONN is filled with values from the internal table, where the row index corresponds to the current row of the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the PAI loop, the rows of the internal table, whose row index corresponds to the current row of the table control, are overwritten with the contents of the work area DEMO_CONN. User input is transferred from the input fields of the control to the internal table. In particular, the internal table also contains a flag in the column MARK to indicate whether the row of the table control is selected or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the PAI loop, user input is processed in the module USER_COMMAND. The GUI status SCREEN_100 provides the appropriate function codes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the program is called not all of the fields in the table control are ready for input. The static specifications of the table control in the Screen Painter are modified before CALL SCREEN in the program. The system uses the table COLS in control structure FLIGHTS. All columns with a column position larger than two are set to not ready for input status in a loop using the table FLIGHT-COLS. By choosing the function code TOGGLE, you can change the ready for input status of the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function codes SORT_UP and SORT_DOWN allow you to sort selected columns of the internal table ITAB ascending or descending. The static settings of the table control allow you to select only a single column. The selected column is derived from the internal table FLIGHT-COLS. The name of the sort criteria in the SORT statement is determined dynamically from the component COLS-SCREEN-NAME. The prefix DEMO_CONN- must be removed using an offset specification. After sort the selection is undone, and the component SELECTED in table FLIGHT-COLS is assigned a blank character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can delete selected rows from the internal table ITAB using the function code DELETE. First the system checks whether the fields of the table control are ready for input. Then all selected rows are deleted in a loop using the internal table ITAB. Since the table control is read again from the internal table in the PBO loop, the rows on the screen are deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 11:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403899#M535729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T11:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403900#M535730</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;Check the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ztest_tc_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS: tc TYPE TABLEVIEW USING SCREEN '100'.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_data OCCURS 0,&lt;/P&gt;&lt;P&gt;       mark  type c,&lt;/P&gt;&lt;P&gt;       sel   TYPE c,&lt;/P&gt;&lt;P&gt;       aufnr TYPE aufnr,&lt;/P&gt;&lt;P&gt;       lead  TYPE aufnr,&lt;/P&gt;&lt;P&gt;      END OF it_data.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_data1 OCCURS 0,&lt;/P&gt;&lt;P&gt;       mark  type c,&lt;/P&gt;&lt;P&gt;       sel   TYPE c,&lt;/P&gt;&lt;P&gt;       aufnr TYPE aufnr,&lt;/P&gt;&lt;P&gt;       lead  TYPE aufnr,&lt;/P&gt;&lt;P&gt;      END OF it_data1.&lt;/P&gt;&lt;P&gt;DATA: v_lead TYPE aufnr .&lt;/P&gt;&lt;P&gt;DATA: fname(14) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: ind(2).&lt;/P&gt;&lt;P&gt;DATA:  col TYPE cxtab_column.          "column of table control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 100.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 200.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_data-aufnr = 300.&lt;/P&gt;&lt;P&gt;  it_data-lead  = 100.&lt;/P&gt;&lt;P&gt;  APPEND it_data.&lt;/P&gt;&lt;P&gt;  CLEAR it_data.&lt;/P&gt;&lt;P&gt;  it_data1[] = it_data[].&lt;/P&gt;&lt;P&gt;  DELETE it_data1 WHERE aufnr = v_lead.&lt;/P&gt;&lt;P&gt;  v_lead = 100.&lt;/P&gt;&lt;P&gt;  CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  modify_screen  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE modify_screen OUTPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;    IF it_data-aufnr &amp;lt;&amp;gt; v_lead AND it_data-lead = v_lead.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'IT_DATA-SEL'.&lt;/P&gt;&lt;P&gt;        screen-input       = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " modify_screen  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'STATUS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Flow logic....&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;&lt;/P&gt;&lt;P&gt;  MODULE status_0100.&lt;/P&gt;&lt;P&gt;  LOOP AT it_data WITH CONTROL tc.&lt;/P&gt;&lt;P&gt;    MODULE modify_screen.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2007 11:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/2403900#M535730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-29T11:26:49Z</dc:date>
    </item>
  </channel>
</rss>

