<?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: Module pool table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788500#M1465629</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;PRE&gt;&lt;CODE&gt;"In TOP include " This is Tested Code
DATA : BEGIN OF itab OCCURS 0,
    mark.
        INCLUDE STRUCTURE sflight." WITH HEADER LINE.
DATA : END OF itab.
"In Flow Logic,
PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
  LOOP AT itab WITH CONTROL tc.
  ENDLOOP.

PROCESS AFTER INPUT.
module clear_selection. " To Clear Eerlier Selection
  LOOP AT itab.
    MODULE GET_CURSOR. " Add this one to Pass the Selected Rows to your Program Internal Table
  ENDLOOP.
 MODULE USER_COMMAND_0100.

" In Program
MODULE get_cursor INPUT.
  DESCRIBE TABLE itab LINES tc-lines.
  IF tc-lines &amp;gt;= tc-current_line.
    MODIFY itab INDEX tc-current_line. " This will modify the ITAB with the Selected Rows in Progarm ITAB
  ELSE.
  ENDIF.
ENDMODULE.                 " GET_CURSOR  INPUT
" In PBO

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'ABC'.
*  SET TITLEBAR 'xxx'.
  IF first IS INITIAL. " Incase you are selecting the Data in PBO this needs to be restricted only Once
    first = 'X'.
    SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE itab.
  ENDIF.
  SORT itab BY carrid connid.
  DELETE ADJACENT DUPLICATES FROM itab COMPARING carrid connid.
  SET CURSOR FIELD 'ITAB-CARRID' LINE line.
ENDMODULE.                 " STATUS_0100  OUTPUT
MODULE clear_selection INPUT. " OPtionally You can Add this to clear earler Selection
  LOOP AT itab.
    IF itab-mark = 'X'.
      CLEAR itab-mark.
      MODIFY itab INDEX sy-tabix.
    ENDIF.
  ENDLOOP.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheeerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Apr 2010 06:28:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-20T06:28:36Z</dc:date>
    <item>
      <title>Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788496#M1465625</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;I have created a table control. When i select the rows and scroll down, the rows i have selected are getting un-selected. But the selected rows are getting printed according to the requirement. Only thing is it is getting un-seelcted once we scroll up/down.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But while debugging i have found this values.&lt;/P&gt;&lt;P&gt;TCCUSTOM-LINE_SELECTOR = 'X'.&lt;/P&gt;&lt;P&gt;TCCUSTOM-LINE_SEL_MODE = '2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is working properly. I dont know what could be the reason for the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 08:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788496#M1465625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T08:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788497#M1465626</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;Really not able to figure it out what exactly your code was &lt;/P&gt;&lt;P&gt;but u can check this example program  demo_dynpro_tabcont_loop in se51.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and Best wishes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 09:34:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788497#M1465626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T09:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788498#M1465627</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;In module pool there is a option with Select-Field ( SEL-Mode)where you can declare a variable(like flag) in ur internal table and pass it to the screen,so whenever u select the Corresponding row, you have to update in internal table as 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need for the following..&lt;/P&gt;&lt;P&gt;TCCUSTOM-LINE_SELECTOR = 'X'.&lt;/P&gt;&lt;P&gt;TCCUSTOM-LINE_SEL_MODE = '2'.&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;Arbind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 11:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788498#M1465627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-19T11:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788499#M1465628</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;In the Table Control, and PAI event is triggered everytime you scroll up or down. So, in the Table Control Wizard you need to select the option with Checkbox. This will take care of automatically mapping the marked line from the UI to the PAI event to the internal Table to the PBO event before finally calling the Table again. So, you can debug the code once and can have a look the area where the marks are not saved. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the Demo Table Control programs. Debug them carefully. And also try using the Wizard to create the Table Control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEMO_DYNPRO_TABCONT_LOOP       Table Control with LOOP - ENDLOOP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEMO_DYNPRO_TABCONT_LOOP_AT    Table Control with LOOP AT ITAB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEMO_DYNPRO_TABLE_CONTROL_1    Table Control with LOOP Statement&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEMO_DYNPRO_TABLE_CONTROL_2    Table Control with LOOP AT ITAB&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;Hope this will help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 05:28:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788499#M1465628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-20T05:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788500#M1465629</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;PRE&gt;&lt;CODE&gt;"In TOP include " This is Tested Code
DATA : BEGIN OF itab OCCURS 0,
    mark.
        INCLUDE STRUCTURE sflight." WITH HEADER LINE.
DATA : END OF itab.
"In Flow Logic,
PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
  LOOP AT itab WITH CONTROL tc.
  ENDLOOP.

PROCESS AFTER INPUT.
module clear_selection. " To Clear Eerlier Selection
  LOOP AT itab.
    MODULE GET_CURSOR. " Add this one to Pass the Selected Rows to your Program Internal Table
  ENDLOOP.
 MODULE USER_COMMAND_0100.

" In Program
MODULE get_cursor INPUT.
  DESCRIBE TABLE itab LINES tc-lines.
  IF tc-lines &amp;gt;= tc-current_line.
    MODIFY itab INDEX tc-current_line. " This will modify the ITAB with the Selected Rows in Progarm ITAB
  ELSE.
  ENDIF.
ENDMODULE.                 " GET_CURSOR  INPUT
" In PBO

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'ABC'.
*  SET TITLEBAR 'xxx'.
  IF first IS INITIAL. " Incase you are selecting the Data in PBO this needs to be restricted only Once
    first = 'X'.
    SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE itab.
  ENDIF.
  SORT itab BY carrid connid.
  DELETE ADJACENT DUPLICATES FROM itab COMPARING carrid connid.
  SET CURSOR FIELD 'ITAB-CARRID' LINE line.
ENDMODULE.                 " STATUS_0100  OUTPUT
MODULE clear_selection INPUT. " OPtionally You can Add this to clear earler Selection
  LOOP AT itab.
    IF itab-mark = 'X'.
      CLEAR itab-mark.
      MODIFY itab INDEX sy-tabix.
    ENDIF.
  ENDLOOP.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheeerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 06:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788500#M1465629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-20T06:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Module pool table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788501#M1465630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your problem solved? If not paste your PAI and PBO code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swarna Munukoti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 11:00:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/6788501#M1465630</guid>
      <dc:creator>former_member217544</dc:creator>
      <dc:date>2010-04-21T11:00:50Z</dc:date>
    </item>
  </channel>
</rss>

