<?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: to delete/insert in itab in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149868#M992407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First your table control must have a mark column. For that create in the structure of itab a field TYPE char1 (named MARK for example) and then in table control parameters, select it to the mark field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in the screen layout, create a button delete row and assign a function code to it (DEL for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, in PAI of that screen, USER-COMMAND module, make a statement like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE ok_code.
...
  WHEN 'DEL'.
    perform del_row.
...
ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Create your form with something LIKE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM del_row.
  LOOP AT itab INTO wa WHERE mark EQ 'X'.
    DELETE ztable WHERE field = wa-field.
  ENDLOOP.
  DELETE itab WHERE mark EQ 'X'.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, don't forget that to the mark fields became marked after a enter (for example), must be passed to itab in PAI too, like.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP.
  FIELD: wa-mark MODULE mark ON REQUEST.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Create your module with something LIKE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE mark INPUT.
  modify itab from wa TRANSPORTING mark.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jul 2008 18:51:54 GMT</pubDate>
    <dc:creator>valter_oliveira</dc:creator>
    <dc:date>2008-07-15T18:51:54Z</dc:date>
    <item>
      <title>to delete/insert in itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149865#M992404</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;How to delete or insert in itab (in table control) by marking a particular row?&lt;/P&gt;&lt;P&gt;At the same time the database should be updated with the operation done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2008 14:14:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149865#M992404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-15T14:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: to delete/insert in itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149866#M992405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mohan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same as you done in reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more info just use F1 help on insert delete update command from se38.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will come to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2008 15:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149866#M992405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-15T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: to delete/insert in itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149867#M992406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this program : DEMO_DYNPRO_TABCONT_LOOP_AT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it will make you better understandable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2008 18:36:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149867#M992406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-15T18:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: to delete/insert in itab</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149868#M992407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First your table control must have a mark column. For that create in the structure of itab a field TYPE char1 (named MARK for example) and then in table control parameters, select it to the mark field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in the screen layout, create a button delete row and assign a function code to it (DEL for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, in PAI of that screen, USER-COMMAND module, make a statement like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CASE ok_code.
...
  WHEN 'DEL'.
    perform del_row.
...
ENDCASE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Create your form with something LIKE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM del_row.
  LOOP AT itab INTO wa WHERE mark EQ 'X'.
    DELETE ztable WHERE field = wa-field.
  ENDLOOP.
  DELETE itab WHERE mark EQ 'X'.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, don't forget that to the mark fields became marked after a enter (for example), must be passed to itab in PAI too, like.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP.
  FIELD: wa-mark MODULE mark ON REQUEST.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Create your module with something LIKE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE mark INPUT.
  modify itab from wa TRANSPORTING mark.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2008 18:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-delete-insert-in-itab/m-p/4149868#M992407</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-07-15T18:51:54Z</dc:date>
    </item>
  </channel>
</rss>

