<?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 Append Lines Problem after Pressing Enter Key in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014727#M1497245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: Table control Append Lines Problem after Pressing Enter Key&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 May 2010 13:10:36 GMT</pubDate>
    <dc:creator>muhammad_sohail</dc:creator>
    <dc:date>2010-05-31T13:10:36Z</dc:date>
    <item>
      <title>Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014724#M1497242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;             I am working on table control taking input in my itab, It is working quite fine; except when I press enter on first line input it display the correct data, but when I press enter again It append the line again in my table control, when I presses more enter keys it appends more lines in my table control. I want to restrict my table control not to append extra lines when I press enter. How I can achieve this with the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My PAI and PBO  code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
Loop at itab_tc WITH CONTROL tc CURSOR tc-current_line.
ENDLOOP.
* MODULE radio_selection.
* MODULE STATUS_1000.
* MODULE getmax_srno.

PROCESS AFTER INPUT.
* MODULE fill_data.
LOOP AT itab_tc.
  Field itab_tc-matnr MODULE matnr.
  Field itab_tc-maktx MODULE maktx.
  Field itab_tc-meins MODULE meins.
  Field itab_tc-menge MODULE menge.
  Field itab_tc-kbetr MODULE kbetr.
  Field itab_tc-total MODULE total.
ENDLOOP.
* MODULE get_texts.
* MODULE USER_COMMAND_1000.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sohail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 May 2010 07:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014724#M1497242</guid>
      <dc:creator>muhammad_sohail</dc:creator>
      <dc:date>2010-05-30T07:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014725#M1497243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sohail,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;In PAI
loob  at itab.
"  Declare your Fields here
module modify_tc

endloop.

in program.
module modify_tc.
describe table itab lines tc-lines.
if tc-lines ge tc-current_line.
modify itab index tc-current_line.
else.
append itab. " Append should be here only
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 May 2010 08:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014725#M1497243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-30T08:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014726#M1497244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your's kind reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have implemented your's code, Now the problem is that when I press ENTER after entering the table control line(s), other lines of table control becomes disabled, I can't enter more lines in table control fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now; My code Looks Like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PAI &amp;amp; PBO Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
Loop at itab_tc WITH CONTROL tc CURSOR tc-current_line.
ENDLOOP.
 MODULE radio_selection.
 MODULE STATUS_1000.
 MODULE getmax_srno.

PROCESS AFTER INPUT.
MODULE fill_data.
LOOP AT itab_tc.
  Field itab_tc-matnr MODULE matnr.
  Field itab_tc-maktx MODULE maktx.
  Field itab_tc-meins MODULE meins.
  Field itab_tc-menge MODULE menge.
  Field itab_tc-kbetr MODULE kbetr.
  Field itab_tc-total MODULE total.
  MODULE modify_tc.
ENDLOOP.
 MODULE get_texts.
 MODULE USER_COMMAND_1000.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code For (Field itab_tc-matnr MODULE matnr.) &amp;amp;  (Field itab_tc-maktx MODULE maktx.).... and other(s) looks like same.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;module MATNR input.
 MODIFY itab_tc INDEX tc-current_line.
endmodule.                 " MATNR  INPUT
*----------------------------------------------------------------------*
module MAKTX input.
  Select SINGLE maktx
    FROM makt
    INTO itab_tc-maktx
    WHERE matnr = itab_tc-matnr
    AND SPRAS EQ 'E'.
  MODIFY itab_tc INDEX tc-current_line.
endmodule.                 " MAKTX  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;module MODIFY_TC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;module MODIFY_TC input.
  describe table itab_tc lines tc-lines.
  if tc-lines ge tc-current_line.
  modify itab_tc index tc-current_line.
  else.
  append itab_tc.
  endif.
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sohail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 May 2010 09:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014726#M1497244</guid>
      <dc:creator>muhammad_sohail</dc:creator>
      <dc:date>2010-05-30T09:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014727#M1497245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: Table control Append Lines Problem after Pressing Enter Key&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 May 2010 13:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014727#M1497245</guid>
      <dc:creator>muhammad_sohail</dc:creator>
      <dc:date>2010-05-31T13:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014728#M1497246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What have you written inside &lt;STRONG&gt;MODULE fill_data&lt;/STRONG&gt; ???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 May 2010 13:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014728#M1497246</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-05-31T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Append Lines Problem after Pressing Enter Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014729#M1497247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear thx.&lt;/P&gt;&lt;P&gt;      MODULE Fill_data, only takes header data, e.g; kunnar, date, etc. I am filling header data in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sohail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2010 06:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-append-lines-problem-after-pressing-enter-key/m-p/7014729#M1497247</guid>
      <dc:creator>muhammad_sohail</dc:creator>
      <dc:date>2010-06-01T06:34:32Z</dc:date>
    </item>
  </channel>
</rss>

