<?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: How do I delete an entry in a custom table inside a program? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652558#M2015107</link>
    <description>&lt;P&gt;If you want to delete records of the specific table that also exist in standard table, you don't need to fill an (two) internal table(s) and process it (them). Write a DELETE statement with a subquery to check existence in the standard table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapdelete_dbtab.htm"&gt;DELETE dbtab, ABAP SQL Statement&lt;/A&gt; - zcustom_tab&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenwhere_logexp_exists.htm"&gt;EXISTS ( SELECT subquery_clauses&lt;/A&gt; - vbap&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 03 Mar 2023 07:03:59 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2023-03-03T07:03:59Z</dc:date>
    <item>
      <title>How do I delete an entry in a custom table inside a program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652555#M2015104</link>
      <description>&lt;P&gt;Hello, instead of delete the entries in IT_CUSTOM_TAB, I also want to do is if an entry is deleted in IT_CUSTOM_TAB it should also be deleted in the ZCUSTOM_TAB. Is it possible?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;      SELECT vbeln&lt;BR /&gt;             posnr&lt;BR /&gt;             matnr&lt;BR /&gt;             orqty&lt;BR /&gt;        FROM zcustom_tab&lt;BR /&gt;        INTO TABLE it_custom_tab&lt;BR /&gt;         FOR ALL ENTRIES IN t_vbap&lt;BR /&gt;       WHERE vbeln = t_vbap-vbeln&lt;BR /&gt;         AND matnr = t_vbap-matnr&lt;BR /&gt;         AND posnr = t_vbap-posnr.&lt;BR /&gt;        LOOP AT t_vbap ASSIGNING FIELD-SYMBOL(&amp;lt;lfs_t_vbap&amp;gt;).&lt;BR /&gt;          IF it_custom_tab IS NOT INITIAL.&lt;BR /&gt;            CHECK line_exists( it_custom_tab[ vbeln = &amp;lt;lfs_t_vbap&amp;gt;-vbeln&lt;BR /&gt;                                              posnr = &amp;lt;lfs_t_vbap&amp;gt;-posnr ] ).&lt;BR /&gt;            DELETE it_custom_tab&lt;BR /&gt;            WHERE vbeln = &amp;lt;lfs_t_vbap&amp;gt;-vbeln&lt;BR /&gt;              AND posnr = &amp;lt;lfs_t_vbap&amp;gt;-posnr .&lt;BR /&gt;          ENDIF.&lt;BR /&gt;        ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Mar 2023 08:02:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652555#M2015104</guid>
      <dc:creator>walkerist79</dc:creator>
      <dc:date>2023-03-02T08:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete an entry in a custom table inside a program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652556#M2015105</link>
      <description>&lt;P&gt;Yes it is possible to delete entries from database table.&lt;/P&gt;&lt;P&gt;Here is &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapdelete_dbtab.htm"&gt;ABAP documentation for &lt;STRONG&gt;DELETE dtab&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;But be always careful with modifying database entries. Please read and study about commits, locks (ENQUEUE also) etc. before you start with DB changes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 08:31:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652556#M2015105</guid>
      <dc:creator>Tomas_Buryanek</dc:creator>
      <dc:date>2023-03-02T08:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete an entry in a custom table inside a program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652557#M2015106</link>
      <description>&lt;P&gt;Use delete functionality after the loop.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; SELECT vbeln
             posnr
             matnr
             orqty
        FROM zcustom_tab
        INTO TABLE it_custom_tab
         FOR ALL ENTRIES IN t_vbap
       WHERE vbeln = t_vbap-vbeln
         AND matnr = t_vbap-matnr
         AND posnr = t_vbap-posnr.
        LOOP AT it_custom_tab ASSIGNING FIELD-SYMBOL(&amp;lt;lfs_it_custom_tab&amp;gt;).
            CHECK vbeln = &amp;lt;lfs_t_vbap&amp;gt;-vbeln and
                  posnr = &amp;lt;lfs_t_vbap&amp;gt;-posnr.
		Clear: &amp;lt;lfs_t_vbap&amp;gt;-vbeln, &amp;lt;lfs_t_vbap&amp;gt;-posnr
        ENDLOOP.

             DELETE it_custom_tab
      	      WHERE vbeln is initial AND
			posnr is inital.

		Modify ZCustom_tab from table it_custom_tab.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Mar 2023 05:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652557#M2015106</guid>
      <dc:creator>shantraj6</dc:creator>
      <dc:date>2023-03-03T05:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete an entry in a custom table inside a program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652558#M2015107</link>
      <description>&lt;P&gt;If you want to delete records of the specific table that also exist in standard table, you don't need to fill an (two) internal table(s) and process it (them). Write a DELETE statement with a subquery to check existence in the standard table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapdelete_dbtab.htm"&gt;DELETE dbtab, ABAP SQL Statement&lt;/A&gt; - zcustom_tab&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenwhere_logexp_exists.htm"&gt;EXISTS ( SELECT subquery_clauses&lt;/A&gt; - vbap&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 03 Mar 2023 07:03:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-delete-an-entry-in-a-custom-table-inside-a-program/m-p/12652558#M2015107</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2023-03-03T07:03:59Z</dc:date>
    </item>
  </channel>
</rss>

