<?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: Code for insert new line and delete on table control no  wizard in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281643#M1531545</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 PAI, use the below modify statement so that all the values in table control will be updated to internal table.&lt;/P&gt;&lt;P&gt;When user press save just use Modify statement to update the database from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itBOQlines.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY itBOQlines&lt;/P&gt;&lt;P&gt;             FROM itBOQlines&lt;/P&gt;&lt;P&gt;             INDEX tb_ctrl-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Save,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify ZBOQlines from table itBOQLines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kranthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Sep 2010 17:05:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-29T17:05:11Z</dc:date>
    <item>
      <title>Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281637#M1531539</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;&lt;/P&gt;&lt;P&gt;I have written my program using table control , how do i write code to insert my own button for insert new line in between the captured data in the table control. I'm not using wizard table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written code to delete one line but its deleting and adding the same line again on the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have searched on forum and didn't get the answer. Your assistance is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 13:33:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281637#M1531539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281638#M1531540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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; I have written code to delete one line but its deleting and adding the same line again on the table control.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post your code, there must be some mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you can debug any standard transaction(example add new field in SE11 ztable)&lt;/P&gt;&lt;P&gt;to know how it works during add new line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 13:38:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281638#M1531540</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2010-09-29T13:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281639#M1531541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE STATUS_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itBOQlinesLT with control TAB_BOQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE Take.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itBOQlinesLT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;   MODULE Deletelines.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODULE modify_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MODULE TAB_BOQ_MARK.&lt;/P&gt;&lt;P&gt;&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 USER_COMMAND_0100E AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODULE USER_COMMAND_0100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if code = 'DEL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at itBOQlinesLT WHERE SEL = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Setting the flag to make the table control in editable mode after&lt;/P&gt;&lt;/LI&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;deleting the selected line&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="6" type="ul"&gt;&lt;P&gt;   flg = 'Y'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Confirmation of delete&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          TITLEBAR      = 'Confirm'&lt;/P&gt;&lt;P&gt;          text_question = 'Are you sure to delete this record from the database?'&lt;/P&gt;&lt;P&gt;          TEXT_BUTTON_1 = 'Yes'(001)&lt;/P&gt;&lt;P&gt;          TEXT_BUTTON_2 = 'No'(002)&lt;/P&gt;&lt;P&gt;        IMPORTING&lt;/P&gt;&lt;P&gt;          ANSWER        = lv_answer.&lt;/P&gt;&lt;P&gt;      if lv_answer eq '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Updating the database table from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="6" type="ul"&gt;&lt;P&gt;     UPDATE ZBOQlines FROM TABLE itBOQlinesLT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Deleting the selected row from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       DELETE itBOQlinesLT WHERE SEL = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;Deleting the selected row from the database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="6" type="ul"&gt;&lt;P&gt;     DELETE FROM ZBOQlines WHERE SEL = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    MESSAGE i000(fb) WITH 'Deleted Successfully'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but on inserting a new line i dont know how to do that in a table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 13:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281639#M1531541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T13:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281640#M1531542</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;First delete the row from internal table and then update database table from your internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u are trying to delete the selected row frm database where sel = X&lt;/P&gt;&lt;P&gt;but i think Sel Field is only in ITAB not in DB....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 15:02:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281640#M1531542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T15:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281641#M1531543</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;Use the work area to delete the selected row instead of SEL= 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FROM ZBOQlines WHERE field1 = itBOQlines-field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should solve the problem i guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To insert the line into the table control just get the index you want to insert and use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT itBOQlines INDEX lv_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Kranthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 15:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281641#M1531543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T15:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281642#M1531544</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;Im using table control without wizard to enter data as its first point of entry and this data is not yet saved in the tables its still on the table control and user has to insert new row or delete before saving the data in the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 16:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281642#M1531544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T16:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Code for insert new line and delete on table control no  wizard</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281643#M1531545</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 PAI, use the below modify statement so that all the values in table control will be updated to internal table.&lt;/P&gt;&lt;P&gt;When user press save just use Modify statement to update the database from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itBOQlines.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY itBOQlines&lt;/P&gt;&lt;P&gt;             FROM itBOQlines&lt;/P&gt;&lt;P&gt;             INDEX tb_ctrl-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Save,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify ZBOQlines from table itBOQLines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kranthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 17:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-for-insert-new-line-and-delete-on-table-control-no-wizard/m-p/7281643#M1531545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-29T17:05:11Z</dc:date>
    </item>
  </channel>
</rss>

