<?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: Problem With Table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047301#M1351828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Feb 2010 10:15:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-12T10:15:01Z</dc:date>
    <item>
      <title>Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047290#M1351817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating  table control for user input ....&lt;/P&gt;&lt;P&gt;When i fill 1 row and press enter all data vanishes ...&lt;/P&gt;&lt;P&gt;How to avoid this problem..&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 11:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047290#M1351817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T11:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047291#M1351818</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;See whether this [link|&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="7580063"&gt;&lt;/A&gt;] helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 11:41:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047291#M1351818</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-08-04T11:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047292#M1351819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;   you need to append to the internal table,see below example,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 IF NOT x_assignment-employee_id IS INITIAL AND NOT x_assignment-activity IS INITIAL.
      MODIFY t_assignment FROM x_assignment INDEX tablecontrol-current_line.
      IF sy-subrc NE 0.
        APPEND x_assignment TO t_assignment.
      ENDIF.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;use this module inside the pai loop and endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 13:10:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047292#M1351819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T13:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047293#M1351820</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;The problem could be because, after the PAI is triggered once ENTER is pressed, the PBO of the screen is called (provided you havent given any CALL SCREEN or LEAVE TO SCREEN statements in the PAI). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to repopulate the screen elements with the data from the internal table in the PBO. That could be one of the reasons why you data vanishes once ENTER is pressed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to check the happenings in Debug mode. You will get a clearer picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if your internal table is populated with data. Check if you have cleared the internal table somewhere in the PBO that restricts it from displaying the data on the screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 13:17:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047293#M1351820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T13:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047294#M1351821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to append the value in Internal table in PAI  and  then PBO It loop the Internal table with the table control  to display the record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
  MODULE status_0103.
  MODULE get_data.
  MODULE tc_data1_change_tc_attr.
  LOOP AT   it_gl
  INTO lw_gl
        WITH CONTROL tc_data1
        CURSOR tc_data1-current_line.
    MODULE tc_data1_get_lines.
  ENDLOOP.
    MODULE clear.

PROCESS AFTER INPUT.
  LOOP AT it_gl .
    CHAIN.
      FIELD  lw_gl-umskz .
      FIELD  lw_gl-bschl.
      FIELD  lw_gl-saknr.
      FIELD  lw_gl-wrbtr.
      FIELD  lw_gl-gsber.
      FIELD  lw_gl-kostl.
      MODULE tc_data1_modify.
    ENDCHAIN.
  ENDLOOP.

MODULE tc_data1_modify INPUT.
  IF sy-ucomm = ' '.
 read table it_gl into lw_gl1 with index tc_data-current_line.
if sy-subrc &amp;lt;&amp;gt; 0.   
 APPEND lw_gl TO it_gl.
  ENDIF.
endif.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 13:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047294#M1351821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047295#M1351822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must have written a loop .. endloop statement in the PBO and PAI. In the PBO between loop and endloop you are reading the internal table that populates the table control. In between the loop and endloop in the PAI you will need to modify the internal table with entries that you make in the table control before you press enter. What is happening is that when you press enter the PBO is being called again and the loop .. endloop statement is executed and the internal table is read which does not have the modified values so it displays the same contents minus the entries that you made in the table control. Write the modify statement to modify the internal table from which your table control has data.&lt;/P&gt;&lt;P&gt;modify itab from wa index &amp;lt;tablecontrol&amp;gt;-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&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, 04 Aug 2009 14:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047295#M1351822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T14:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047296#M1351823</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 Ashish,
&amp;lt;li&amp;gt;Flow logic of the screen 
&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
  MODULE status_0100.
  LOOP AT itab INTO demo_conn WITH CONTROL flights."Flights -Table control name
ENDLOOP.

PROCESS AFTER INPUT.
  MODULE cancel AT EXIT-COMMAND.
  LOOP AT itab.
    MODULE read_table_control.
ENDLOOP.
  MODULE user_command_0100.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;Write code for MODULE read_table_control.
&lt;PRE&gt;&lt;CODE&gt;
MODULE read_table_control INPUT.
  MODIFY itab FROM demo_conn INDEX flights-current_line. "Flights -Table control name
 "The above statement keeps the record on table control. It does not vanish data.
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, 04 Aug 2009 15:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047296#M1351823</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-08-04T15:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047297#M1351824</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;You need to modify your internal table in PAI at every action you perform.&lt;/P&gt;&lt;P&gt;Refer:-&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.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tab.
    MODULE modify_data.
  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;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>Tue, 04 Aug 2009 19:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047297#M1351824</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-08-04T19:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047298#M1351825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ashish Bhide &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two flow logic events are important , PBO and PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO event data from the program move to the screen &lt;/P&gt;&lt;P&gt;In this event you must have written code to place a data from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI event data from the screen moves to the program.&lt;/P&gt;&lt;P&gt;In this event data from table control will move to program&lt;/P&gt;&lt;P&gt; you have to save the data into the internal table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again PBO runs so it takes the data from the internal table and display in screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have not saved the values entered in table control in PAI  , no data in internal table &lt;/P&gt;&lt;P&gt;so it disappears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you press enter this what happen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 06:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047298#M1351825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-05T06:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047299#M1351826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you enter a value in the table control it has to transferred to the itab in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in &lt;STRONG&gt;PAI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;module modify_tab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module modify_tab.&lt;/P&gt;&lt;P&gt;describe table itab lines tc-lines. -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&amp;gt; This gives the number of rows in the itab&lt;/P&gt;&lt;P&gt;if tc-lines &amp;lt;= tc-current_line.&lt;/P&gt;&lt;P&gt;modify itab index tc-current_line. --&amp;gt;if already row exists it modifies the row&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;append itab.----&amp;gt; if row is not there at row position in the table control it appends&lt;/P&gt;&lt;P&gt;endmodule.&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;Ramchander Rao.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 03:19:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047299#M1351826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T03:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047300#M1351827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashish,&lt;/P&gt;&lt;P&gt;The only reason for it is that &lt;/P&gt;&lt;P&gt;in PBO  you have to put loop on the internal table and transfer the data to the respective fields in table control.&lt;/P&gt;&lt;P&gt;in PAI you have to again put a loop and transfer the data from respective fields of  table control to Internal table fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in your case you are doing in reverse order or your internal table and fields in table control are not same.&lt;/P&gt;&lt;P&gt;Plz  check and confirm. if you need it's coding too then tell me, I will send it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 05:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047300#M1351827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T05:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047301#M1351828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2010 10:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-table-control/m-p/6047301#M1351828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-12T10:15:01Z</dc:date>
    </item>
  </channel>
</rss>

