<?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 data gets lost on hitting enter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958331#M1337236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In This module you need to append the data first in table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE modify_t_tbcl INPUT.
 
  t_tbcl-mark = 'X'.
  
  MODIFY t_tbcl INDEX tbcl-current_line transporting fields.
 
ENDMODULE.                 " modify_t_tbcl  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2009 12:26:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-17T12:26:07Z</dc:date>
    <item>
      <title>Table Control data gets lost on hitting enter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958329#M1337234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ppl,&lt;/P&gt;&lt;P&gt;I am facing an issue with table controls.&lt;/P&gt;&lt;P&gt;I have created a table control on my selection screen of a report.&lt;/P&gt;&lt;P&gt;But, when I enter data in the table control and hit enter key, the data vanishes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I have missed out on coding something or let me know of the resources available online which can be referred for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code written so far is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  LOOP AT t_tbcl WITH CONTROL tbcl CURSOR tbcl-current_line.
  ENDLOOP.

PROCESS AFTER INPUT.
  LOOP AT t_tbcl.
    CHAIN.
      FIELD: t_tbcl-kostl,
             t_tbcl-posnr,
             t_tbcl-ebeln.
      MODULE modify_t_tbcl ON CHAIN-REQUEST.
    ENDCHAIN.
  ENDLOOP.

MODULE modify_t_tbcl INPUT.

  t_tbcl-mark = 'X'.
  MODIFY t_tbcl INDEX tbcl-current_line.

ENDMODULE.                 " modify_t_tbcl  INPUT

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 11:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958329#M1337234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T11:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control data gets lost on hitting enter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958330#M1337235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This happens because every time you hit ENTER, the PAI is triggered and then your PBO of the screen where you havent populated your table control with values from the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Repopulate your data in the internal table in the PBO as well.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  LOOP AT t_tbcl WITH CONTROL tbcl CURSOR tbcl-current_line.
    module display_data.  "Populate your table control with data from the internal table t_tbcl.
 ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; To avoid further problems, clear your internal table in the PAI in a module before the LOOP...ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PROCESS AFTER INPUT.
module cleartable.
  LOOP AT t_tbcl.
    CHAIN.
      FIELD: t_tbcl-kostl,
             t_tbcl-posnr,
             t_tbcl-ebeln.
      MODULE modify_t_tbcl ON CHAIN-REQUEST.
    ENDCHAIN.
  ENDLOOP.

 MODULE modify_t_tbcl INPUT.
  t_tbcl-mark = 'X'.
  MODIFY t_tbcl INDEX tbcl-current_line TRANSPORTING mark.  "try including the TRANSPORTING addition as well
ENDMODULE.     
  
module cleartable.
 clear t_tbcl.
 clear t_tbcl[].
endmodule.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 12:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958330#M1337235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T12:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control data gets lost on hitting enter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958331#M1337236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In This module you need to append the data first in table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE modify_t_tbcl INPUT.
 
  t_tbcl-mark = 'X'.
  
  MODIFY t_tbcl INDEX tbcl-current_line transporting fields.
 
ENDMODULE.                 " modify_t_tbcl  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 12:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958331#M1337236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T12:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control data gets lost on hitting enter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958332#M1337237</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;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT t_tbcl.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD: t_tbcl-kostl,&lt;/P&gt;&lt;P&gt;             t_tbcl-posnr,&lt;/P&gt;&lt;P&gt;             t_tbcl-ebeln.   &lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;   MODULE modify_t_tbcl .&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE modify_t_tbcl INPUT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; IF  t_tbcl-mark = 'X'.&lt;/P&gt;&lt;P&gt;CLEAR :&amp;lt;fields&amp;gt; which are holding the data.&lt;/P&gt;&lt;P&gt;  MODIFY t_tbcl INDEX tbcl-current_line Transporting  &amp;lt;fields&amp;gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;MODIFY t_tbcl INDEX tbcl-current_line Transporting  &amp;lt;fields&amp;gt;&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;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 12:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958332#M1337237</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2009-08-17T12:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Table Control data gets lost on hitting enter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958333#M1337238</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;Modify your internal in PBO, only then the content will display&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 21:24:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-lost-on-hitting-enter/m-p/5958333#M1337238</guid>
      <dc:creator>swaroop_g2</dc:creator>
      <dc:date>2009-08-17T21:24:01Z</dc:date>
    </item>
  </channel>
</rss>

