<?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 Table control add/modify/delete functionality in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741856#M1112367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tab control. Under that tab control i have a table control. Now the recors are displaying on the table control . Now i want to delete, modify and insert the recors on the table contol. Please help me out to achieve this functioanlity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2008 04:27:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-05T04:27:10Z</dc:date>
    <item>
      <title>Table control add/modify/delete functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741856#M1112367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tab control. Under that tab control i have a table control. Now the recors are displaying on the table control . Now i want to delete, modify and insert the recors on the table contol. Please help me out to achieve this functioanlity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 04:27:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741856#M1112367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T04:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table control add/modify/delete functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741857#M1112368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priyaranjan ,&lt;/P&gt;&lt;P&gt;       1) Add the buttons for adding , deleting the rows of the table .&lt;/P&gt;&lt;P&gt;       2) Create the table control with the check box .&lt;/P&gt;&lt;P&gt;       3) To delete a record , under the user command code for that button , loop at the respective internal table and delete the record where it is marked 'X' .&lt;/P&gt;&lt;P&gt;       4) append an empty line in the loop .&lt;/P&gt;&lt;P&gt;       5 ) To modify the entries , first enable the input option for the table control and then loop the table when at user defined command , &lt;/P&gt;&lt;P&gt;      and modify the table .&lt;/P&gt;&lt;P&gt; Guess this should solve your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 05:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741857#M1112368</guid>
      <dc:creator>AB27</dc:creator>
      <dc:date>2008-11-05T05:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Table control add/modify/delete functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741858#M1112369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF ok_code = 'CB_SAV'.  "for save
    MODIFY zmara FROM TABLE it_zmara.
  ENDIF.

IF ok_code = 'CB_DEL'.   "for delete

*    setting the flag to make the table control in editable mode after
*    deleting te selected line
    flag = 'Y'.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
         EXPORTING
              titlebar              = 'CONFIRM '
              text_question         = 'ARE, YOU SURE TO DELETE FROM DB?'
              text_button_1         = 'YES'(001)
              text_button_2         = 'NO'(002)
              display_cancel_button = 'X'
         IMPORTING
              answer                = ok_code_ans.
    IF ok_code_ans EQ 1.
*UPDATE THE DB TABLE FROM INTERNAL TABLE.
      UPDATE zmara FROM TABLE it_zmara.
* Deleting the selected row from the internal table
      DELETE it_zmara WHERE  pick = 'X'.
*       Deleting the selected row from the database table
      DELETE FROM zmara WHERE matnr = it_zmara-matnr.
*      MESSAGE s003 WITH 'Deleted Successfully'.

    ENDIF.

  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Tks, Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 05:11:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741858#M1112369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T05:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Table control add/modify/delete functionality</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741859#M1112370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For inserting ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  u need to write in the user command &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   case ok_code.&lt;/P&gt;&lt;P&gt;     when 'INSERT'.     "give the function code of the insert  &lt;/P&gt;&lt;P&gt;                                "button as INSERT&lt;/P&gt;&lt;P&gt;        describe table itab line wrk_lines.&lt;/P&gt;&lt;P&gt;        wrk_lines = wrk_lines + 1.&lt;/P&gt;&lt;P&gt;        sy-tfill = wrk_lines.       &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;    when 'DELETE'   .       "func code for del button is DELETE&lt;/P&gt;&lt;P&gt;        &lt;/P&gt;&lt;P&gt;         delete itab where sel = 'X'.&lt;/P&gt;&lt;P&gt;                  "u need to give the sel name as itab-sel in the &lt;/P&gt;&lt;P&gt;                  "layout then only the selected can be easily &lt;/P&gt;&lt;P&gt;                  "identified.&lt;/P&gt;&lt;P&gt;     I hope this serves.&lt;/P&gt;&lt;P&gt;Neeraj&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 05:12:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-add-modify-delete-functionality/m-p/4741859#M1112370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T05:12:18Z</dc:date>
    </item>
  </channel>
</rss>

