<?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 refreshed on *enter* in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077816#M1356461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Mayyank, 
Try this way.
&amp;lt;li&amp;gt; Flow logic of the screen
&lt;PRE&gt;&lt;CODE&gt;"Flow Logic of the screen.
PROCESS BEFORE OUTPUT.
  MODULE STATUS_0100.
  LOOP AT ITAB WITH CONTROL TABC.
  ENDLOOP.

PROCESS AFTER INPUT.
  LOOP AT ITAB.
    MODULE READ_TABLE_CONTROL.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;Write the read_table_control module like below
&lt;PRE&gt;&lt;CODE&gt;MODULE read_table_control INPUT.
   MODIFY itab INDEX tabc-current_line. 
   "The above will update the entered data on table control
 ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt; 

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2009 06:23:10 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2009-08-25T06:23:10Z</dc:date>
    <item>
      <title>Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077814#M1356459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;             I am using  table control...the problem with it is that...when ever i hit the ENTER buttom&lt;/P&gt;&lt;P&gt;all the data in the fields of the table control refreshes. Though when i hit save i am able to get&lt;/P&gt;&lt;P&gt;the data in my internal table. How can i stop the data from disappearing on hitting the enter button.&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;Mayank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 05:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077814#M1356459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T05:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077815#M1356460</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;-&amp;gt;Try populating your data from the internal table onto your table control columns in the PBO as well. Whenever your press ENTER, the PAI is triggered where you would have written data that populates the internal table and then the PBO is invoked where there is no data to display your internal table values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;Restrict this portion of code using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab with control tc.
   module display_data.
endloop.

module display_data.
if sy-ucomm eq 'ENTER'.
&amp;lt;screen-field1&amp;gt; = itab-field1. "Repopulate values in the PBO
&amp;lt;screen-field2&amp;gt; = itab-field2.
endif.
endmodule.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt;If you want to set a sy-ucomm value for ENTER, go to PF-STATUS -&amp;gt; Application Tool bar -&amp;gt; first icon with a tick mark (Enter) -&amp;gt; assign function code as ENTER and use this sy-ucomm value in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 05:53:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077815#M1356460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T05:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077816#M1356461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Mayyank, 
Try this way.
&amp;lt;li&amp;gt; Flow logic of the screen
&lt;PRE&gt;&lt;CODE&gt;"Flow Logic of the screen.
PROCESS BEFORE OUTPUT.
  MODULE STATUS_0100.
  LOOP AT ITAB WITH CONTROL TABC.
  ENDLOOP.

PROCESS AFTER INPUT.
  LOOP AT ITAB.
    MODULE READ_TABLE_CONTROL.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;Write the read_table_control module like below
&lt;PRE&gt;&lt;CODE&gt;MODULE read_table_control INPUT.
   MODIFY itab INDEX tabc-current_line. 
   "The above will update the entered data on table control
 ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt; 

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 06:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077816#M1356461</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-08-25T06:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077817#M1356462</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 PBO and PAI you will need to run a loop on the table control and read the data in PBO while modify it in PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the statement&lt;/P&gt;&lt;P&gt;Read internal table contents into your table control based on the index of the current line of the table control in the PBO&lt;/P&gt;&lt;P&gt;while &lt;/P&gt;&lt;P&gt;Modify the internal table contents again using the index of the current line of the table control in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason that the data is refreshed is probably because after you hit enter the PAI is called and thereafter PBO is called again. Now if you are using  the read statement in the PBO it will display the data after displaying the records and when you press enter, if you don not modify the records, then the PBO is called again and the non modified or the old data is redisplayed (in your case it is refreshed). So the modify statement in the  should take care of your isseu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 06:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077817#M1356462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T06:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077818#M1356463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI venkat,&lt;/P&gt;&lt;P&gt;               Thnx for the prompt reply i did as you said my...... internal table was without a &lt;/P&gt;&lt;P&gt;header line so i used the following code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP WITH CONTROL ctrl.&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD wa_rpmno-zrpmno1 MODULE check_rpno.  ---&amp;gt; here i validate the data&lt;/P&gt;&lt;P&gt;    ENDCHAIN.&lt;/P&gt;&lt;P&gt;    MODULE table.                                                           --&amp;gt; i populate the internal table &lt;/P&gt;&lt;P&gt;    MODULE display_data.                                            &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 display_data INPUT.&lt;/P&gt;&lt;P&gt; MODIFY  it_rpmno INDEX ctrl-current_line FROM wa_rpmno .&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; still data gets refreshed on hitting enter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 09:17:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077818#M1356463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T09:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077819#M1356464</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;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.

  LOOP AT gt_itab1 WITH CONTROL tabcontrol.
    MODULE display_data.
  ENDLOOP.

PROCESS AFTER INPUT.

  MODULE clear_internal_table.
  LOOP AT gt_itab1.
    MODULE read_data.
  ENDLOOP.

MODULEclear_internal_table INPUT.
   clear gt_itab1[].
   clear gt_itab1.
ENDMODULE.

MODULE read_data INPUT.
if sy-ucomm eq 'ENTER'.  "Set the function code for ENTER as I mentioned in my previous post
   "Populate your internal table
endif.
ENDMODULE.

MODULE display_data OUTPUT.
   if sy-ucomm eq 'ENTER'.
     "Populate the table control with data in the internal table
  endif.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 10:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077819#M1356464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T10:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077820#M1356465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitwick,&lt;/P&gt;&lt;P&gt; I understood where the problem lies.I am able to populate my internal table in PAI &lt;/P&gt;&lt;P&gt; i am getting the following error when i loop the inernal table in PBO  --- The addition "WITH CONTROL CTRL" is missing in a LOOP in PBO.         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  MODULE status_9001.
  LOOP at it_rpmno WITH CONTROL ctrl CURSOR ctrl-current_line.
    MODULE display_data2.                                                               ---&amp;gt;&amp;gt; here i am assigin the values to the screen.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 08:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077820#M1356465</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T08:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077821#M1356466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitwick,&lt;/P&gt;&lt;P&gt;	  I understood where the problem lies.I am able to populate my internal table in PAI &lt;/P&gt;&lt;P&gt; i am getting the following error when i loop the inernal table in PBO --- The addition "WITH CONTROL CTRL" is missing in a LOOP in PBO.         &lt;/P&gt;&lt;P&gt;i have declared my internal table in the following way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; it_rpmno TYPE TABLE OF ZVAL WITH HEADER LINE. ---&amp;gt; where zval is a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS BEFORE OUTPUT.
  MODULE status_9001.
  LOOP at it_rpmno WITH CONTROL ctrl CURSOR ctrl-current_line.
    MODULE display_data2.                                                               ---&amp;gt;&amp;gt; here i am assigin the values to the screen.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mayyank on Aug 26, 2009 11:09 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 08:44:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077821#M1356466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T08:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077822#M1356467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot nitwick and venkat....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 10:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077822#M1356467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T10:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Table control data gets refreshed on *enter*</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077823#M1356468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot nitwick and venkat....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2009 10:13:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-data-gets-refreshed-on-enter/m-p/6077823#M1356468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-26T10:13:12Z</dc:date>
    </item>
  </channel>
</rss>

