<?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/5541428#M1265571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;already existing one if i follow what u said is ok working fine but if i INSERT a complete new records for a new gate pass no (for example) then what should i follow.&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 11:03:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-15T11:03:39Z</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/5541423#M1265566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In Module pool prgraming iam using table control.&lt;/P&gt;&lt;P&gt;My problem is when i enter first record and press enter iam able to move to next line but my first or previous records are getting cleared. In the code i haven't cleared anywhere.&lt;/P&gt;&lt;P&gt;So i should hold the record whenever i press enter.&lt;/P&gt;&lt;P&gt;Please let me know.&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;Mahesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 06:59:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541423#M1265566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T06:59:24Z</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/5541424#M1265567</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;What you need to do is to modify the internal table from table control whenever a user action is performed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow:-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_zekpo is my internal table w/o header line,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo is work area.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of input/output fields on screen are:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field2, and so on...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use code:-&lt;/P&gt;&lt;P&gt;At screen logic:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tab. "po_tab is table control on screen 8003
    MODULE read_data. "&amp;lt;--read internal table into table control
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tab.
    MODULE modify_data. "&amp;lt;--modify internal table from table control
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In PBO:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  READ_DATA  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE read_data OUTPUT.
  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tab-current_line. "po_tab is table control name
 
  data : line_count type i.
 
  describe it_zekpo
  lines line_count.
 
  po_tab-lines = line_count + 10.
  "to increase the number of lines in table control dynamically
 
ENDMODULE.                 " READ_DATA  OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In PAI:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  MODIFY_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
  MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tab-currentline.
  "this will modify the contents of existing line
ENDMODULE.                 " MODIFY_DATA  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when you add some records into table control and perform any user action, the records will retain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 07:07:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541424#M1265567</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-15T07:07:42Z</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/5541425#M1265568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/dptc1.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/dptc1.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_470/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_470/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 08:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541425#M1265568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T08:56:49Z</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/5541426#M1265569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Here iam modifying the customized ztable from internal table. Data is getting inserted into the table correctly but here my problem is while entering in the table control if suddenly i press enter key then my whole data entered in the table control is getting cleared visibilly but internally its holding the data and when i save it, it is moved into the ztable.&lt;/P&gt;&lt;P&gt;So why it is getting cleared visibilly when i press enter key. where iam doing mistake.&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 10:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541426#M1265569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T10:39:27Z</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/5541427#M1265570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi,&lt;/P&gt;&lt;P&gt;&amp;gt;  Here iam modifying the customized ztable from internal table. Data is getting inserted into the table correctly but here my problem is while entering in the table control if suddenly i press enter key then my whole data entered in the table control is getting cleared visibilly but internally its holding the data and when i save it, it is moved into the ztable.&lt;/P&gt;&lt;P&gt;&amp;gt; So why it is getting cleared visibilly when i press enter key. where iam doing mistake.&lt;/P&gt;&lt;P&gt;&amp;gt; Please let me know.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you read data in PBO and modify the data in PAI at any user action.&lt;/P&gt;&lt;P&gt;Then there seems no reason that the data disappers from the table control when you hit ENTER key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just follow the concept as in my previous reply.&lt;/P&gt;&lt;P&gt;As in my case the code is working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 10:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541427#M1265570</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-15T10:43:18Z</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/5541428#M1265571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;already existing one if i follow what u said is ok working fine but if i INSERT a complete new records for a new gate pass no (for example) then what should i follow.&lt;/P&gt;&lt;P&gt;Please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:03:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541428#M1265571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:03:39Z</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/5541429#M1265572</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;Refer:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;it_zekpo is my internal table w/o header line,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo is work area.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of input/output fields on screen are:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_zekpo-field2, and so on...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a button on the screen with function-code &lt;STRONG&gt;SAVE&lt;/STRONG&gt; or in the pf-status take the function code of the standard save button as &lt;STRONG&gt;SAVE&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use code:-&lt;/P&gt;&lt;P&gt;At screen logic:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tab. "po_tab is table control on screen 8003
    MODULE read_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tab.
    MODULE modify_data.
  ENDLOOP.

  MODULE SAVE_DATA. "&amp;lt;--save into db_table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In PBO:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  READ_DATA  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE read_data OUTPUT.
  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tab-current_line. "po_tab is table control name
 
  data : line_count type i.
 
  describe it_zekpo
  lines line_count.
 
  po_tab-lines = line_count + 10.
  "to increase the number of lines in table control dynamically
 
ENDMODULE.                 " READ_DATA  OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In PAI:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  MODIFY_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
  MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tab-currentline.
  "this will modify the contents of existing line
ENDMODULE.                 " MODIFY_DATA  INPUT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  SAVE_DATA  INPUT
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE SAVE_DATA INPUT.

  DATA : A LIKE SY-DBCNT.
  OK_CODE = SY-UCOMM.
  CASE OK_CODE.
    WHEN 'SAVE'. "function code for SAVE button
      MODIFY ZEKPO FROM TABLE IT_ZEKPO. "&amp;lt;--insert + update
      A = SY-DBCNT.
      IF SY-SUBRC = 0.
        MESSAGE S008 WITH A.
      ENDIF.
  ENDCASE.

ENDMODULE.                 " SAVE_DATA  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the &lt;STRONG&gt;modify&lt;/STRONG&gt; statement, if records are found based on the primary key combination, then the records are updated else they are inserted into the database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:07:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541429#M1265572</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-04-15T11:07:01Z</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/5541430#M1265573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here whatever u declare in PAI in table control loop simultaneously u have to declare this in the PBO loop also bcoz when u press enter the execution starts from PBO.&lt;/P&gt;&lt;P&gt;Ex: Declare the fields with some parameter even though u define them from dictionary fields and move the data into the internal table and also in PBO move the data from internal table to the field parameters.&lt;/P&gt;&lt;P&gt;Now when u press enter ur data will not be cleared.&lt;/P&gt;&lt;P&gt;Thanks for ur reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2009 16:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-table-control/m-p/5541430#M1265573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-24T16:16:41Z</dc:date>
    </item>
  </channel>
</rss>

